? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
2 Feb 2018

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 ?

Summary of Changes

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.

Testing Instructions

Expected result

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".

Actual result

Nothing is shown

Documentation Changes Required

None

avatar Bakual Bakual - open - 2 Feb 2018
avatar Bakual Bakual - change - 2 Feb 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Feb 2018
Category Libraries
avatar ggppdk
ggppdk - comment - 2 Feb 2018

I ll test later today

This PR is useful , because with it we do not have the requirement that all 3rd parties

  • create a layout override just for adding the tooltip !

... 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

avatar Bakual Bakual - change - 2 Feb 2018
Labels Added: ?
avatar wilsonge
wilsonge - comment - 2 Feb 2018

I've manually patched the typo direct to 4.0 (thanks!!) so we can focus on the layout changes here :)

avatar dgt41
dgt41 - comment - 2 Feb 2018

Just couple notes here:

  • J4 will not use the bootstrap tooltips (meaning the class hasTooltip will be useless)
  • J4 will have a new tooltip (meaning the HTML and the CSS and possibly the JS will be totally different , eg either only CSS or Custom Element).

So one way or another this layout (with or without the description) will not be B/C to 3.x ones.

avatar wilsonge wilsonge - change - 2 Feb 2018
The description was changed
avatar wilsonge wilsonge - edited - 2 Feb 2018
avatar wilsonge wilsonge - change - 2 Feb 2018
The description was changed
avatar wilsonge wilsonge - edited - 2 Feb 2018
avatar wilsonge wilsonge - change - 2 Feb 2018
The description was changed
avatar wilsonge wilsonge - edited - 2 Feb 2018
avatar Bakual
Bakual - comment - 2 Feb 2018

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.

avatar ggppdk
ggppdk - comment - 3 Feb 2018

I have tested this item successfully on 45f1c77

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


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

avatar ggppdk ggppdk - test_item - 3 Feb 2018 - Tested successfully
avatar wilsonge
wilsonge - comment - 5 Feb 2018

Sorry I merged the PR that converted the form field to layouts. Going to need an update here

avatar Bakual
Bakual - comment - 5 Feb 2018

No problem. Will look at it later today.
For my reference: #19507

avatar joomla-cms-bot joomla-cms-bot - change - 5 Feb 2018
Category Libraries Layout
avatar Bakual
Bakual - comment - 5 Feb 2018

Redid the PR for the new JLayout.

avatar joomla-cms-bot joomla-cms-bot - change - 5 Feb 2018
Category Layout Layout Libraries
avatar Bakual
Bakual - comment - 5 Feb 2018

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.

avatar Anu1601CS
Anu1601CS - comment - 5 Feb 2018

@Bakual Thanks,
Should we also need tooltip in select option. ?

avatar Bakual
Bakual - comment - 5 Feb 2018

Should we also need tooltip in select option. ?

The way it is now is the same as it was before PR #19285.
I think that was sufficient.

avatar Anu1601CS
Anu1601CS - comment - 5 Feb 2018

Ok, also we need to add language files

avatar Bakual
Bakual - comment - 5 Feb 2018

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.

avatar dgt41
dgt41 - comment - 5 Feb 2018

@Bakual can you also correct the doc blocks in both files, they're a bit off...

avatar Anu1601CS
Anu1601CS - comment - 5 Feb 2018

Ok, this change only for 3rd parties if they want to show a description.
That's why this PR.
Thanks

avatar Bakual
Bakual - comment - 5 Feb 2018

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.

avatar Anu1601CS
Anu1601CS - comment - 5 Feb 2018

@Bakual I am going to correct the doc block variable.
Should I move joomla/form/field/rules/tabs.php to joomla/form/field/rules.php ? In my PR

avatar Bakual
Bakual - comment - 5 Feb 2018

You can fix it in the original place. Gives less conflicts. Git will figure out the file moving itself.

avatar infograf768
infograf768 - comment - 7 Feb 2018

Branch out of date

avatar Bakual
Bakual - comment - 7 Feb 2018

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 ?

avatar brianteeman
brianteeman - comment - 7 Feb 2018

@Bakual that is correct

avatar laoneo
laoneo - comment - 3 Apr 2018

Can we get some retests here to make sure we do not break anything. Thanks.

avatar infograf768
infograf768 - comment - 4 Apr 2018

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.

screen shot 2018-04-04 at 11 08 24

avatar infograf768
infograf768 - comment - 4 Apr 2018
avatar Bakual
Bakual - comment - 4 Apr 2018

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.

avatar infograf768
infograf768 - comment - 4 Apr 2018

if i patch with this pr, the permissions tab does display nothing. will try with a fresh install

avatar Bakual
Bakual - comment - 4 Apr 2018

Maybe the patchtester can't deal correctly with file movings?

avatar infograf768
infograf768 - comment - 4 Apr 2018

@Bakual
I never use patchtester . :)

OK. I now patched after updating the layout folder.

All works fine here. This should be merged now before we have more changes . ?

avatar laoneo laoneo - change - 4 Apr 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-04-04 15:42:18
Closed_By laoneo
avatar laoneo laoneo - close - 4 Apr 2018
avatar laoneo laoneo - merge - 4 Apr 2018

Add a Comment

Login with GitHub to post a comment