-
Notifications
You must be signed in to change notification settings - Fork 0
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
task/WP-388: Handle text overflow on longer system labels(systemName) #901
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #901 +/- ##
=======================================
Coverage 63.40% 63.40%
=======================================
Files 432 432
Lines 12403 12403
Branches 2584 2584
=======================================
Hits 7864 7864
Misses 4327 4327
Partials 212 212
Flags with carried forward coverage won't be shown. Click here to find out more. |
Should we expand the width of the dropdown window to fit longer system names @wesleyboar ? |
@rstijerina, making menu wider is fine. @tjgrafft General note: If you use CSS for truncation (instead of JavaScript), then you never need to worry about character count. Browser will do the math for you. |
@wesleyboar Good point. Personally I didn't want to use truncate middle or the other truncate util I used for folder names bc I didn't think the ellipsis would look good in the dropdown menu, but I could make one without the ellipsis ending. Or I can have the dropdown menu autofit the width based on systemName. I'll look into both. Thanks! |
@@ -13,7 +13,8 @@ Styleguide Components.Dropdown | |||
border-radius: 0; | |||
margin-top: 11px; | |||
padding: 0; | |||
width: 200px; | |||
min-width: 200px; | |||
width: auto; |
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.
Should we have a max-width, for very long folder names?
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 path folder names won't be an issue bc they're being restricted to 20 chars. So it would only be an issue with system names/labels. My thinking is if we include a max-width the text overflow would happen again with a long system name. I know there's already code in the css file to handle media/device screen size rules. Do we think that's enough to handle the potential issue, or should I add a max-width of 800px and assume we'd never have a super long system name label past that?
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 perfect, I think this is a good solution to this problem. Very long system names are unlikely, but we could address that in another task if need be.
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.
Sounds good!
…#901) * fixed text overflow for longer system labels(systemName) * added auto-width css --------- Co-authored-by: Taylor Grafft <[email protected]> Co-authored-by: Sal Tijerina <[email protected]>
…#901) * fixed text overflow for longer system labels(systemName) * added auto-width css --------- Co-authored-by: Taylor Grafft <[email protected]> Co-authored-by: Sal Tijerina <[email protected]>
Overview
The system name (root) in the dropdown menu is not truncated like the path folder names. This is causing a text overflow if the system name is a long string. See example below with Frontera system names/labels. Only an issue if the system name is over 20-char in length.
We can use the substring method, like I used for the path folder names below to handle this issue.
Related
Changes
Testing
UI
Notes