? ? ? ? Pending

User tests: Successful: Unsuccessful:

avatar chmst
chmst
31 Mar 2021

Pull Request for Issue #32012 .

Summary of Changes

J4 uses css grid classes for the multi column presentation of blogs. This is done via modifying classes as described here: #18319.

For users, espcially for users who migrate from J3 this is not self explaining, they ares used do define a fixed number of columns and display diretion.

This PR enables both, using own classes - but also defining a number of columns and a output direction.
This PR uses classes from #32488 for the blog layout tab where the blog lyout is definedt. This should be self explaining

It accepts columns and ordering for blog layouts in two extra fields. The input in these fields is converted to css grid classes columns-x or mansonry-x in the respective layouts. Please see comment #32943 (comment)
grafik

If this is accepted, the migration script from j3.10 to 4.0 ist no longer necessary.

Testing Instructions

Testing of this step is easy, just apply the patch, set your global params in content options. A
Add new menu Items to category blogs, play around with settings, or change existing menuItems of this type.

Documentation Changes Required

yes

avatar chmst chmst - open - 31 Mar 2021
avatar chmst chmst - change - 31 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 31 Mar 2021
Category Administration com_content Language & Strings Front End
avatar brianteeman
brianteeman - comment - 31 Mar 2021

I have had a super quick look before jumping to a day long meeting. Looks great!!!!

One suggestion would be to use different terminology to J3 and J4. A user might be new to joomla and so it wont meaning anything to them.

Not sure what to call the J3 version - perhaps "fixed count"
For the J4 how about "CSS grid"

avatar brianteeman
brianteeman - comment - 31 Mar 2021

Please add the release blocker label

avatar chmst chmst - change - 31 Mar 2021
Labels Added: ? ? ?
avatar chmst chmst - change - 31 Mar 2021
The description was changed
avatar chmst chmst - edited - 31 Mar 2021
avatar chmst chmst - change - 31 Mar 2021
The description was changed
avatar chmst chmst - edited - 31 Mar 2021
avatar chmst chmst - change - 31 Mar 2021
The description was changed
avatar chmst chmst - edited - 31 Mar 2021
avatar richard67
richard67 - comment - 31 Mar 2021

A question which is related to this PR and might have to be handled with another, new PR is the handling of updates from 3.10.

With PR #31570 , a migration of the old J3 blog layout parameters to the new css classes on update has been implemented.

When this PR here will be merged, it might sense to think about reverting it so people keep their old J3 values on update, and having the Joomla 3 way as default (params value in db) for the new created field here, while for new installations the default would be the Joomla 4 way.

avatar chmst
chmst - comment - 31 Mar 2021

@richard67 thanks, your link is the correct one.
The script should add the param blog_style = 3 and let other params untouched.

avatar brianteeman
brianteeman - comment - 31 Mar 2021

Why do we even need the script any more

/me always reluctant to touch user data

avatar richard67
richard67 - comment - 31 Mar 2021

The script should add the param blog_style = 3 and let other params untouched.

@chmst You mean when updating from 3.10 leave other params untouched? This would mean to revert #31570 almost completely. When updating previous 4.0 Beta versions, the blog classes created by the conversion from that PR would be not touched. Or did you mean let other params untouched compared to what we have now in 4.0-dev without this PR? I think you meant the 1st way, updating from 3.10, but as I'm not sure if I understand right, I'm asking.

avatar chmst
chmst - comment - 31 Mar 2021

I see two cases: In both of them, the script is used but simplified:

From 3.10 to 4: I would use the script und add the param "blog_style":"3" to params

From 4.0 beta to 4.0: I would use the script und add the param "blog_style":"4" to params


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.
avatar brianteeman
brianteeman - comment - 31 Mar 2021

From 3.10 to 4: I would use the script und add the param "blog_style":"3" to params

Cant it be 3 by default? Then you dont need to change anything

Re the name I really am not in favour of anything be labelled "Joomla 3 style" Firstly the user may never have used Joomla before so it is a meaningless term to them. Secondly if you wanted to be really accurate then it would be "Joomla 1 style"

avatar chmst chmst - change - 1 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 1 Apr 2021
The description was changed
avatar chmst chmst - edited - 1 Apr 2021
avatar ceford
ceford - comment - 1 Apr 2021

For testing I created a category Monarchs and six lorem ipsum articles with Readmore partings and a Category Blog menu item. The Cassiopeia template shows five items: always in the order created, always in one column, always with the boxed style if that has been set and never with links to older articles. The column-2 style seems to do nothing. I don't do much production work with Articles so I may have missed some important step in testing. I did a fresh Pull and Merge and npm ci before testing. I see the test instructions say In cassiopeia or other J4 templates nothing changes in the frontend. which makes all this seems very confusing.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.

avatar brianteeman
brianteeman - comment - 1 Apr 2021

Exact same findings as @ceford

avatar frostmakk
frostmakk - comment - 1 Apr 2021

The column-2 style seems to do nothing.

The class is plural form columns-2
I strongly believe there should be some kind of lookup to aid the user here.
Currently available classes like masonry-3, image-left, image-right, image-bottom & image-alternate are still among the "secret" classes.

avatar chmst chmst - change - 2 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst
chmst - comment - 2 Apr 2021

@ceford for this PR no npm is needed, it was a typo in the description. With for example "columns-2 boxed" you will get 2 columns.
Thank you @frostmark, I changed the description.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.

avatar chmst chmst - change - 2 Apr 2021
Labels Added: ?
Removed: ?
avatar astridx
astridx - comment - 2 Apr 2021

I have tested the PR. And it all worked. Here are a few thoughts.

  • Is it possible to separate the fields that are shown and hidden by showon. For newbies, and that are almost all when switching to Joomla 4, the orientation would be easier. A little more space would be helpful.

Menus Edit Item TestBlogLayout Administration(1)

  • Is it possible to show a hint with the option Fixed Columns and Direction value as well? If I change the number of columns here, this does not work in every template - also in Cassiopeia. A hint that this depends on the template would be helpful. Especially because it doesn't work in Cassiopeia. Or am i doing something wrong?

  • I see it correctly that the classes of the option CSS Grid with Modifier Classes are set in the template.css of Cassiopeia, right? A template developer may override the option, but if not: Add the info, that it depends on the template in this hint, too.

  • Is it possible to list the classes with the option CSS Grid with Modifier Classes , there are not so many (#18319). There are certainly those who test boxed columns-5 and then are unsure, because only one column is shown. Or write it less detailed and put a reference to the help button in the upper area. Because the # in Generate columns with class columns-# or masonry-#. indicates for me, that I can use what I want.

avatar chmst
chmst - comment - 2 Apr 2021

@astrid thank you - I am on it.

My intention was to enable a migration so that templates after a migration from 3.10 to j4 can be used without changes. It is the same in J3.x, that it depends on the template if multicolumns or the direction is used and cassiopeia does not support it.
I can use the num_columns and transform it to columns-x. But really don't know if this makes sense.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.
avatar brianteeman
brianteeman - comment - 2 Apr 2021

For me it is still a release blocker if both sets of options do not work with the default template

avatar chmst chmst - change - 2 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst
chmst - comment - 2 Apr 2021

I have tried added more description. If this is understandable, we can add an override in cassiopeia so that both layouts grid and num_columns can be used in cassiopeia.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.
avatar chmst chmst - change - 2 Apr 2021
The description was changed
avatar chmst chmst - edited - 2 Apr 2021
avatar chmst chmst - change - 2 Apr 2021
The description was changed
avatar chmst chmst - edited - 2 Apr 2021
avatar chmst chmst - change - 3 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 4 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 4 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 4 Apr 2021
Labels Added: ?
Removed: ?
avatar brianteeman
brianteeman - comment - 4 Apr 2021

I can see what you mean with the text. It needs a little "english tweaking" which I can do if you want.
No idea why you are ignoring my pr to change the spacer to a note :(

avatar Harmageddon
Harmageddon - comment - 5 Apr 2021

Concerning the upload script introduced in #31570: If this PR is merged, there is no need anymore to convert the num_columns to blog classes during 3->4 upgrade. In this case, we can revert most of #31570. The only remaining distinction is the question which style should be enabled during upgrade. I agree with @chmst here:

I see two cases: In both of them, the script is used but simplified:

From 3.10 to 4: I would use the script und add the param "blog_style":"3" to params

From 4.0 beta to 4.0: I would use the script und add the param "blog_style":"4" to params

And as suggested by @brianteeman, we can even get rid of the first case if we set the blog style to "fixed" by default. If we go for the CSS grid style as default, we get rid of the second case instead. In either case, I would provide a PR changing the update script accordingly after this one here is merged.

(Nothing really new to the discussion here, I just wanted to summarize the above discussion about updating/migrating, to clarify that the changes introduced with this PR here can easily be included in the update script.)

avatar chmst
chmst - comment - 5 Apr 2021

@brianteeman my own repo did not send notofications, so did not see your PR, sorry for that. And thank you for the texts.

avatar chmst
chmst - comment - 5 Apr 2021

I have spent some hours yesterday, writing overrides for cassiopeia using the new param blog_style.

But the more time I spent with these params the more I feel that it is wrong. "Don't Make me Think". But this makes me think.

I want to add class like this "myownclass boxed columns-2 image-bottom" to the blog. We use the css grid layout and cassiopeia as prepared / overridden someclasses for it (for example .boxed a,d classes for images)
https://github.com/joomla/joomla-cms/blob/4.0-dev/templates/cassiopeia/scss/blocks/_modifiers.scss#L83

Expereinced users can enter this in the input field blog_class as they want.

Unexperienced users or users who come from J3 are better served with the possibility to define a number of columns and the order of the articles in the columns. This is possible now, but the param blog_style introduced in this PR is not really self explaining and not really helpful.

So why not simple accept both: A Free definded classes for everything and num columns and ordering?

The advantage:

  • Migration from J3 is possible without changes, we need no script at all
  • Users can classes from cassiopiea (i.e. boxed) or custom classes
  • No new parameter which probably will not be used
  • In the layout, it is very simple to make columns-x or masonry-x from the two number fields.

It could look like here:

grafik

avatar brianteeman
brianteeman - comment - 5 Apr 2021

@chmst assuming that I understand you correctly that is perfect and what we've wanted since the beginning.. For whatever reason we were told that this was wrong and that it had to be classes only - hence the release blocker and the "compromise" you originally proposed.

avatar frostmakk
frostmakk - comment - 5 Apr 2021

What's with all this migration talk?
The purpose of this form should be to present the users with all the options available, and how to use them, in the most self explanatory way possible, to enable them to create the blog they want.
When that purpose is fulfilled, the number of columns in the old template becomes more or less irrelevant, and can be set to default values. When the users discover how to control the CSS grid with the classes provided to them, they will experiment for hours, and it will be one of the most positive experiences they get from J4.

avatar chmst chmst - change - 5 Apr 2021
Labels Added: ?
Removed: ?
avatar brianteeman
brianteeman - comment - 5 Apr 2021

they will experiment for hours,

If they have to do that then Joomla is dead in the water

avatar chmst
chmst - comment - 5 Apr 2021

@frostmakk experienced users can do that. They can experiment for hours, we don't cut anything with these changes.
But for unexperienced users it hopefully is easier now.

avatar chmst chmst - change - 5 Apr 2021
The description was changed
avatar chmst chmst - edited - 5 Apr 2021
avatar frostmakk
frostmakk - comment - 5 Apr 2021

If they have to do that then Joomla is dead in the water

They don't have to.
They will do it in pure joy over the powers given to them.

avatar chmst
chmst - comment - 5 Apr 2021

With the last changes, user can define their classes free.

Either in the class field as for example "boxed image-right masonry-3"
Or as in J3 enter a number of columns and a ordering.

What now could happen: A user writes class "column-3" into the class field and then sets num_columns to 2. This would result in a class like "column-3 column-2". No idea how to avoid this.

avatar ChristineWk
ChristineWk - comment - 5 Apr 2021

What now could happen: A user writes class "column-3" into the class field and then sets num_columns to 2. This would result in a class like "column-3 column-2". No idea how to avoid this.

Hmm :-) A note: class cannot (or should) be named in the same way as column numbers

avatar richard67
richard67 - comment - 5 Apr 2021

What now could happen: A user writes class "column-3" into the class field and then sets num_columns to 2. This would result in a class like "column-3 column-2". No idea how to avoid this.

@chmst We could use the average, "column-2.5" ;-) (forgive me my silly joke)

avatar chmst chmst - change - 9 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 9 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 12 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 12 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 18 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 18 Apr 2021
Labels Added: ?
Removed: ?
avatar chmst chmst - change - 22 Apr 2021
The description was changed
avatar chmst chmst - edited - 22 Apr 2021
avatar chmst chmst - change - 22 Apr 2021
The description was changed
avatar chmst chmst - edited - 22 Apr 2021
avatar michwebdev michwebdev - test_item - 23 Apr 2021 - Tested successfully
avatar michwebdev
michwebdev - comment - 23 Apr 2021

