-
Notifications
You must be signed in to change notification settings - Fork 357
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
fix(truncate) tooltip shows without truncation #10281
Conversation
Preview: https://patternfly-react-pr-10281.surge.sh A11y report: https://patternfly-react-pr-10281-a11y.surge.sh |
29e4e4d
to
46d854e
Compare
/** Determines whether the tooltip is hidden regardless of visibility **/ | ||
hidden?: boolean; |
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.
I'm not sure whether we should introduce this prop, mainly because we already have an "isVisible" prop for manual control of a Tooltip.
Rather than needing to create this prop, we could just conditionally return either the "full" Truncate content (if there is no truncation; basically everything that is currently being passed to Tooltip) or the "full" Truncate content wrapped in the Tooltip (if there is truncation).
We do something similar in ModalBoxTitle.
46d854e
to
08e16f8
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.
Very nice 😎 One nit, though, is that rather than using the ResizeObserver constructor, we could try to use our getResizeObserver
helper instead. The WizardBody component and the JumpsLinksWithDrawer demo are two examples that are using it in functional components.
08e16f8
to
44f1c45
Compare
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #10053
Additional issues: I have also added
hidden
prop to theTooltip
component which is useful both for this issue and in general