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

Frontend UI/UX: AppNavUserMenu bugged display #617

Open
samjespersen opened this issue Feb 14, 2025 · 2 comments
Open

Frontend UI/UX: AppNavUserMenu bugged display #617

samjespersen opened this issue Feb 14, 2025 · 2 comments

Comments

@samjespersen
Copy link

Problem:

The Paper component in AppNavUserMenu does not resize according to the content of its Text child, which then overflows out of its parent

Image

Solution:

This can be solved by setting the truncate prop of the Text components to end and giving their containing div a min-width of 0:

Image

But wait!

Now that the text is truncating properly, there needs to be a way of displaying the full user name and team name.

A couple of ideas:

Use a Tooltip:

Image

OR

Expand element width on hover:

Image
@samjespersen
Copy link
Author

samjespersen commented Feb 14, 2025

Personally, I like expanding the element width on hover, and it even does a neat animation (only supported on Chrome unfortunately)

Screen.Recording.2025-02-14.at.11.38.34.AM.mov

@teeohhem
Copy link

Thanks for opening the issue and recommending some fixes! The most common pattern I’ve seen is truncating with ellipses via css text-overflow and showing the full text on hover. https://www.patternfly.org/ux-writing/truncation/

I think that would be a fine approach here.

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

No branches or pull requests

2 participants