-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update Tooltip types to closer align to Radix capabilities #102
Conversation
Deploying with Cloudflare Pages
|
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 don't think it's desirable to add more flexibility here. It opens the door to folks adding things that we do not wish to see in tooltips.
Like links, and other things...
Looping @janogarcia as the lead of the design side of Compound
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'll try to address all the questions on Compound Tooltips shared here and in internal channels:
- It should support a primary (high contrast) and a secondary (lower contrast) line of text.
- Maximum width should be around 200-250px, but I don't think we have formalized that detail yet on the spec. Let's say 240px for now.
- Text can wrap when the container reaches the maximum size (or when there's forced line breaks), but it is not recommended to display long text on tooltips.
- I don't think we support text formatting.
- The basic tooltip component shouldn't include interactive elements (e.g., links, buttons). If we need to support that we should think about a separate behavior/component for accessibility reasons (similarly to what IBM Carbon does for Tooltip, Toggletip, and Popover components, or what Google Material 3 does for Plain and Rich Tooltips).
Let me know if I'm still missing to address some stuff, as I'm not sure what changes this PR would bring.
Relevant resources
Thanks for the clarification @janogarcia |
@t3chguy What was this PR introducing, though? Maybe free-form HTML? |
@janogarcia it was passing through Radix's flexibility to contain more than just a single line of text in a tooltip. I had missed that the Compound tooltip had a way to specify a sub line due to it having been called to accomplish a but instead I went with Using the |
@t3chguy Thanks! We should rename that property, though, as it's not strictly for shortcuts. It's just a generic secondary line. BTW, I see that the current implementation is using a |
@janogarcia indeed, my confusion was I didn't even expect it to be rendered based on its documentation being Agreed also on it being on the small side |
Thanks @janogarcia |
For matrix-org/matrix-react-sdk#11733