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
left-sidebar: Allow upto 2 lines for PMs #21021
left-sidebar: Allow upto 2 lines for PMs #21021
Conversation
@timabbott and style-lint won't allow me using this property as display, so had to disable It would be great if there's any other alternative to allow this display property through style-lint. |
overflow: hidden; | ||
text-overflow: ellipsis; | ||
padding-right: 2px; | ||
-webkit-line-clamp: 2; | ||
-webkit-box-orient: vertical; |
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.
What does this do on non-webkit browsers? Also, what linter rule are you disabling?
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.
@timabbott I disabled the all stylelint
rules for these 5 lines of CSS as display: -webit-box
is not a valid for display property in stylelint library.
and on non-webkit browers, these CSS ofc won't work if we want to go with CSS only method.
But now a days, Every browser supports -webkit except Internet Explorer
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's also an other alternative method to do this change, but it would involve JS -
Using the Clamp.JS module.
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.
Can you post the caniuse details confirming that this will work in all browsers, and test in firefox? It's important for reviewers to independently verify those details.
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.
Hey Tim , I tested this on firefox and it's working perfectly fine!
also here's the ss of caniuse
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.
@andersk, I have made the changes you asked for, please have a look. |
Another option is to show pre-formatted text using let names = get_display_full_names(other_ids).sort().join(", ");
if (names.length > 26) {
names = names.slice(0, 27) + "\n" + names.slice(27);
}
if (names.length > 55) {
names = names.slice(0, 55) + "...";
} |
yeah, this method ofc is available, but i wanted to avoid the use of JS for this, which is why i used |
Squashed and merged, after writing a proper commit message. Thanks @jai2201! Please read the commit message I used and adjust your future PRs to use that style -- commit messages should explain why a change is being made and why anything potentially unusual in the commits was done. |
#21003
GIFs or screenshots: