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

Media/Text Block: RTL styles for media alignment not working #17922

Closed
nielslange opened this issue Oct 13, 2019 · 7 comments · Fixed by #18764
Closed

Media/Text Block: RTL styles for media alignment not working #17922

nielslange opened this issue Oct 13, 2019 · 7 comments · Fixed by #18764
Assignees
Labels
[Block] Media & Text Affects the Media & Text Block Internationalization (i18n) Issues or PRs related to internationalization efforts Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@nielslange
Copy link
Contributor

Describe the bug

The media/image block does not respect media alignments.

To reproduce

Steps to reproduce the behavior:

  1. Go to /wp-admin/options-general.php and change the site language to an RTL language, e.g. Hebrew
  2. Go to /wp-admin/post-new.php
  3. Add the following two media/image blocks:
    3.1 Media: left / Text: right
    3.2 Media: right / Text: left

Expected behavior

  • Left-aligned images appear on the left and right-aligned images appear on the right.

Screenshots

  • Left-aligned images appear on the right and right-aligned images appear on the left.

Desktop (please complete the following information):

  • OS: iOS 10.14.6 (18G103)
  • Browser Chrome Version 77.0.3865.90 (Official Build) (64-bit)

Additional context

@mapk
Copy link
Contributor

mapk commented Nov 6, 2019

Here's what's going on from a visual standpoint.

Screen Shot 2019-11-06 at 10 39 27 AM

@mapk mapk added [Type] Bug An existing feature does not function as intended Needs Dev Ready for, and needs developer efforts labels Nov 6, 2019
@richtabor
Copy link
Member

Good catch @nielslange. So is the solution we're looking for to have the block not swap left and right? Or to adjust the labels/icons to support the RTL result?

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Nov 26, 2019
@nielslange
Copy link
Contributor Author

nielslange commented Nov 27, 2019

Good catch @nielslange. So is the solution we're looking for to have the block not swap left and right? Or to adjust the labels/icons to support the RTL result?

@richtabor Either way works, as long as the image is aligned in accordance to users selection. Thus, if a user clicks on Show media on left, as seen in @mapk's screenshot in #17922 (comment), the image needs to be shown on the left.

@mapk
Copy link
Contributor

mapk commented Nov 27, 2019

In the case of RTL languages, the solution is to NOT swap the image position, only the text alignment. The image position is easily fixed by just clicking the positioning icons for the block.

This way the buttons represent the layout, not the language. "Media on left" is always media on left. Regardless of language, left is still left.

@nielslange
Copy link
Contributor Author

nielslange commented Nov 28, 2019

@mapk Isn't that what I mentioned in #17922 (comment)? 😀

@mapk
Copy link
Contributor

mapk commented Dec 9, 2019

@nielslange definitely as you mentioned. 👍 The comments lead to two different solutions, so I just wanted to clarify what the path forward for this should be.

@nielslange
Copy link
Contributor Author

I see. Thanks for clarifying this, @mapk! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Media & Text Affects the Media & Text Block Internationalization (i18n) Issues or PRs related to internationalization efforts Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants