Problem/Motivation

When there are long translations (e.g. French or German) the item name can overflow the navigation.

Steps to reproduce

This issue was reported in the Gin issue queue and fixed via #3396676: Long words cause horizontal overflow - experimental toolbar

Proposed resolution

Adds elipsis for top level navigation items, break menu items.

Remaining tasks

-

User interface changes

API changes

-

Data model changes

-

Issue fork navigation-3396842

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

saschaeggi created an issue. See original summary.

saschaeggi’s picture

Status: Active » Needs review

Update

saschaeggi’s picture

Update credit

saschaeggi’s picture

saschaeggi’s picture

Issue summary: View changes
StatusFileSize
new28.12 KB
new27.65 KB

kostyashupenko made their first commit to this issue’s fork.

kostyashupenko’s picture

New before/after. Added some padding for the texts to prevent interflow

Before:

Before

After:

after

ckrina’s picture

Thanks for the proposal @saschaeggi! But from my understanding not displaying the full label in menu items is not a good practice. I would expect it to break into 2 lines to not leave out important information a site admin/editor might need instead of forcing ~20 characters on the label. I would assume, also, that somebody using a bigger font-size would see even less characters.
I can be wrong so I'll do some research, but feel free to point to any resource that proves it's a good practice. Meanwhile I'll leave this as NR so some other people takes a look to it.

gdd’s picture

I agree this is a bad idea. Truncating text can lead to unfortunate wordings that are embarassing and/or damaging for customers (think about the ways in which analyze or associate might be truncated as an example.) This problem would only be made worse when we consider all the non-English options.

The best choice would be to break to multiple lines and show the complete text of the menu item.

saschaeggi’s picture

I totally agree that showing the full item name would be better 👍 Let's proceed with this 👌

ckrina’s picture

Status: Needs review » Needs work

Thank all! Then moving this to Needs Work to update adjust to the current styles in 2 lines for the first level item in a similar way to @kostyashupenko's work on the sub-menu items.

kostyashupenko’s picture

Status: Needs work » Needs review
ckrina’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new28.73 KB

Thanks @kostyashupenko! I've just reviewed it and I think the sub-levels are missing the flex-shrink: 0; part you've added on the top one:

kostyashupenko’s picture

Status: Needs work » Needs review
ckrina’s picture

Status: Needs review » Fixed

Thanks everybody!

finnsky’s picture

Status: Fixed » Needs work

After refactor this feature is gone.
We need some work here

kostyashupenko’s picture

Status: Needs work » Needs review
finnsky’s picture

Status: Needs review » Reviewed & tested by the community

Thank you!

ckrina’s picture

Status: Reviewed & tested by the community » Fixed

I've just merged it, thanks! For the next time if you open a new issue (because it's new work that came up) I'll be able to give you the proper credits for it :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.