? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
3 Jan 2022

Pull Request for Issue #36548.

Summary of Changes

Makes the form layout for custom field configurable. Actually only for the following fields:

  • list
  • sql
  • radio

Any suggestions for language strings?

Testing Instructions

  • Create a list custom field where multiple is set to yes
  • Change the form layout to enhanced list in the options tab
  • Edit an article

Actual result BEFORE applying this Pull Request

The list is rendered with the default select HTML Element.

Expected result AFTER applying this Pull Request

The list is rendered with the choices.js script.

avatar laoneo laoneo - open - 3 Jan 2022
avatar laoneo laoneo - change - 3 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Jan 2022
Category Administration com_fields Language & Strings Front End Plugins
avatar brianteeman
brianteeman - comment - 3 Jan 2022

Is this small bug part of this pr?

radio

avatar brianteeman
brianteeman - comment - 3 Jan 2022

Otherwise everything looks great to me

avatar laoneo
laoneo - comment - 3 Jan 2022

No, this looks like an init issue on the JS part which I didn't touch. But could also not reproduce the issue on my end.

avatar brianteeman
brianteeman - comment - 3 Jan 2022

ok

avatar brianteeman
brianteeman - comment - 3 Jan 2022

I have tested this item successfully on 5da3d2a


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

avatar brianteeman brianteeman - test_item - 3 Jan 2022 - Tested successfully
avatar Shubhamverma2796
Shubhamverma2796 - comment - 3 Jan 2022

I have tested this item successfully on 5da3d2a


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

avatar Shubhamverma2796 Shubhamverma2796 - test_item - 3 Jan 2022 - Tested successfully
avatar Quy Quy - change - 3 Jan 2022
Status Pending Ready to Commit
Labels Added: ?
avatar Quy
Quy - comment - 3 Jan 2022

RTC


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

avatar crystalenka
crystalenka - comment - 3 Jan 2022

I have tested this item successfully on 5da3d2a

Beautiful!!! Thanks so much, and also for including the radio layout!


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

avatar crystalenka crystalenka - test_item - 3 Jan 2022 - Tested successfully
avatar crystalenka
crystalenka - comment - 3 Jan 2022

I reproduced part of Brian's issue. It's because the layout expects the values to be in the order of No - Yes; if they are flipped, it doesn't respect that. I'm wondering if there is any way to detect the values of 0/1 or true/false or yes/no and make it a bit 'smarter'? I'm not sure this is something that would prevent merging the PR, but wanted to clarify the bug.


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

avatar laoneo
laoneo - comment - 3 Jan 2022

Thanks for clarification. When the order mathers, then we need to mention this in the docs.

If this should be handled on the code side, then I would do it in another pr.

avatar bembelimen bembelimen - change - 6 Jan 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-01-06 11:47:27
Closed_By bembelimen
Labels Added: ?
avatar bembelimen bembelimen - close - 6 Jan 2022
avatar bembelimen bembelimen - merge - 6 Jan 2022
avatar bembelimen
bembelimen - comment - 6 Jan 2022

Thx

avatar laoneo
laoneo - comment - 6 Jan 2022

Can you guys also test #36553 which does the same for the color field.

avatar AndySDH
AndySDH - comment - 26 Feb 2022

@laoneo I just ran into this and I noticed this is 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 all the fields in which you added it. For example, under the "Multiple" setting:

image

But: Do we even need this setting at all?

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.

The new one it's just better, and it's similar to what he had in J3.

I personally would just implement the "enhanced select" by default, and get rid of the other layout altogether. Like we had in J3. What do you think?

avatar laoneo
laoneo - comment - 28 Feb 2022

Please open a new issue, so it can be discussed properly as this pr is closed.

Add a Comment

Login with GitHub to post a comment