feat(Truncate): added tooltip props and anchor usage#11801
Merged
nicolethoen merged 3 commits intoMay 21, 2025
Conversation
ed88595 to
e774eac
Compare
nicolethoen
reviewed
May 15, 2025
| const minWidthCharacters: number = 12; | ||
|
|
||
| export interface TruncateProps extends React.HTMLProps<HTMLSpanElement> { | ||
| export interface TruncateProps extends Omit<React.HTMLProps<HTMLSpanElement | HTMLAnchorElement>, 'ref'> { |
Contributor
There was a problem hiding this comment.
Could omitting ref be problematic if people were trying to use it in this component before? Do we need to make sure to forward a ref or something here?
kmcfaul
approved these changes
May 15, 2025
kmcfaul
left a comment
Contributor
There was a problem hiding this comment.
I like the refactor of refToGetParent to tooltipProps, its a little easier to understand I think
wise-king-sullyman
left a comment
Collaborator
There was a problem hiding this comment.
I share the concern about this possibly being a breaking change for passing ref, but other than that this looks good to me.
rebeccaalpert
approved these changes
May 19, 2025
rebeccaalpert
left a comment
Member
There was a problem hiding this comment.
Same as everyone else about the ref thing; otherwise it looks great to me. :)
e774eac to
0a65ff1
Compare
wise-king-sullyman
approved these changes
May 20, 2025
nicolethoen
approved these changes
May 21, 2025
Collaborator
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
mattnolting
pushed a commit
to mattnolting/patternfly-react
that referenced
this pull request
Jun 4, 2025
* feat(Truncate): added tooltip props and anchor usage * Added tests * Forwarded ref
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Closes #10843
Some notes about this draft:
hrefprop) and a more customizable way to do it+add truncation to more complex things like buttons (viatooltipPropsprop and the triggerRef property) -- question is do we want to support truncating in things like buttons? You can do it now, it just doesn't apply the tooltip "correctly" (since the trigger is the text itself, the tooltip will render visually "inside" the button)Additional issues: