? Pending

User tests: Successful: Unsuccessful:

avatar Ruud68
Ruud68
16 Jun 2020

Pull Request for Issue # .

Summary of Changes

icon-back non existing in Joomla! 4.0, replaced it with icon-arrow-left (which is the same)

Testing Instructions

Add toolbar button with ToolbarHelper::back()

Expected result

Selection_002

Actual result

Selection_001

Documentation Changes Required

no

avatar Ruud68 Ruud68 - open - 16 Jun 2020
avatar Ruud68 Ruud68 - change - 16 Jun 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Jun 2020
Category Libraries
avatar Quy
Quy - comment - 16 Jun 2020

It should handle RTL.

avatar infograf768
infograf768 - comment - 16 Jun 2020

It should handle RTL.

Not sure about that. Example: using Open a New Tab in a browser always creates the tab to the right of the open one.

avatar Quy
Quy - comment - 16 Jun 2020

Switch to Persian.
Enable Workflows.
Edit Basic Workflow.
Click Stages badge.
See back button using right-arrow.

This PR sets it to always be left-arrow so this method cannot be used in RTL.

29638

avatar Quy
Quy - comment - 16 Jun 2020

Plus, this is about going back and not opening a new tab.

avatar infograf768
infograf768 - comment - 16 Jun 2020

OK

avatar brianteeman
brianteeman - comment - 16 Jun 2020

Open a New Tab in a browser always creates the tab to the right of the open one.

Sorry that's not correct. At least in chrome the new window opens to the left in both hebrew and arabic

arabic

hebrew

avatar infograf768
infograf768 - comment - 16 Jun 2020

At least in chrome the new window opens to the left in both hebrew and arabic

Good to know.

avatar Ruud68
Ruud68 - comment - 16 Jun 2020

LOL... this is just a replacement of a broken icon, not about adding rtl to an existing button that doesn't have rtl.
@Quy what you are referring to in the workflow component is NOT using the ToolbarHelper::back() but constructs the link that the page is routed back to. A lot of code that could have been implemented easier...

I have no idea about rtl so I also have no clue as to whether a back button in rtl should be 'back >' or 'back <' or '>back' or '< back' (the last one as it currently is in J3)

I am just replacing the < icon with the < icon making the assumption that < is the correct icon as that was always the case

avatar Quy Quy - test_item - 16 Jun 2020 - Tested successfully
avatar Quy
Quy - comment - 16 Jun 2020

I have tested this item successfully on f96c61b

RTL can be fixed in a separate PR.


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

avatar Ruud68
Ruud68 - comment - 16 Jun 2020

RTL can be fixed in a separate PR.

I can do it in this PR, but as said, then somebody should set the requirement as to the position / direction of the <, >

avatar Quy
Quy - comment - 16 Jun 2020

See my screenshot above for RTL pointing to the right. Thank you!

avatar richard67
richard67 - comment - 16 Jun 2020

@Ruud68 For LTR/RTL handling you could do it like here:

https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_workflow/src/View/Transitions/HtmlView.php#L166

$arrow = Factory::getLanguage()->isRtl() ? 'arrow-right' : 'arrow-left';

and then

$bar->appendButton('Link', $arrow, $alt, $href);

or maybe all in one:

$bar->appendButton('Link', Factory::getLanguage()->isRtl() ? 'arrow-right' : 'arrow-left', $alt, $href);

avatar infograf768
infograf768 - comment - 16 Jun 2020

I prefer in 2 lines. 😺

avatar wilsonge wilsonge - close - 16 Jun 2020
avatar wilsonge wilsonge - merge - 16 Jun 2020
avatar wilsonge wilsonge - change - 16 Jun 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-06-16 16:53:07
Closed_By wilsonge
Labels Added: ?
avatar wilsonge
wilsonge - comment - 16 Jun 2020

Thanks!

avatar richard67
richard67 - comment - 16 Jun 2020

@Ruud68 Will you make a new PR for RTL?

avatar Ruud68
Ruud68 - comment - 16 Jun 2020

@richard67 yes, will do tomorrow

Add a Comment

Login with GitHub to post a comment