User tests: Successful: Unsuccessful:
With #19285, the possibility to add a description to a custom rule was removed.
@wilsonge reverted part of the change so it should still be possible to set a description, but he made a typo in his revert
This PR fully restores the possibility to set and display a description in the rules field.
It incorporates a check for the presence of the description so the rules that no longer have a description don't show a tooltip.
A description is shown
Please note that the tooltip itself is broken due to Bootstrap tooltips not being loaded on that page. The method used in core is JHtml::tooltipText()
which doesn't load Bootstrap by itself. Same issue exists in other places (eg extension manager) as well and needs to be fixed independant of this PR.
The description will show as a native "title".
Nothing is shown
None
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I've manually patched the typo direct to 4.0 (thanks!!) so we can focus on the layout changes here :)
Just couple notes here:
So one way or another this layout (with or without the description) will not be B/C to 3.x ones.
So one way or another this layout (with or without the description) will not be B/C to 3.x ones.
Of course. Along with a lot of other layouts that need to be adjusted to the new way once that work is done.
I have tested this item
Tooltip is shown when description is added to the XML
when description is not present in XML, then no tooltip shown
About the new tooltip JS, yes i understand that 'hasTooltip' class will be found and replaced when new tooltips are added
now it has no special effect, and the tooltip is shown as browser tooltip after 1s of hovering over the rule label
Sorry I merged the PR that converted the form field to layouts. Going to need an update here
Category | Libraries | ⇒ | Layout |
Redid the PR for the new JLayout.
Category | Layout | ⇒ | Layout Libraries |
Please note: After checking with @Anu1601CS I also move the JLayout to a more proper place.
Name from joomla/form/field/rules/tabs.php
to joomla/form/field/rules.php
.
Ok, also we need to add language files
Ok, also we need to add language files
Why? Core doesn't use descriptions anymore, thus no language strings. If 3rd parties want to show a description, they need to add them of course.
Ok, this change only for 3rd parties if they want to show a description.
That's why this PR.
Thanks
can you also correct the doc blocks in both files, they're a bit off...
I'm not sure what you mean. Anyway I didn't touch them and I don't want to stuff more into this PR than needed.
You can fix it in the original place. Gives less conflicts. Git will figure out the file moving itself.
Branch out of date
It's out of date as soon as something is merged into 4.0-dev. However it doesn't have any conflicts, right?
So this should be still testable without me merging in 4.0 every day
Can we get some retests here to make sure we do not break anything. Thanks.
I guess there was a change in RulesField since this PR was proposed which breaks the permissions display
@@ -39,7 +39,7 @@ class RulesField extends FormField
* @var string
* @since __DEPLOY_VERSION__
*/
- protected $layout = 'joomla.form.field.rules.tabs';
+ protected $layout = 'joomla.form.field.rules';
should be taken off from this PR. We need the joomla.form.field.rules.tabs
layout to display the permissions.
We have here another issue which is the way the TIP is displayed.
To test, I re-added a description constant for com_content.
We have here another issue which is the way the TIP is displayed.
That is expected as I wrote in the PR description under "Expected result"
Please note that the tooltip itself is broken due to Bootstrap tooltips not being loaded on that page. The method used in core is JHtml::tooltipText() which doesn't load Bootstrap by itself. Same issue exists in other places (eg extension manager) as well and needs to be fixed independant of this PR.
The description will show as a native "title".
I guess there was a change in RulesField since this PR was proposed which breaks the permissions display
See: #19536 (comment)
Please note: After checking with @Anu1601CS I also move the JLayout to a more proper place.
Name from joomla/form/field/rules/tabs.php to joomla/form/field/rules.php.
Should be all as expected.
if i patch with this pr, the permissions tab does display nothing. will try with a fresh install
Maybe the patchtester can't deal correctly with file movings?
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-04-04 15:42:18 |
Closed_By | ⇒ | laoneo |
I ll test later today
This PR is useful , because with it we do not have the requirement that all 3rd parties
... and then breaking if the CORE layout is updated with something important
and also it is benefitial to the CORE, at any time if it is decided that an existing or new ACL rule needs a description (tooltip), then only the XML file will need to be updated