Skip to content

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Nov 17, 2022

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue URL: Part of #17012

While working on #26314 I noticed this was still a problem. I fixed the problem in the v7 branch but wanted to pull this out to get this into v6.

What is the new behavior?

  • Toggle now renders correctly in RTL mode in Safari.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot added the package: core @ionic/core package label Nov 17, 2022
@liamdebeasi liamdebeasi marked this pull request as ready for review November 17, 2022 19:22
@liamdebeasi liamdebeasi requested a review from a team as a code owner November 17, 2022 19:22
@averyjohnston
Copy link
Contributor

I had some comments on this over in #26314, but we can handle discussion there 👀

@liamdebeasi
Copy link
Contributor Author

Great catch! I fixed this in d52eec6.

@liamdebeasi
Copy link
Contributor Author

liamdebeasi commented Nov 18, 2022

@amandaejohnston I updated the screenshots. I'm going hold off on updating #26314 until this PR gets merged.

Copy link
Contributor

@averyjohnston averyjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like LTR was affected now; looking at core/src/components/toggle/test/enable-on-off-labels/toggle.e2e.ts-snapshots/toggle-on-off-labels-dark-mode-diff-ios-ltr-Mobile-Safari-linux.png for example, the "O" for unchecked toggles is missing, and the "I" for checked ones is off-center.

@liamdebeasi
Copy link
Contributor Author

The problem was I kept targeting .toggle-ltr in addition to .target-rtl. However, the toggle-ltr class was never added (I only added it for RTL). I took this as a cue that I should always have both ltr and rtl classes.

@liamdebeasi liamdebeasi merged commit 0932f89 into main Nov 21, 2022
@liamdebeasi liamdebeasi deleted the toggle-rtl branch November 21, 2022 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants