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

Block navigation toolbar items overlap on media-text #1677

Closed
koke opened this issue Dec 13, 2019 · 7 comments
Closed

Block navigation toolbar items overlap on media-text #1677

koke opened this issue Dec 13, 2019 · 7 comments
Assignees

Comments

@koke
Copy link
Member

koke commented Dec 13, 2019

To Reproduce
Steps to reproduce the behavior:

  1. Insert a media-text block
  2. Focus on the paragraph on the right
    Screenshots

Simulator Screen Shot - iPhone 11 - 2019-12-13 at 10 43 43

Smartphone (please complete the following information):

  • Device: iPhone 11 (Simulator)
  • OS: iOS 13

Additional context
Add any other context about the problem here.

@lukewalczak
Copy link
Contributor

Hello @koke, I've checked that issue (after pulling all new changes from gutenberg) and right now on vertical mode items within Media&Text block are aligned one above the other, on horizontal mode I'm not able to reproduce it.

horizontal vertical
Screenshot 2019-12-17 at 11 30 20 Screenshot 2019-12-17 at 11 30 25

@koke
Copy link
Member Author

koke commented Dec 20, 2019

That seems fine now, but I'm thinking this might break in other cases where translations for the block title might be longer. When the text doesn't fit, the text should be ellipsized or cut off, but the icons should not overlap

@lukewalczak lukewalczak self-assigned this Jan 9, 2020
@lukewalczak
Copy link
Contributor

lukewalczak commented Jan 9, 2020

I've discovered that navigation Toolbar is a bit broken on the largest font on iOS:

  • icons are overlapping
  • component name goes beyond the container
vertical horizontal
Screenshot 2020-01-09 at 11 50 18 Screenshot 2020-01-09 at 11 50 23

Currently Toolbar height is fixed and the value is 44px. @iamthomasbishop What do you think about expanding container to fit icons along with label in two lines? Ellipsing / cutting off the label is not ideal case for a11y. Do you have other suggestions?

@lukewalczak
Copy link
Contributor

lukewalczak commented Jan 9, 2020

Another solution can be changing (decreasing) the title fontSize to fit within a container.

@iamthomasbishop
Copy link
Contributor

Can we set a max font-size on the label? I think it's inevitable that we'll run into issues w/ long names (esp translations), but a max size might help limit the issue.

@lukewalczak
Copy link
Contributor

I'm thinking right now of kinda compromise between setting a max font-size along with ellipsing long names. What I mean is to use props called maxFontSizeMultiplier and ellipsizeMode. It allows us to give the user a full name if it's not so long or ellipsed a bit in the wrong case.
Look at the screenshots for reference:

short long
Screenshot 2020-01-09 at 18 11 21 Screenshot 2020-01-09 at 18 20 58

@iamthomasbishop
Copy link
Contributor

Ah ok. As you mentioned, not great for a11y, but I think it's okay as a start. I wonder if we do something when that's long-pressed to show a tooltip or something other thing?

Also worth mentioning that the block dev guidelines recommend short names for all block names, so if a block-maker uses a super-long name they're probably running into these types of issues in more places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants