Skip to content

fix(picker-column): correct RTL direction - #27460

Merged
thetaPC merged 7 commits into
mainfrom
FW-4119
May 19, 2023
Merged

thetaPC merged 7 commits into
mainfrom
FW-4119

Conversation

@thetaPC

@thetaPC thetaPC commented May 11, 2023 •

Copy link
Copy Markdown
Contributor

Issue number: resolves #21205


What is the current behavior?

picker-column keeps using LTR display when using RTL.

LTR:
Column 1 Column 2

RTL:
Column 1 Column 2

What is the new behavior?

picker-column correctly displays for RTL.

LTR:
Column 1 Column 2

RTL:
Column 2 Column 1

Does this introduce a breaking change?

  • Yes
  • No

Other information

This PR is already being tested through the picker -> basic and picker -> value screenshots. Due to those tests, a new test is not needed to verify the fix.

The current fix is only changing the picker and picker-column. The datetime and datetime-button do not change, leaving the format up to the users. It wouldn't change the functionality that was provided through PR #17018.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions Bot added the package: core @ionic/core package label May 11, 2023
@thetaPC
thetaPC marked this pull request as ready for review May 11, 2023 23:12
@thetaPC
thetaPC requested a review from a team as a code owner May 11, 2023 23:12
* ion-picker-column does not have mode-specific styling for document direction
*/
configs({ modes: ['ios'] }).forEach(({ title, config, screenshot }) => {
test.describe(title('picker-column: document direction'), () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like we have RTL screenshots in picker/test/basic (the screenshots that got updated). What does this test do differently?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not really, I was on the fence of whether it would be beneficial. I figured that it would be rejected during a review if that was the case. I'll remove it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it helps, you can always note in the PR description that the behavior is already tested. 👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I've updated the PR description.

@thetaPC
thetaPC requested a review from liamdebeasi May 12, 2023 16:55
@liamdebeasi
liamdebeasi requested review from a team and brandyscarney and removed request for a team May 15, 2023 13:25

@liamdebeasi liamdebeasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. I'm going to have Brandy take a look too in case she knows of any "gotchas" from when direction: ltr was originally applied.

@brandyscarney

Copy link
Copy Markdown
Member

Adding dir: ltr was intentionally done as part of our main RTL issue #17012

The specific issue related to this is #16294 and the PR was #17018

We might need to do some more investigation into this as this was feedback from our RTL users. Maybe we should make sure we cover their use cases or have documentation for how to achieve it before making this change.

@thetaPC

thetaPC commented May 19, 2023

Copy link
Copy Markdown
Contributor Author

Adding dir: ltr was intentionally done as part of our main RTL issue #17012

The specific issue related to this is #16294 and the PR was #17018

We might need to do some more investigation into this as this was feedback from our RTL users. Maybe we should make sure we cover their use cases or have documentation for how to achieve it before making this change.

The current fix is only changing the picker and picker-column. The datetime and datetime-button do not change, leaving the format up to the users. It wouldn't change the functionality that was provided through PR #17018.

@thetaPC
thetaPC added this pull request to the merge queue May 19, 2023
Merged via the queue into main with commit d3dd72f May 19, 2023
@thetaPC
thetaPC deleted the FW-4119 branch May 19, 2023 16:23
brandyscarney pushed a commit that referenced this pull request May 22, 2023
Issue number: resolves #21205 

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

`picker-column` keeps using LTR display when using RTL.

LTR:
`Column 1   Column 2`

RTL:
`Column 1   Column 2`

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

`picker-column` correctly displays for RTL.

LTR:
`Column 1   Column 2`

RTL:
`Column 2   Column 1`

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

This PR is already being tested through the `picker -> basic` and
`picker -> value` screenshots. Due to those tests, a new test is not
needed to verify the fix.

The current fix is only changing the `picker` and `picker-column`. The
`datetime` and `datetime-button` do not change, leaving the format up to
the users. It wouldn't change the functionality that was provided
through PR #17018.

---------

Co-authored-by: ionitron <[email protected]>
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.

bug: Ionic 5 ion-picker-column position internationalization when dir="rtl"

5 participants