No Code Attached Yet
avatar pepperstreet
pepperstreet
25 Jul 2021

Hello, I just got into trouble with the changes in PR #34391. It totally messed up a site, where I used custom fields and their custom CSS class parameters extensively. I was really surprised about the sudden display issues after J!3.9.28 update... So, here is what happened to me and probably other users:

Possible Issue:

With PR #34391 you get two(!) class outputs: The first on the default list DD element with class "field entry", and a second output on the SPAN element and its actual field value. Before that PR, the field render class was already in the fieldS render layout!

Example

You want to style a certain field and its value/s. For instance, if you use CSS classes from your favorite framework like: well , alert , badge or something similar, you will get a doubled, nested styling. Which messes up the entire display.

I see the structural logic why the class has been added to the field layout file... but it was not really missing, because in previous Joomla versions it was already applied in the fieldS layout. IMHO, the current default class output is not optimal. I am not sure at the moment, if there is a better solution. Or if it makes sense to change the fieldS render layout as well. Actually, I liked the possibility to add a custom class to the entire field output. So, simply removing the first class output is not an option. And only one output at the value would not allow to style the entire appearance. Especially, when you have a multi-value field, you might need to style the surrounding element and all those values at once! So, you get some sort of visual grouping.

I think, this needs some further discussion and optimization.

Additional thoughts/Ideas:

You may have noticed that the fieldS render file adds a class "field-entry". Currently all fields get that same class. Wouldn't it make sense to add the unique field ID as a class? Maybe also the field Alias too? That would allow to target and style each field separately. Probably that would make the first render class output obsolete, and the newer output on the field VALUE span element makes more sense, i.e. does not destroy any existing style.

Originally posted by @pepperstreet in #34391 (comment)

avatar pepperstreet pepperstreet - open - 25 Jul 2021
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jul 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Jul 2021
avatar pepperstreet pepperstreet - change - 25 Jul 2021
The description was changed
avatar pepperstreet pepperstreet - edited - 25 Jul 2021
avatar pepperstreet pepperstreet - change - 26 Jul 2021
The description was changed
avatar pepperstreet pepperstreet - edited - 26 Jul 2021
avatar pepperstreet pepperstreet - change - 26 Jul 2021
The description was changed
avatar pepperstreet pepperstreet - edited - 26 Jul 2021
avatar pepperstreet pepperstreet - change - 28 Jul 2021
Title
[3.9] Custom Fields : Render Class - possible display issues with PR #34391
[3.9] [4.0] Custom Fields : Render Class - possible display issues with PR #34391
avatar pepperstreet pepperstreet - edited - 28 Jul 2021
avatar pepperstreet pepperstreet - change - 2 Aug 2021
The description was changed
avatar pepperstreet pepperstreet - edited - 2 Aug 2021
avatar AndySDH
AndySDH - comment - 14 Sep 2021

I'm surprised this isn't getting more attention. I'll create a PR for this.

avatar AndySDH
AndySDH - comment - 14 Sep 2021

Please test PR #35559 @pepperstreet

avatar alikon alikon - close - 14 Sep 2021
avatar alikon
alikon - comment - 14 Sep 2021

close as we have a pr #35559

avatar alikon alikon - change - 14 Sep 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-09-14 12:05:16
Closed_By alikon
Labels Added: No Code Attached Yet
Removed: ?

Add a Comment

Login with GitHub to post a comment