-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(TooltipDefinition): update children
PropType
#7437
fix(TooltipDefinition): update children
PropType
#7437
Conversation
✔️ Deploy preview for carbon-elements ready! 🔨 Explore the source changes: ebce032 🔍 Inspect the deploy logs: https://app.netlify.com/sites/carbon-elements/deploys/6001ea28761d410007b44981 😎 Browse the preview: https://deploy-preview-7437--carbon-elements.netlify.app |
✔️ Deploy preview for carbon-components-react ready! 🔨 Explore the source changes: ebce032 🔍 Inspect the deploy logs: https://app.netlify.com/sites/carbon-components-react/deploys/6001ea2879ae3b0008c2426b 😎 Browse the preview: https://deploy-preview-7437--carbon-components-react.netlify.app |
If I understand correctly, this is allowing truncation of the text that triggers the tooltip? If so, do we need to worry about how someone could see what the truncated text itself is? Seems like we solved that in the past with tooltips or (unfortunately) title, but if this itself has a tooltip it seems like it would conflict. Let me know if I'm misunderstanding, just was curious 🤔 |
we wouldn't be able to control the truncation logic since that would all be on the application's side. this change is just for the proptype definition since the user is technically already able to truncate the tooltip trigger |
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.
Closes #6484
This PR changes the TooltipDefinition's
children
prop type to support nodes instead of restricting it to strings (alternatively, we can insert a span that wraps thechildren
if we want to keep the proptype definition asstring
). This will allow users to truncate the tooltip trigger text if necessary with CSS, and our existing guidelines dictate that the definition tooltip should be used for small amounts of textChangelog
Changed
children
proptype definition