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

ZStack: support RTL layouts when applying offset #36769

Merged
merged 3 commits into from
Nov 23, 2021

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Nov 23, 2021

Description

The ZStack component has an offset prop which establishes the amound of offset between each child on the X axis.

This PR flips the value of the offset when the layout switches from LRT to RTL, so that the original intent of the offset value is preserved.

How has this been tested?

Open Storybook, check the ZStack and ItemGroup stories

Screenshots

Before

zstack-before.mp4

After

zstack-after.mp4

Types of changes

Fix (RTL support)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • N/A I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@ciampo ciampo requested a review from ajitbohra as a code owner November 23, 2021 11:36
@ciampo ciampo self-assigned this Nov 23, 2021
@ciampo ciampo added [Feature] Component System WordPress component system [Package] Components /packages/components [Type] Enhancement A suggestion for improvement. labels Nov 23, 2021
@ciampo ciampo requested review from mirka and diegohaz November 23, 2021 11:39
@ciampo ciampo force-pushed the fix/components-z-index-rtl branch from 96616c2 to a131800 Compare November 23, 2021 12:10
Copy link
Member

@mirka mirka left a comment

Choose a reason for hiding this comment

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

Nice improvement 🚢

@ciampo ciampo merged commit ab9ad83 into trunk Nov 23, 2021
@ciampo ciampo deleted the fix/components-z-index-rtl branch November 23, 2021 17:27
@github-actions github-actions bot added this to the Gutenberg 12.1 milestone Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Component System WordPress component system [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants