-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[Feature]: Addition to Tooltip for managing overflow #33073
Comments
@mainframev can you please check if this can be achieved with the current implementation of Tooltip / Overflow? |
Hello folks 👋🏻 I've checked this, v8 Tooltip had a specific property and overflow logic. It's selecting for overflow check either self or parent based on I quickly made a a couple examples demonstrating this. I suggest, that maybe instead of creating a story example of this scenario, provide this issue and our migration doc, that says:
It's already covered with |
I suggest we could add the https://stackblitz.com/edit/fu8vhs-iz3vyv?file=src%2FuseIsOverflowing.ts,src%2FSelfOverflow.tsx wdyt? |
Good question. I feel like it might not be used often and such things can be abstracted to utility hook on the user side without a problem. We can add it to |
We always use such a feature in our products, especially in v8 DetailsList: Our customers always want to display more columns/informations, than it is usefull for a fluent/responsive design. At same time no wrapping is wanted and a fixed column width is required to build a result view with grouped entries. So we use the overflow feature to only show the tooltip if the data of the user does not fit the cell. Isn´t it desired to "hide" the HTML/DOM specifics by the library? In this case the inclusion of overflow-check via a OoB hook would be some way. Btw: |
Thank you for the feedback! I appreciate that you understand this was just a quickly made example for demonstration purposes. 😊
I understand your perspective—thank you for providing the context. Component APIs can change significantly from version to version, and when a feature is not supported, it’s often an intentional decision. In my opinion, the Tooltip component should not handle overflow logic by default. However, it does provide the necessary props to control its visibility, leaving overflow handling as the user’s responsibility. To support your migration, we could create documentation examples featuring a custom hook that checks for overflowing content. If, after discussion, if it will be decided to make this hook reusable, we can include it in react-utilities and suite. This should help ease the transition from v8 to v9. UPD: here is the context on last change to this topic UPD2: |
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fluent UI! |
Area
React Components (@fluentui/react-components)
Describe the feature that you would like added
In the 8th version, there's a utility feature for managing overflow and tooltips, showcased in the Tooltip example titled "Tooltip only on overflow."
However, in version 9, this particular example is absent from the ToolTip code samples, leading to some confusion among partners who are updating their products to v9.
To bridge this transition smoothly for migration, it would be beneficial to include a "Tooltip only on overflow" example in version 9's React Storybook.
Additional context
Reported by Azure Portal [Nicole Thuna]
Have you discussed this feature with our team
Gouttierre Gomes, Paul Gildea
Validations
Priority
High
The text was updated successfully, but these errors were encountered: