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

Fix Tooltip overwritten prop #12594

Merged
merged 2 commits into from
Mar 28, 2024
Merged

Fix Tooltip overwritten prop #12594

merged 2 commits into from
Mar 28, 2024

Conversation

pettinarip
Copy link
Member

Description

Avoids the overwriting of the prop onOpen and calls it after it is handled internally.

Related Issue

Fixes #12592

Copy link

netlify bot commented Mar 27, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit a841cc3
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/660541c1c590850008e9d768
😎 Deploy Preview https://deploy-preview-12594--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@TylerAPfledderer TylerAPfledderer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @pettinarip !

I see this working fine to address the hover issue. I will point out that it is breaking the AlwaysOpen story; essentially losing the intended snapshot of the tooltip on open which creates a regression.

If it can no longer accept the isOpen from the outside, can just accept the regression and look to add it to my PR that adds interaction testing with the play feature.

@pettinarip
Copy link
Member Author

Hey @pettinarip !

I see this working fine to address the hover issue. I will point out that it is breaking the AlwaysOpen story; essentially losing the intended snapshot of the tooltip on open which creates a regression.

If it can no longer accept the isOpen from the outside, can just accept the regression and look to add it to my PR that adds interaction testing with the play feature.

No. This is a great catch from the Storybook tests. I think we should keep that flexibility. I've fixed this reverting the changes and adding a new prop onBeforeOpen that lets you do whatever you need on this event.

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pettinarip! And thank you @TylerAPfledderer for the help reviewing!

@wackerow wackerow merged commit 4140ed0 into staging Mar 28, 2024
10 checks passed
@wackerow wackerow deleted the fix-tooltip-overwritten-prop branch March 28, 2024 15:19
This was referenced Mar 28, 2024
This was referenced Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants