-
Notifications
You must be signed in to change notification settings - Fork 82
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
refactor: Introduce 'id' prop on <Tooltip> #2562
base: main
Are you sure you want to change the base?
refactor: Introduce 'id' prop on <Tooltip> #2562
Conversation
BREAKING CHANGE: This commit introduces a required 'id' property on the <Tooltip> component which replaces the random automatcially generated one used previously.
@ClayBenson94 Hey - that use case makes a lot sense to me! In terms of implementation - can we surface the |
@ClayBenson94 do you have some time to make the change Hana suggested? ☝️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lookin good from design standpoint
Summary
This commit introduces a required 'id' property on the
component which replaces the random automatically generated one used previously.
Our application creates snapshot tests using
jest-snapshot
, and the randomly-generated IDs that come from this component make the snapshots no longer deterministic (and would fail on each run).This PR is an attempt to address that. I can't say I'm in love with this solution as it does introduce a breaking change that would require IDs to be placed on
<Tooltip>
components across the board, so I am open to other solutions as well!Related Issues or PRs
How To Test
Screenshots (optional)