Skip to content

[4.0.beta1]Fix non existing FA back icon#29638

Merged
wilsonge merged 1 commit intojoomla:4.0-devfrom
Ruud68:toolbarback
Jun 16, 2020
Merged

[4.0.beta1]Fix non existing FA back icon#29638
wilsonge merged 1 commit intojoomla:4.0-devfrom
Ruud68:toolbarback

Conversation

@Ruud68
Copy link
Copy Markdown
Contributor

@Ruud68 Ruud68 commented Jun 16, 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

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jun 16, 2020

It should handle RTL.

@infograf768
Copy link
Copy Markdown
Member

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.

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jun 16, 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

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jun 16, 2020

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

@infograf768
Copy link
Copy Markdown
Member

OK

@brianteeman
Copy link
Copy Markdown
Contributor

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

@infograf768
Copy link
Copy Markdown
Member

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

Good to know.

@Ruud68
Copy link
Copy Markdown
Contributor Author

Ruud68 commented Jun 16, 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

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jun 16, 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.

@Ruud68
Copy link
Copy Markdown
Contributor Author

Ruud68 commented Jun 16, 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 <, >

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Jun 16, 2020

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

@richard67
Copy link
Copy Markdown
Member

richard67 commented Jun 16, 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);

@infograf768
Copy link
Copy Markdown
Member

I prefer in 2 lines. 😺

@wilsonge wilsonge merged commit 1f16ea8 into joomla:4.0-dev Jun 16, 2020
@wilsonge
Copy link
Copy Markdown
Contributor

Thanks!

@wilsonge wilsonge added this to the Joomla 4.0 milestone Jun 16, 2020
@richard67
Copy link
Copy Markdown
Member

@Ruud68 Will you make a new PR for RTL?

@Ruud68
Copy link
Copy Markdown
Contributor Author

Ruud68 commented Jun 16, 2020

@richard67 yes, will do tomorrow

sakiss pushed a commit to sakiss/joomla-cms that referenced this pull request Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants