-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
[Account] Prevent account info overflowing on kebab menu #4555
base: master
Are you sure you want to change the base?
[Account] Prevent account info overflowing on kebab menu #4555
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added just one comment, I guess at least having an ellipsis even when there's no options button should be doable for consistency?
variant="body2" | ||
fontWeight="bolder" | ||
// Only truncate when a longer text causes the text to overflow over the MoreIconButton | ||
maxWidth={handleClick ? 180 : 'unset'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but is there no way to make it overflow with the available width without us having to set a manual value?
I feel like it should be possible but haven't tried it.
Also what is the behavior if there is no options button? Does it truncate with an ellipsis after the sidebar width? I guess that's what it should do in every case... (just tested and looks like it doesn't so I guess it could)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea to only truncate when there is an options button is to allow the popover to have the complete information, so something like:
Screen.Recording.2025-01-07.at.3.53.23.PM.mov
We could truncate in all cases, but then do you suggest including a Tooltip when the text is inside the popover; something like:
Screen.Recording.2025-01-07.at.4.00.53.PM.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah got it! Yes the ellipsis should happen in this case as well, good catch
Netlify deploy preview |
overflow="hidden"
does the trickAccountPreview
will truncate the account info if placed inside a div with a set width, otherwise will expand