? Pending

User tests: Successful: Unsuccessful:

avatar Ruud68
Ruud68
19 Jun 2020

Pull Request for Issue #29611 and #29709 .

Summary of Changes

  1. This PR fixes #29709
  2. This PR adds form attribute 'hiddenLegend' and fixes #29611

the PR introduces a new hiddenLegend form attribute that can be set in the xml file as attribute for toggling the legend on any field) or in the layout file to give the attribute an initial value (defaults to true when not set)

Testing Instructions

1.1 add form attribute hiddenLabel="false" to a form field
2.1 add a form field type Note to a config file
2.2 add form attribute hiddenLegend="false" to the 2.1 added field
2.3 add form attribute hiddenLegend="true" to a form field

Expected result

1.1 the label for the form field should NOT ( = false) be hidden
2.1 the legend for the Note field (which is the description that is part of the Note field) should not be displayed
2.2 the legend for the Note field should be DISPLAYED
2.3 the legend for the form field that you added the attribute to should be HIDDEN

Actual result

whithout this PR:
1.1 the label for the form field IS hidden
2.1 the legend IS shown with the same information as the note itself
2.2 the legend IS shown with the same information as the note itself
2.3 the legend IS shown for the form field that you added the attribute to

Documentation Changes Required

yes, same changes as made for the 'hiddenLabel' attribute

avatar Ruud68 Ruud68 - open - 19 Jun 2020
avatar Ruud68 Ruud68 - change - 19 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Jun 2020
Category Layout Libraries
avatar brianteeman
brianteeman - comment - 19 Jun 2020

Not checked this yet but legend has a specific meaning which is not this so it would be better to use some other name

avatar Ruud68
Ruud68 - comment - 19 Jun 2020

Not checked this yet but legend has a specific meaning which is not this so it would be better to use some other name

I am dutch so all sounds good in English :)
If you have a better name please let me know

Legend: "the words written on or next to a picture, map, coin, etc., that explain what it is about or what the symbols on it mean"

avatar brianteeman
brianteeman - comment - 19 Jun 2020
avatar Ruud68
Ruud68 - comment - 19 Jun 2020

whats wrong with note

if users now that we mean this, then we are good I guess, your call. If it is okay with you the I refactor
Selection_002

avatar Ruud68
Ruud68 - comment - 19 Jun 2020

But then again, that might be confusing when applying it to a note field where you then set hiddenNote... what are we hiding here, the note or the note field?
So maybe hiddenDescription? as that is what we are hiding in the code (description value)

avatar richard67
richard67 - comment - 20 Jun 2020

So maybe hiddenDescription? as that is what we are hiding in the code (description value)

Makes sense to me, "hiddenDescription". @brianteeman What do you think?

avatar Ruud68 Ruud68 - change - 22 Jun 2020
Labels Added: ?
avatar Ruud68
Ruud68 - comment - 22 Jun 2020

So just renamed legend to description. i also set the hiddenLabel to true on the Note field as this field doesn't have a label.
Let the testing begin :)

avatar SharkyKZ
SharkyKZ - comment - 8 Jul 2020

My 2c: introducing hiddenLabel attribute to base form field class might have been a mistake and same for this. If fields are misusing properties used in used in wrapper layout, they should come with their own layout.

avatar Ruud68
Ruud68 - comment - 8 Jul 2020

@SharkyKZ using a seperate layout will not change the fact that everything goes through the renderer. What is basically wrong is that the renderer does more then render, it adds things that should be handled by the layout. (the description in this case). So when you remove that from the renderer, then you must refactor all (!) layout files to handle the description: that is a lot of code redundancy. This PR is not about refactoring all fields, it is about building and extending what is already there. changing layouts will most likely also break b/c as implemented layout overrides are then also impacted.

avatar Ruud68
Ruud68 - comment - 17 Sep 2020

Working on 'fitting' my extensions into the Joomla 4.0 administrator UI.

Ran into this issue again where notes used to instruct users (you know, for a better UX) are totally useless and confusing as the notes contents are displayed twice...

trying to get some traction for this PR (you know: "hey extension devs, help us because you are the ones using it...")
screen shot 2020-09-17 at 09 42 51


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

avatar wilsonge wilsonge - change - 22 Sep 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-09-22 17:42:36
Closed_By wilsonge
avatar wilsonge wilsonge - close - 22 Sep 2020
avatar wilsonge wilsonge - merge - 22 Sep 2020
avatar wilsonge
wilsonge - comment - 22 Sep 2020

I think this makes sense and can see from the screenshot above the justification. So merging on review. Thanks!

avatar Ruud68
Ruud68 - comment - 23 Sep 2020

Thanks for merging!

Add a Comment

Login with GitHub to post a comment