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

6.1: Storyshot content shifted #13178

Closed
petermikitsh opened this issue Nov 19, 2020 · 5 comments
Closed

6.1: Storyshot content shifted #13178

petermikitsh opened this issue Nov 19, 2020 · 5 comments
Assignees
Labels
Milestone

Comments

@petermikitsh
Copy link
Contributor

Describe the bug

After upgrading to 6.1, I had to regenerate storyshot baselines because screens shifted a couple pixels.

Example: my chip is slightly lower on the right. Storyshot on left generated with 6.0, right is 6.1.

Screen Shot 2020-11-19 at 9 19 38 AM

To Reproduce

  • Generate baselines with 6.0
  • Upgrade to 6.1
  • Observe storyshot diff failures

Expected behavior

Storyshots should be identical between 6.0 and 6.1

Screenshots

Here's another example:

Screen Shot 2020-11-19 at 9 23 30 AM

Code snippets

Maybe this has something to do with layouts?

.storybook/preview.tsx:

export const parameters = {
  layout: 'centered',
};

System

$ npx sb@next info

Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  Binaries:
    Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
    Yarn: 1.22.5 - ~/.yarn/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v12.18.0/bin/npm
  Browsers:
    Safari: 12.1.2

Additional context
Add any other context about the problem here.

@shilman shilman added this to the 6.1 core milestone Nov 19, 2020
@shilman
Copy link
Member

shilman commented Nov 19, 2020

Probably related to layout parameter changes @ndelangen @ghengeveld ?

@shilman shilman added the P0 label Nov 19, 2020
@ghengeveld
Copy link
Member

Must be this one: fe05526

@ghengeveld
Copy link
Member

ghengeveld commented Nov 20, 2020

By the way I don't see a visual difference in the images provided, but I'm not sure what I'm supposed to see. Should certain pixels be highlighted because they changed, or is that not how storyshots works? As far as I'm aware Chromatic hasn't detected any visual differences between 6.0 and 6.1.

Edit: oh I see now, the right-hand is aligned slightly lower.

@petermikitsh
Copy link
Contributor Author

petermikitsh commented Nov 20, 2020

@ghengeveld I believe it's the css rule content: '';

Here's 6.0 vs 6.1 (see 6.1 has scrollbar):

Screen Shot 2020-11-20 at 8 36 00 AM

Screen Shot 2020-11-20 at 8 36 08 AM

Here's 6.1 with the rule turned off:

Screen Shot 2020-11-20 at 8 36 15 AM

@shilman
Copy link
Member

shilman commented Nov 21, 2020

Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.1.2 containing PR #13192 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb upgrade

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants