[4.0] Field layout utility classes#32422
Conversation
|
What is the reason for a new So instead of this: Simply do: |
|
None really.. I just replicated #31810. Happy to revert the extra attribute and just use the class attribute if considered the best approach here. |
|
I guess it is more readable as display |
|
I recommend you remove the In your example these would all do the same. I don't see how that makes things clearer or more readable: |
|
A fair point. I have removed the display attribute in favour of applying these classes via the existing class atribute. Title and description have been updated. |
|
Please add |
|
I think this seems logical. Kinda prefer the grid layout to #31810 as well - seems more native/intuitive. I guess what's left is to work through core now and figure out where we do/don't want the column based layouts. Like I still think article options are better with the inline fields overall. Obviously plugins we don't want it etc. |
Might be better visually but they dont work as shown by multiple issues |
I mean it's unclear to me whether grid will have the same issues as we have in (showon i guess would have the same issues - but things like the calendar form field I'd hope wouldn't) |
|
Anyhow thanks @ciar4n ! |
|
Thank you @wilsonge 👍 |
|
Saved me a lot of work for testing which I've scheduled for next weekend ;-) |
|
I will try to test if it solved issue when we use subform |
|
Now someone has to do the work and add classes here and there to the fields so that the backend looks nice again. E.g. for Cassiopeia's template style options I'd think the "span-2-inline stack" should be fine. |
|
@ciar4n My question is here #31810 (comment) I guess I need examples that work. |
|
@wilsonge @brianteeman @ciar4n @richard67 Hello, you know I hope I appreciate you all. But now I do not agree with what you are doing. The backend of Joomla! 4 has now been in place for a few months. And I believe that it was finally accepted by the users. |
|
I've already mentioned above that there is some work to do now: #32422 (comment) |
|
This requires #32488 If merged I will create a PR with some examples. |
|
|
@ciar4n thanks for this function i test it its great but seams doesn't works on fieldset |
|
These classes are designed to work on individual fields rather than a collective of fields (fieldset). I guess technically they can be extended to work on the fieldset, presuming there is a need for it? |
|
Ok it Can be cool to use columns via fieldset more simple to use for basic ux |
@ciar4n As you can see, user @micker mixed up the parent for this attribute. Therefore, the field attribute should be more precise in the name, for example, ContainerClass, CaseClass, ControlClass. |
Pull Request for Issue #25891 .
Summary of Changes
Adds some utility classes that can be applied using the
parentclassattribute. These classes set width and layout of fields...For the option of displaying fields inline / in a row we have...
Offset layout
Field orientation
See examples below....
Testing Instructions
Note: This can be partly tested via browser tools by adding the classes to the
control-groupdiv of a field. Otherwise simply edit xml using the class attribute..Documentation Changes Required
Yes