Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionic 4.0.0 RTL issues #17012

Open
abennouna opened this issue Jan 9, 2019 · 129 comments
Open

Ionic 4.0.0 RTL issues #17012

abennouna opened this issue Jan 9, 2019 · 129 comments
Assignees
Projects

Comments

@abennouna
Copy link
Contributor

@abennouna abennouna commented Jan 9, 2019

This issue is to collect and keep track of RTL bugs vs. master so we can make sure to properly update and fix them.

Below are:

  • a list of some utilities presenting issues in RC.0,
  • and a list of components with tests included in the test suite.

Legend

Symbol Description
Tested. Found compliant.
☑️ Tested. Initially not compliant or Regression. Solved by PR specified in description.
Not necessarily an issue, or not a core-specific issue, or design decision.
⚠️ Not tested. Help needed.
Tested. Not completely compliant. Should list the defects.

Fixed issues

CSS Utilities

  • Text Alignment: text-start, text-end, text-justify, & their responsive versions
  • ☑️ Float Elements: float-start, float-end, & their responsive versions (regression: #17012 (comment)) (PR #18315 solves issue in Chrome)
  • Element Padding: padding-start, padding-end
  • Element Margin: margin-start, margin-end
  • Flex Container Properties: justify-content-start, justify-content-end

Grid

  • Offsetting columns (iOS/MD) (PR: #16702)
  • Push and pull (iOS/MD) (PR: #16702)

Components

  • action-sheet
  • alert:
  • anchor
  • avatar
  • badge
  • button
    • slotted icon in button in iOS
    • slotted icon in button in MD
  • buttons
  • card
  • card-header
  • checkbox
  • chip
  • content
  • datetime
    • ☑️ picker in iOS/MD: fix start/end columns’ horizontal positioning when there are 2 or 3 picker columns (PR #18339)
    • ☑️ with floating or stacked label: the datetime text should stay in the document flow (regression) (PR #18340)
    • picker in iOS/MD: keep the order of columns as in LTR when using time and/or DD/MM/YYYY date format (see #16294) (PR: #17018)
  • fab
    • ☑️ horizontal position: position ion-fab correctly (PR #18325)
  • fab-button
  • footer
  • grid
    • col offsets, push, and pulls: fix offsets, pushs and pulls (PR: #16702)
  • header
  • icon (PR #17196)
    • arrow icons in iOS: automatic invert
    • arrow icons in MD: automatic invert
    • flip-rtl: add property to flip icons
    • detail-icon: use correct direction ("<" instead of ">") (see #14958) (PR: #17016 REVERTED) (PR #17196)
  • img
  • infinite-scroll
  • input (specific floating label issues are listed in the relevant components, and the issue with label and input vertical alignment is not specific to RTL)
  • item (specific select, range, and floating label issues in relevant components)
  • label
    • ☑️ position="floating" in iOS/MD: fix horizontal floating position relative to ion-item (PR #18315)
  • list
  • loading
  • menu
  • menu-button
  • modal
  • nav
  • nav-pop
  • nav-push
  • nav-set-root
  • note
  • picker
  • popover
    • position in MD: position properly (PR: #16745)
    • ☑️ enter animation in MD: invert animation direction (PRs #17382 + #17645)
  • progress-bar
    • ☑️ default and reverse directions: both are the same; one of them should be inverted (PR #17464)
    • ☑️ indeterminate / buffer: fix animations (PR #17464)
  • radio
  • radio-group
  • range
    • ☑️ active range section in iOS/MD: fix position (PR #17384)
    • ☑️ knobs in iOS/MD: fix position (PR #17384)
    • ☑️ pins in MD: fix (background) position (PR #18321)
  • refresher
  • reorder-group
  • ripple-effect
  • searchbar (#15884)
    • cancel icon in MD: invert? Maybe not since the cancelButtonIcon property allows setting own icon? ➡️icon is now inverted thanks to PR #17196
    • ☑️ cancel icon in MD: invert horizontal position (PR #18325)
    • ☑️ clear icon in iOS: invert horizontal position (PR #18325)
    • ☑️ clear icon in MD: invert horizontal position (PR #18325)
    • ☑️ search icon in iOS: invert horizontal position (PR #18325)
    • ☑️ search icon in MD: invert horizontal position (PR #18325)
  • segment
    • ☑️ first and last buttons in iOS: fix borders (PR #18326)
  • select
    • ☑️ select icon in iOS: fix position of the inner element (#18315)
    • AlertController interface: same issues than alert component
  • skeleton-text
  • slides
  • spinner
  • split-pane
  • tab-bar
    • ☑️ badges: invert horizontal position (PR #18325 solves issue in Chrome)
  • tabs
  • text
  • textarea (label and input vertical alignment issue is not specific to RTL)
  • thumbnail
  • toast
  • toggle
  • toolbar (#15357) (PR #17196)
    • back button in iOS: use correct direction (">" instead of "<")
    • back button in MD: use correct direction ("->" instead of "<-")
  • virtual-scroll

Existing Issues as of 4.4.1

  • item-divider
    • slots margins in MD: in both slot="start" and slot="end", a small 2px margin appears on one side in LTR, but not on the opposite side in RTL (see https://i.imgur.com/4W5TFs2.png for an illustration of the problem: the box model shows the slotted ion-button)
  • item-sliding
    • ☑️ swiping direction: fix swiping direction & buttons positions (#14328) (#18366)
  • menu
  • ⚠️ menu-toggle
  • segment
    • border in Safari: border width is not switching
  • tab-bar
    • badges in Safari: invert horizontal position
  • toggle
    • swipe gesture: fix gesture direction in Safari
  • ⚠️ swipe-to-go-back
  • text
    • Float Elements: float-start, float-end, & their responsive versions in Safari

Contributing

Please help with the untested components, or double-check the tested ones if you feel like it. Thank you for the contribution anyway!

If you're not familiar with the included test suite:

  1. Fork the Ionic repo;
  2. Use the master branch;
  3. Setup your local copy;
  4. Run the test suite locally;
  5. When you navigate to the component you want to test, you can add ?rtl=true to the url in order to check the RTL version;
  6. Submit a comment with the issue.

See the contributing documentation for more information.

You can also test your own app using @ionic/angular@dev

@Newbie012
Copy link

@Newbie012 Newbie012 commented Jan 10, 2019

Scroller inside <ion-select> on RTL isn't positioned correctly.
Demo - https://gyazo.com/d1602f045193380be6d02432a7e61878

@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jan 10, 2019

Yes indeed, but I had a hard time debugging it to understand what's going on there... I'll just add it to the list then

@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jan 10, 2019

@Newbie012 I noticed it's only the case with the AlertController interface, and in MD. Can you please verify?

@Newbie012
Copy link

@Newbie012 Newbie012 commented Jan 10, 2019

@abennouna True

@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jan 10, 2019

Thanks @Newbie012, added to the list under the alert component

@brandyscarney brandyscarney pinned this issue Jan 11, 2019
@brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Jan 11, 2019

I updated the original issue to include links to some of the open RTL issues. We can either keep those open for tracking or close them to track here.

@twinssbc
Copy link

@twinssbc twinssbc commented Jan 13, 2019

@abennouna I notice that dir option is removed form ion-slides in v4 which is supposed to RTL when using slides component. May I know will it be added back or is there any alternative way to achieve it?

@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jan 13, 2019

@twinssbc slides work in RTL mode out of the box as long as the document is in RTL. Are you referring to something else? PS: There is an issue though if you want to switch direction dynamically: you'd have to reload the document to keep swiper events working correctly

@MuhAssar
Copy link

@MuhAssar MuhAssar commented Jan 13, 2019

@abennouna I would like to thank you for your effort in making sure that all RTL issues are fixed.
Jazakallahu Khairan

I just want to mention that items inside ion-item-divider in RTL has different margins with both slot="start" and slot="end" than in LTR

@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jan 13, 2019

@abuassar 🤝don't mention it!

Good call! I see a 2px margin that disappears in RTL mode, only in MD. Can you confirm please?

@abennouna abennouna changed the title [WIP] Ionic 4 RC RTL issues Ionic 4 RC RTL issues Jan 13, 2019
@MuhAssar
Copy link

@MuhAssar MuhAssar commented Jan 14, 2019

@abuassar 🤝don't mention it!

Good call! I see a 2px margin that disappears in RTL mode, only in MD. Can you confirm please?

It is not just 2px error, please check the following screen shots:

START uses slot="start"
END uses slot="end"
MIDDLE is without a slot

RTL
ionic4-rtl

LTR
ionic4-ltr

and here is how to recreate the issue
app.component.html:

https://gist.github.com/abuassar/bdee78a37e36cf1c5e7ddc506eed141d

@MuhAssar
Copy link

@MuhAssar MuhAssar commented Jan 14, 2019

unfortunately I found the same issue with ion-item:

START uses slot="start"
END uses slot="end"
MIDDLE is without a slot

ion-item-issue

demo:
app.component.html
https://gist.github.com/abuassar/d957e7b6d5079cd7f30550c91b7c4617

@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jan 14, 2019

@abuassar am I right to assume you're not using the latest master with PR #16987? I updated the issue description to explain the test context. Here's the current render of the issue in item-divider: https://i.imgur.com/4W5TFs2.png

@MuhAssar
Copy link

@MuhAssar MuhAssar commented Jan 14, 2019

@abennouna you are right, I'm using rc1 as I thought it has the fix.

Would you please guide me how to use latest master with the said PR?

@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jan 14, 2019

@abuassar I updated the issue description with the following in the "Contributing" part:

If you're not familiar with the included test suite:

  1. Fork the Ionic repo;
  2. Use the rtl branch (or use the master branch and merge the PR #16987);
  3. Setup your local copy;
  4. Run the test suite locally;
  5. When you navigate to the component you want to test, you can add ?rtl=true to the url in order to check the RTL version;
  6. Submit a comment with the issue.

Please let me know if it's unclear.

@twinssbc
Copy link

@twinssbc twinssbc commented Jan 14, 2019

@twinssbc slides work in RTL mode out of the box as long as the document is in RTL. Are you referring to something else? PS: There is an issue though if you want to switch direction dynamically: you'd have to reload the document to keep swiper events working correctly

@abennouna I can confirm that slides work in the default RTL mode, no extra option is required.

brandyscarney added a commit that referenced this issue Jan 15, 2019
@brandyscarney brandyscarney mentioned this issue Jan 15, 2019
6 of 6 tasks complete
@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jun 8, 2019

I'm not able to reproduce the following:

Float Elements: float-start, float-end, & their responsive versions (regression: #17012 (comment))

@brandyscarney I can reproduce now in Safari.

Also, not sure if it helps: take float-start, the generated rules are grouped and it appears Safari ignores rules that it can't parse:

.ion-float-start,
[float-start] {
  float: left !important;
}
[dir=rtl] .ion-float-start,
:host-context([dir=rtl]) .ion-float-start,
[dir=rtl] [float-start],
:host-context([dir=rtl]) [float-start] {
  float: right !important;
}

(Safari needs the non-:host-contextones)

Stylesheet
stylesheet

Actually parsed CSS
parsed

@brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Jun 11, 2019

Thanks @abennouna! Can you update the issue for this? Maybe we need to update the add-root-selector to return them as two separate selectors?

@brandyscarney brandyscarney moved this from On deck ⚾️ to Backlog 🤖 in Ionic Core Jun 11, 2019
@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jun 12, 2019

@brandyscarney issue updated. Returning 2 selectors in add-root-selector solves this issue. Hopefully no breaking-changes 😅

@shahramSo
Copy link

@shahramSo shahramSo commented Jun 12, 2019

@abennouna What about ion-item-sliding RTL issue?

@abennouna
Copy link
Contributor Author

@abennouna abennouna commented Jun 12, 2019

@shahramSo The fix is part of the 4.4.2 release. Can you share a minimal repo to reproduce your issue?

Sorry for that, see Brandy’s comment below 👇

@brandyscarney
Copy link
Member

@brandyscarney brandyscarney commented Jun 12, 2019

@shahramSo The item sliding issue is fixed, it just hasn't been in a release yet. It will be in the 4.5.0 release today if all goes well, but if you need it urgently see my comment here for the dev release: #17012 (comment)

@brandyscarney brandyscarney unpinned this issue Jun 28, 2019
@christyfernandes
Copy link

@christyfernandes christyfernandes commented Jul 15, 2019

@brandyscarney Is there any way I can re-use the same SCSS written in ionic 3 app ?
@include padding(10px, 5px, 8px, 10px)

It throws me an error "No mixin named padding"

@jvdgrift
Copy link

@jvdgrift jvdgrift commented Jul 30, 2019

The menu works when set on startup (opens up from the right). But when it is set/changed dynamically it will open from the left. Is this a known issue?

See: https://enappd.com/blog/rtl-right-to-left-use-in-ionic-4/50/

Is there any development/progress regarding RTL (when is it planned to be included in Ionic4)? Or is this community driven effort?

@3adeling
Copy link

@3adeling 3adeling commented Aug 4, 2019

@abennouna

this issue: #17012 (comment)

still exist in real ios device/simulator but not in browser !

ionic version: 4.7.1

@3adeling
Copy link

@3adeling 3adeling commented Aug 6, 2019

this is happening because of the following style:

:host( .fab-horizontal-center) {
margin-left: unset;
}

removing unset will solve the problem but I am not sure how to override/cancel it
I tried all other values for margin but they didn't work
only removing it will fix the issue!

@mrahmadt
Copy link

@mrahmadt mrahmadt commented Aug 6, 2019

@3adeling
Copy link

@3adeling 3adeling commented Aug 7, 2019

thanks @mrahmadt but that didn't work

the solution is:

in global.scss

.fab-horizontal-center {
    margin-left: -28px !important;
}

also I notice that fab start position is not changing direction in RTL mode in ios simulator/device

@SherifMoShalaby
Copy link

@SherifMoShalaby SherifMoShalaby commented Sep 18, 2019

ion-slides rtl is not working properly ?
any help

@yzedayyash
Copy link

@yzedayyash yzedayyash commented Sep 28, 2019

Hello, i have a problem with side menu in real IOS devices
Its open from left to right in RTL mode!!
Can any one help me with that or any one has fixed this issue

@SherifMoShalaby
Copy link

@SherifMoShalaby SherifMoShalaby commented Dec 19, 2019

@brandyscarney
any updates regarding ion-slides rtl

@3alampro
Copy link

@3alampro 3alampro commented Dec 24, 2019

any update on the RTL support for ion-slides if I changed document dir to RTL the ion-slide stop sweeping between slides

@SherifMoShalaby
Copy link

@SherifMoShalaby SherifMoShalaby commented Dec 24, 2019

any update on the RTL support for ion-slides if I changed document dir to RTL the ion-slide stop sweeping between slides

It swipes but in the wrong direction

@chriswep
Copy link

@chriswep chriswep commented Jan 20, 2020

@abennouna i still see the issue "select icon in iOS: fix position of the inner element" on the current version, although its supposed to be fixed according to the issue description.

@brandyscarney brandyscarney pinned this issue May 13, 2020
@liamdebeasi
Copy link
Member

@liamdebeasi liamdebeasi commented May 28, 2020

@abennouna It looks like columns in ion-picker do not switch position based upon LTR vs RTL mode: #21205.

Previous work seems to indicate this is intentional:

datetime
☑️ picker in iOS/MD: fix start/end columns’ horizontal positioning when there are 2 or 3 picker columns (PR #18339)
☑️ with floating or stacked label: the datetime text should stay in the document flow (regression) (PR #18340)
picker in iOS/MD: keep the order of columns as in LTR when using time and/or DD/MM/YYYY date format (see #16294) (PR: #17018)

Do you recall the reasoning behind this?

@nourkrimesh
Copy link

@nourkrimesh nourkrimesh commented Jun 14, 2020

Hello Everyone,
I discovered some issues with ion-item-sliding component in RTL (Ionic 5):
First:
the ion-item-options doesn't open correctly especially in iOS
I fixed it with css:
ion-item-options {
width: unset !important;
}
it fixed the problem and the option appears correct in both LTR and RTL

Second:
when I'm trying to open it programmatically with .open('end') method, it opened in LTR but with RTL it activating the class named: item-sliding-active-options-start but the side is end so it doesn't open:
To fix it I added a second ion-item-options with side="start" and after opening it and do what I want I'm removing it. It's not a good solution but It solve my problem right now.

@3adeling
Copy link

@3adeling 3adeling commented Jul 13, 2020

Hey. I wonder if swipe to go back direction is already solved or not. Because the direction is not changing right now.

#19488

@3adeling
Copy link

@3adeling 3adeling commented Aug 25, 2020

<ion-list> detail icon is showing wrong direction when changing direction in the same page (without reloading) using: document.documentElement.setAttribute('dir', 'ltr');

@liamdebeasi liamdebeasi unpinned this issue Sep 18, 2020
@ChiragPrajapat
Copy link

@ChiragPrajapat ChiragPrajapat commented Sep 25, 2020

Hello, i have a problem with side menu in real IOS devices
Its open from left to right in RTL mode!!
Can any one help me with that or any one has fixed this issue

this is not working for me too..

@shahramSo
Copy link

@shahramSo shahramSo commented Sep 25, 2020

@ChiragPrajapat, I recently reported a bug for this issue and show a walkthrough about that, check it and hope, it is useful for you.
#22116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Ionic Core
  
Backlog 🤖
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.