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

The new 'Switch to draft' design doesn't take into consideration longer translation strings #51451

Closed
afercia opened this issue Jun 13, 2023 · 7 comments
Labels
l10n Localization and translations best practices Needs Design Feedback Needs general design feedback. [Package] Edit Post /packages/edit-post [Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Jun 13, 2023

Description

Looks like the new design and placement of the 'Switch to draft' button took into consideration only the default English language. The button is now stacked horizontally close to the 'Move to trash' button. In English, the buttons text is short enough to fit within the buttons:

Screenshot 2023-06-13 at 12 11 29

However, it's a pretty known fact that most of the other languages may have longer strings. It's just that other languages have longer words. A couple quick examples:

Italian:

Screenshot 2023-06-13 at 12 11 49

Geerman:

Screenshot 2023-06-13 at 12 13 40

In these cases, the text overflows the buttons and may also get off screen.

I do remember a very similar case occurred in the Customizer a few years ago. A new design provide two buttons, stacked horizontally within the customizer sidebar. It proved to fail with languages other than English. @karmatosed @melchoyce may know more.

WordPress core has a good tradition of making sure the UI is usable and text is always readable in all languages. It would be great to see some more familiarity and knowledge about this kind of issues in the Gutenberg project as well.

Design should always take into account other languages. Ideally, other languages should be tested since the beginning in the design mockups. Truncating text is not an option. In this specific case, the only option I can think of is to just stack the two buttons vertically and make them full width.

Step-by-step reproduction instructions

  • Go to the post editor.
  • Publish a post.
  • Observe the editor Settings sidebar > Post
  • Observe the 'Switch to draft' and 'Move to trash' button look okay in English.
  • Switch to WordPress to another language, e.g. Italian, German, etc.
  • Observe that in most of the cases the text of the 'Switch to draft' and 'Move to trash' buttons overflow and in some cases it's also off screen.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Bug An existing feature does not function as intended Needs Design Feedback Needs general design feedback. [Package] Block editor /packages/block-editor labels Jun 13, 2023
@afercia
Copy link
Contributor Author

afercia commented Jun 23, 2023

Can we try to fix these for the 6.3 release, please? Cc @annezazu ❤️
It would only need a different design and some CSS adjustments.

@annezazu
Copy link
Contributor

Just am catching up after some time off. Good call out. I am going to add this to the 6.3 board for consideration as we're doing an async triage session today ahead of beta 1 tomorrow.

@mrleemon
Copy link
Contributor

I tried WP6.3 beta2 and I can see this issue when setting the site language to Spanish.

@t-hamano
Copy link
Contributor

One idea I have is that if the text of any of the buttons is likely to cause overflow depending on the language, it should automatically wrap and display each button at 100% width. This can be achieved with CSS only.

Is it undesirable for the layout to change depending on the language?

3aec34b1253f07be8b366f594c957c96.mp4

@carolinan
Copy link
Contributor

I like this suggestion, it would be good to get the opinions of @WordPress/gutenberg-design

@jameskoster
Copy link
Contributor

Fixed in #52249.

@mtias mtias added the l10n Localization and translations best practices label Jul 5, 2023
@mtias
Copy link
Member

mtias commented Jul 5, 2023

Thanks for raising this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n Localization and translations best practices Needs Design Feedback Needs general design feedback. [Package] Edit Post /packages/edit-post [Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

7 participants