Skip to content
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

Add option to make tooltips non-interactive #282

Open
gsj-bgw opened this issue Oct 16, 2024 · 2 comments
Open

Add option to make tooltips non-interactive #282

gsj-bgw opened this issue Oct 16, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@gsj-bgw
Copy link

gsj-bgw commented Oct 16, 2024

Interactive tooltips sometimes get in the way of clicking menu buttons. It would be nice to have an option to make them non-interactive, or at least provide a CSS class name to target them to turn off pointer events.

@markdon
Copy link

markdon commented Oct 31, 2024

I'm seeing tooltips blocking other buttons:
MFuyq1rZBj

MenuButton TooltipProps

The MenuButton* components could have a TooltipProps prop that is passed to MenuButton, which spreads the props on MenuButtonTooltip, which already accepts additional props for Tooltip.

This would enable setting disableInteractive on the Tooltip among other things.

MenuButtonTooltipContext

Something to consider though, is that a menu bar probably has a lot of MenuButton*s, like this example. So to avoid having to specify the same prop on every single MenuButton*, maybe a MenuButtonTooltipContext would be appropriate. Providing the tooltip props to a Context in our MenuControls component and the MenuButtonTooltip can read that context value and pass those props to Tooltip.

It looks very likely we'll use mui-tiptap in our application, so I could write a PR for this.

@sjdemartini
Copy link
Owner

Thanks for filing. Sounds good to me to add TooltipProps as part of MenuButton. The context option also seems reasonable, but perhaps that can be its own PR, to review/consider in isolation. Would be open to PRs for both, as I don't have time to work on this enhancement myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants