-
Notifications
You must be signed in to change notification settings - Fork 101
fix(button): adjust badge variant #2145
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
base: beta
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: b8a22a0 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for stacks-svelte ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for stacks ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
50367ba to
fb74315
Compare
|
"I used my best judgment for the disabled state since there was no guidance in the figma." Figma had the disabled states... did I miss something?
|
CGuindon
left a comment
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.
LGTM other than the disabled states. I have them in the figma (scroll to the right to see all modes).
I'm not sure if it's worth doing this ticket at the same time or only doing the disabled badges when we tackle that ticket.

SPARK-115
This PR updates the badge variant of the buttons to reflect the colors and style in this figma file.
You can check how all the different combinations looks like in storybook:
https://deploy-preview-2145--stacks-svelte.netlify.app/?path=/story/components-button--badges
I used my best judgment for the disabled state since there was no guidance in the figma.
Visual Tests Bug Fixed as part of this PR:
Retry logic silently passes on exhausted retries
In visual-test-utils.ts, the retry logic was designed to retry non-"Visual diff" errors (like timing issues), but it had a critical flaw: when all 3 retries were exhausted, the do-while loop exited without throwing the error, causing the test to silently pass.
The actual error being thrown was:
Screenshot is not the same width and height as the baseline. Baseline: { width: 227, height: 114 } Screenshot: { width: 256, height: 128 }This error doesn't contain "Visual diff failed.", so it triggered the retry path but never failed the test.
The fix was to track the last error and throw it after the loop exits if we never succeeded.
A lot of the baseline images had to be regenerated because they were silently failing from the time that we change the width and height atomic classes.