User tests: Successful: Unsuccessful:
Pull Request for Issue #29611 and #29709 .
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)
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
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
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
yes, same changes as made for the 'hiddenLabel' attribute
Status | New | ⇒ | Pending |
Category | ⇒ | Layout Libraries |
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"
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend
whats wrong with note
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)
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?
Labels |
Added:
?
|
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 :)
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.
@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.
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...")
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-09-22 17:42:36 |
Closed_By | ⇒ | wilsonge |
I think this makes sense and can see from the screenshot above the justification. So merging on review. Thanks!
Thanks for merging!
Not checked this yet but legend has a specific meaning which is not this so it would be better to use some other name