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

Add toggle to show baseline snapshot image #38

Merged

Conversation

weeksling
Copy link
Contributor

@weeksling weeksling commented Aug 17, 2023

Adds the toggle to select between baseCapture and headCapture.

📦 Published PR as canary version: 0.0.33--canary.38.2a60794.0

✨ Test out this PR locally via:

npm install @chromaui/addon-visual-tests@0.0.33--canary.38.2a60794.0
# or 
yarn add @chromaui/addon-visual-tests@0.0.33--canary.38.2a60794.0

@linear
Copy link

linear bot commented Aug 17, 2023

AP-3440 Add toggle to show baseline snapshot image

We will show a toggle in the bottom toolbar for switching between snapshots. It will look like this by default when a change is detected:

Lastest - Visual testing in Storybook (Figma)

And, when switched, like this:

Baseline - Visual testing in Storybook (Figma)

@weeksling weeksling force-pushed the matt/ap-3440-add-toggle-to-show-baseline-snapshot-image branch 2 times, most recently from ee59263 to 0f94197 Compare August 17, 2023 19:42
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a bit garbled because I reordered the icons.

The extra changes here were:

  • Moved the toggle diff button to the end of the icons where it is in designs.
  • Added the WithTooltip to the icons.
    The new

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The new changes are around line 170.

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

LGTM, although I think we may as well add one more story

@@ -52,6 +52,7 @@ const meta = {
tests,
isAccepting: false,
onAccept: action("onAccept"),
baselineImageVisible: false,
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a story where it is visible?

@weeksling weeksling force-pushed the matt/ap-3440-add-toggle-to-show-baseline-snapshot-image branch from 60e4e23 to 8f94fc8 Compare August 23, 2023 16:54
…ests into matt/ap-3440-add-toggle-to-show-baseline-snapshot-image
@weeksling weeksling force-pushed the matt/ap-3440-add-toggle-to-show-baseline-snapshot-image branch from 8f94fc8 to 8441906 Compare August 23, 2023 16:55
@weeksling weeksling merged commit 1657221 into main Aug 23, 2023
6 checks passed
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.

None yet

2 participants