User tests: Successful: Unsuccessful:
Status | New | ⇒ | Pending |
Category | ⇒ | com_tags Administration com_templates Front End com_users Templates (site) |
I have tested this item
@dgrammatiko No, it's coming from #19296. Anyways, here's PR #26214 to remove class-based logic.
Wasn't the switch rewritten to drop the custom element?
Yes and its nothing to do with this PR
Labels |
Added:
?
|
OK if the extra class here doesn't exist why are we getting the double label (this "fix" is clearly not wrong - but suggests there might also be a css issue in the switcher field we need to fix if extra classes are causing styling issues that is being revealed here).
It's coming from here:
joomla-cms/libraries/src/Form/FormField.php
Line 952 in 27e4d28
Why is switcher-specific code included in this class is beyond me. I proposed to remove this along with class-based layout assignment.
Why is switcher-specific code included in this class is beyond me.
Because it has it's own label
@dgrammatiko That doesn't explain why something specific to Joomla\CMS\Form\Field\RadioField
is handled in Joomla\CMS\Form\FormField
.
@SharkyKZ I will agree, this leak in the parent class is unacceptable. FWIW this new css-only implementation has few more flaws, one is that it broke the layouts comparison but most importantly the fact that it doesn't provide any meaningful API for DEVs to use it (meaning you have to implement your own logic)
But hey, it is javascript free...
If only it had been tested
If I rightly remember, the logic was in the layout when I first added the switcher. From then on, I did not follow the code changes, so I'm the wrong person to be tagging in this
FWIW @SharkyKZ wrongly blames me for this code as it was there before #19296 as anyone can see:
https://github.com/joomla/joomla-cms/pull/19296/files#diff-5672706c28da6ae7d160c2c45b37d279L57
All I did in #19296 was to separate the layouts, the logic for the class was already there...
I'm happy to take the blame on any of the code I introduced but it's unfair to take the blame for other peoples code
All of these comments are interesting but completely off topic. This PR is about removing a class that does not exist and whose presence is breaking the layout. Anything else should be dealt with in its own issue
and that can be looked at in its own pull request. removing the extra unused class will have to be removed anyway
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-10-19 14:21:59 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks!
Thanks
Given that
switcher-primary
class doesn't exist this PR is fine. But it doesn't solve the root cause. For some reason known only to @dgrammatiko radio field is using class attribute to select a layout instead of using the layout attribute.