Skip to content

Conversation

@giamir
Copy link
Contributor

@giamir giamir commented Jan 26, 2026

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.

@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2026

🦋 Changeset detected

Latest 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

@netlify
Copy link

netlify bot commented Jan 26, 2026

Deploy Preview for stacks-svelte ready!

Name Link
🔨 Latest commit b8a22a0
🔍 Latest deploy log https://app.netlify.com/projects/stacks-svelte/deploys/6977a596475932000847b64a
😎 Deploy Preview https://deploy-preview-2145--stacks-svelte.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 project configuration.

@netlify
Copy link

netlify bot commented Jan 26, 2026

Deploy Preview for stacks ready!

Name Link
🔨 Latest commit b8a22a0
🔍 Latest deploy log https://app.netlify.com/projects/stacks/deploys/6977a596c463e90008042d43
😎 Deploy Preview https://deploy-preview-2145--stacks.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 project configuration.

@giamir giamir force-pushed the SPARK-115/button-badges branch from 50367ba to fb74315 Compare January 26, 2026 17:32
@giamir giamir marked this pull request as ready for review January 26, 2026 17:34
@CGuindon
Copy link
Collaborator

"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?

Screenshot 2026-01-26 at 10 26 48 AM

Copy link
Collaborator

@CGuindon CGuindon left a 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.

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