-
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(button): mouse out #9425
fix(button): mouse out #9425
Conversation
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 244edf7 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/611d5b6c43745d0008d167db 😎 Browse the preview: https://deploy-preview-9425--carbon-react-next.netlify.app |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 244edf7 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/611d5b6ccca1ec0007bcd6e2 😎 Browse the preview: https://deploy-preview-9425--carbon-elements.netlify.app |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 244edf7 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/611d5b6c7d519d0007bc7693 😎 Browse the preview: https://deploy-preview-9425--carbon-components-react.netlify.app |
It seems like tooltips on focus are no longer appearing I'd take a look at #8022 and ensure all use-cases are still being handled, and we'll also need to port these same changes over to |
Added the |
Closes #8961
Refs #7040
Refs #4560
Refs #8022
*** DO NOT MERGE** until the
MouseOut
logic is removed from the Button story.Refactored
Button
as it pertains to how it handles tooltips.Changed
handleFocus
,handleBlur
,handleMouseEnter
, andhandleMouseLeave
ran. In doing so we fairly quickly realized we didn't need thealllowTooltipVisibilty
,isHovered
, andisFocused
states; and replaced them with simplyisTooltipVisible
. This took care of most of the work, but then we found that there were instances where multiple tooltips would occupy the screen simultaneously in some conditions. We ended up gutting the oldcloseTooltips
function and replaced it with the global store for tracking and closing tooltips.Testing / Reviewing
Open storybook and examine Button, specifically
iconOnly
button and theMouseOut
story (the story that needs to be removed before merging the PR). Ensure the tooltips on the button fire on/off correctly with mouse and keyboard control.