-
Notifications
You must be signed in to change notification settings - Fork 364
feat(Truncate): added logic to truncate based on max characters #11742
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
Conversation
Preview: https://patternfly-react-pr-11742.surge.sh A11y report: https://patternfly-react-pr-11742-a11y.surge.sh |
ffe6ebb
to
656a30c
Compare
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.
LGTM! Just a comment, but "maxCharsDisplayed" kinda sounds like it might show less characters, but will only show up to whatever the val of maxCharsDisplayed
is. As in it would pair with something like minCharsDisplayed
. When this prop as it is now is more just charsDisplayed
. FWIW, core also has --MinWidth
vars used in the truncate component that could be modified by users via a minCharsDisplayed
prop.
I see how it also sounds appropriate - it will only show characters up to whatever value is passed.
Not saying anything needs to change, but wanted to share in case anyone else felt similarly.
656a30c
to
c609395
Compare
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.
This looked good to me!
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.
This PR is great!
I already approved, but
It's haiku day! Yay!
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #10892
Additional issues: