Fluentui: Tooltip support for ContextualMenu items

Created on 1 Oct 2019  路  13Comments  路  Source: microsoft/fluentui

Describe the feature that you would like added

I'd like to add a tooltip to a ContextualMenu. There was previously a ticket filed under accessibility that got closed. However, my scenario is to be able to explain to a user why a menu item is disabled/or not.

What component or utility would this be added to

ContextualMenuItem

Have you discussed this feature with our team, and if so, who

Additional context/screenshots

ContextualMenu Author Feedback Backlog review By Design No Recent Activity Feature

Most helpful comment

@khmakoto @joschect - i think we should close this as "by design". We should never build in the prop to enable tooltip as part of the contextual menu component. that's unnecessary bundle size increase for the component. I think the solution Mak gave is the proper way to solve this.

All 13 comments

Hi @phyllers, thanks for filing this issue!

This seems like a feature request, @joschect what do you think we should do about this? I can certainly try to include tooltips in ContentualMenuItems but I don't know if that's a scenario we want to support and, if we do, if we should do it now or add it to the backlog. Curious to know your opinion on this.

I had an offline conversation with @joschect and we decided that we're putting this feature in the backlog for now while we work on more pressing issues.

@khmakoto we have the exact same scenario to tell the user why the button is disabled. I tried to use the tooltipHostProps but that gets enabled only with IconOnly is set to true and it makes the UI look weird. Is there a workaround for this issue till the feature gets actually shipped?

@abithap, it seems like you're using a specific surface, like a CommandBar for example. Can you tell me if that's the case, and if so which surface you're using?

@khmakoto we are using the CommandBar, is there a way to show the tooltip from CommandBar in disabled state?
We are also using ComboBox with title and it works fine in disabled state.

@abithap let me try to spin up a codepen for the CommandBar where you can show that tooltip.

@abithap I've made this codepen where you can see that the Share button has a tooltip. It is not ideal but it is a workaround while we get to the real issue.

@khmakoto thank you it works. Will wait for the real issue fix. Appreciate your help.

@abithap You're welcome! Let me know if there is anything else I can do to help!

@khmakoto @joschect - i think we should close this as "by design". We should never build in the prop to enable tooltip as part of the contextual menu component. that's unnecessary bundle size increase for the component. I think the solution Mak gave is the proper way to solve this.

@xugao I believe so as well, what do you think @joschect?

@xugao and @khmakoto I agree. I think it's okay to close this as by design. I think that @khmakoto 's solution is the right one, it's a relatively lightweight wrapper that enables the desired behavior and helps keep the contextualmenu decoupled from tooltip.

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 Fabric React!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carruthe picture carruthe  路  3Comments

luisrudge picture luisrudge  路  3Comments

mattcoxonline picture mattcoxonline  路  3Comments

nekoya picture nekoya  路  3Comments

luisrudge picture luisrudge  路  3Comments