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

Wrap long Auth Display names in menus #26181

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/app/components/sidebar/user-menu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<Dropdown.Content>
<div class="popup-menu-content" data-test-user-menu-content>
<div class="box">
<div class="menu-label">
<div class="menu-label overflow-wrap">
{{capitalize this.auth.authData.displayName}}
</div>
<nav class="menu">
Expand Down
4 changes: 4 additions & 0 deletions ui/app/styles/helper-classes/general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
white-space: pre-wrap;
}

.overflow-wrap {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did the is-word-break class not work for this situation? asking only because i was going to suggest renaming this class to .break-word to make it more obvious which CSS rule was being applied, but i see that basically already exists. 😛

not a huge deal though since we could always add an .overflow-wrap-anywhere class helper down the line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question, and it didn't work. The white-space: pre-wrap on that helper borks things. Thanks for checking though!

overflow-wrap: break-word;
}

.truncate-second-line {
display: -webkit-box;
-webkit-line-clamp: 2;
Expand Down
Loading