Follow-up for PR #36551 and issue #36548
In that PR, the input select for list Custom Fields was improved from the raw HTML select, to being rendered with the choices.js script.
to this (which is similar to what we had in J3)
This is great.
However, this was not implemented as a straight replacement for the old style, but as a setting under the "Options" tab when creating a list custom field, where you have to set it to "enhanced select".
Here are my comments to this:
Where the setting was placed, it's the wrong placement for this setting.
The "Options" tab is dedicated to global settings that are shared by all field types. It's not the place to add type-specific settings.
Options tied to specific types of fields should be added in the first "General" tab. This is what has always been done for all field types and field settings.
So this new "Form Layout" should be moved under the "General" tab. For example, under the "Multiple" setting:
I would argue: do we really need a setting? The other "raw" layout is ugly and unusable. I don't think anyone will ever want to use it.
Why have the "bad" version at all? Let alone having it by default, and the "enhanced select" behind an option?
The new one it's just better, and it's similar to what he had in J3. In J3 we straight had the chosen.js style, with no need to turn on/off an option. Here we can/should do the same by simply using the choices.js version.
I personally would just get rid of the old layout altogether, and simply implement the "enhanced select" as the only display. Like we had in J3. What do you think? @laoneo
Labels |
Added:
No Code Attached Yet
|
Title |
|
This was done due backwards compatibility. Feel free to make a pr and change it in 4.2. Problem is that on update you need to convert all the existing field when they have no value set to the old one.
If you mean the setting selection, I don't see why. My main suggestion here is to completely scrap the "raw" display. It's ugly and unusable, nobody would ever want it like that. So removing it, and only using the choices.js for all cases.
Or even if you keep the "raw" style as an alternative version, you don't need to worry about BC or converting anything to the "raw" style. Changing it/removing it would be an improvement. Nobody in the right mind would prefer the raw style
Joomla 3 was already using the chosen-style display, this "raw" style is only in Joomla 4 and was never in Joomla 3. So Joomla 4 actually got a downgrade with this "raw" style. There's no backward compatibility to worry about here.
I can't make a PR because I don't know what I need to change to implement this. That's why I'm asking you. Otherwise I would have made it already
But Joomla 4 was shipped with that behavior and maybe some templates are using a different select script now. When you force now the fancy select, then it can lead to conflicts. That's why it is an option with default value the old behavior in Joomla 4.
Well, I strongly doubt that there are any situations like that at all. But ok, let's work around that.
So thinking about a quick win here that doesn't cause BC break, would be at least implementing a global plugin setting for this.
So, moving this setting in the first main tab, eg, in this position:
And in the global settings for each field, add a default option, with the default for each field being "Use settings from Plugin". This way you can set a global preference instead of having to set it manually for each field you ever create.
Makes sense?
Yes, sounds like a solid plan.
I'm trying to create a PR for this, I should be able to do it.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-03-19 15:59:09 |
Closed_By | ⇒ | AndySDH |
Can you help with this @laoneo ?