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

Reset Diff Toggles for New Stories #187

Conversation

thafryer
Copy link
Member

@thafryer thafryer commented Feb 16, 2024

Previously, if you changed to a story where the comparison is new and the Baseline toggle shows the baseline snapshot, there would be no image shown in the comparison viewer. This PR adjusts the behavior so that for new stories, the user always sees the latest snapshot.

To QA:

  1. Install this canary.
  2. Add a new Story to an Existing Storybook and change an existing story within the Storybook.
  3. Go to the existing story and toggle the snapshot so that you see the Baseline image.
  4. Go to the New Story and verify that you see "Latest Snapshot" along with the image.
📦 Published PR as canary version: 1.1.10--canary.187.a1de870.0

✨ Test out this PR locally via:

npm install @chromatic-com/storybook@1.1.10--canary.187.a1de870.0
# or 
yarn add @chromatic-com/storybook@1.1.10--canary.187.a1de870.0

@thafryer thafryer force-pushed the jarel/ap-4098-bug-toggling-between-changed-and-added-stories-with-baseline branch 2 times, most recently from 6bf4eed to ea86b92 Compare February 16, 2024 02:08
@thafryer thafryer marked this pull request as ready for review February 16, 2024 02:37
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.

Code changes LGTM but can we have some stories for these situations (new test, new mode, new browser?)

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.

Code changes LGTM but can we have some stories for these situations (new test, new mode, new browser?)

Copy link
Contributor

@andrewortwein andrewortwein left a comment

Choose a reason for hiding this comment

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

Code looks good and QA worked as expected

@thafryer thafryer force-pushed the jarel/ap-4098-bug-toggling-between-changed-and-added-stories-with-baseline branch from ea86b92 to ef8d100 Compare February 23, 2024 22:31
@thafryer thafryer force-pushed the jarel/ap-4098-bug-toggling-between-changed-and-added-stories-with-baseline branch from 6a53faf to b9d9130 Compare February 24, 2024 01:07
@thafryer thafryer force-pushed the jarel/ap-4098-bug-toggling-between-changed-and-added-stories-with-baseline branch from b990c64 to a1de870 Compare February 24, 2024 01:16
@thafryer thafryer merged commit 602ab25 into main Feb 24, 2024
6 checks passed
@thafryer thafryer deleted the jarel/ap-4098-bug-toggling-between-changed-and-added-stories-with-baseline branch February 24, 2024 01:21
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.

4 participants