I have tested this item successfully on d236a2e

What I observed is that the patch makes changes to a blog menu item configuration in the Blog Layout editing tab. The patched version is a more intuitive layout.

One issue I noticed with the layout is that when the screen width is under 1450 px, the "Multi Column Direction" and "Date for Ordering" fields extend outside of the border around the editing area.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.

avatar BrentCritch BrentCritch - test_item - 23 Apr 2021 - Tested successfully
avatar BrentCritch
BrentCritch - comment - 23 Apr 2021

I have tested this item successfully on d236a2e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.

avatar richard67
richard67 - comment - 23 Apr 2021

One issue I noticed with the layout is that when the screen width is under 1450 px, the "Multi Column Direction" and "Date for Ordering" fields extend outside of the border around the editing area.

That's a know issue, we are working on it.

avatar richard67 richard67 - change - 23 Apr 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 23 Apr 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.

avatar cdguillaudeu cdguillaudeu - test_item - 23 Apr 2021 - Tested successfully
avatar cdguillaudeu
cdguillaudeu - comment - 23 Apr 2021

I have tested this item successfully on d236a2e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.

avatar Quy Quy - change - 23 Apr 2021
Labels Added: ? ?
Removed: ?
avatar frostmakk
frostmakk - comment - 23 Apr 2021

Another wasted opportunity to give new users the wow experience that Joomla needs right now.
CSS grid is a novelty in J, and classes are the new toys to play with.
Give the users a proper interface with classes to choose from, not this unclear halfway something solution.
This is just sad.

avatar richard67
richard67 - comment - 23 Apr 2021

Another wasted opportunity to give new users the wow experience that Joomla needs right now.
CSS grid is a novelty in J, and classes are the new toys to play with.
Give the users a proper interface with classes to choose from, not this unclear halfway something solution.
This is just sad.

@frostmakk You are just ignoring here the answers you have already been given in previous comments. This PR removes nothing of the flexibility you have for that which is already there in J4, it just offers an additional possibility to do it also in the other way which many people seem to prefer.

avatar N6REJ
N6REJ - comment - 23 Apr 2021

If they have to do that then Joomla is dead in the water

They don't have to.
They will do it in pure joy over the powers given to them.

not at all! I can tell you as a VERY experienced person that the minute you start trying to "make life simple" for me, you hinder me greatly and make my job 100x harder.
A simple example is helix. powerful UI.. nightmare for me to "customize" to the degree that I'm paid for from within the ui itself.

avatar Quiviro Quiviro - test_item - 23 Apr 2021 - Tested successfully
avatar Quiviro
Quiviro - comment - 23 Apr 2021

I have tested this item successfully on 4ef5eee

I changed the content options of the menu item and it reflects in the blog layout


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.

avatar TLWebdesign TLWebdesign - test_item - 23 Apr 2021 - Tested successfully
avatar TLWebdesign
TLWebdesign - comment - 23 Apr 2021

I have tested this item successfully on 4ef5eee


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32943.

avatar frostmakk
frostmakk - comment - 23 Apr 2021

Is my English really that bad?
None of You have understood what I am trying to communicate.

avatar chmst
chmst - comment - 23 Apr 2021

@frostmakk maybe my understanding of English is so bad. This is what I understand.
You would like the opportunity to use the full concept of css grid classes for the blog Layout. And you think that our layout should prepare all possibilities in a way that they must not know the grid concept or classes.

avatar frostmakk
frostmakk - comment - 23 Apr 2021

I would like the users to be able to do a lookup of all the available classes in the template, and select the combinations they want.
The lookup and selection could be a separate popup window or whatever you call a dialogue form.
The input field should then be populated with the selection.
Experienced users can put whatever they want in the input fields without using the lookup.

avatar rdeutz rdeutz - close - 24 Apr 2021
avatar rdeutz rdeutz - merge - 24 Apr 2021
avatar rdeutz rdeutz - change - 24 Apr 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-04-24 08:03:29
Closed_By rdeutz
Labels Added: ? ?
Removed: ? ?
avatar frostmakk
frostmakk - comment - 24 Apr 2021

Sacrificed on the Release Blocker altar.

Add a Comment

Login with GitHub to post a comment