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

preview stats when building storybook for Chromatic "TurboSnap" #9462

Merged

Conversation

majimaccho
Copy link
Contributor

Why is this PR created?

The default yarn rw storybook --build doesn't generate preview-stats.json which is required for TurboSnap feature of Chromatic.
image

https://www.chromatic.com/docs/turbosnap/

How it's tested

I made same change in my local environment and build my real project and confirmed successful build and generation of the preview-stats.json.
image

@Josh-Walker-GM Josh-Walker-GM added the release:feature This PR introduces a new feature label Nov 15, 2023
@Josh-Walker-GM Josh-Walker-GM added this to the next-release milestone Nov 15, 2023
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a comment

Choose a reason for hiding this comment

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

Thanks for this, it looks good! The only concern I had was that this wouldn't be opt-in and the new file generated appears to be quite large. On balance, I'd be happy to get this in as it is and get your setup working more smoothly.

You'll notice just a small linting warning on the files changed. We have a yarn lint --fix command you can run from within the framework which should fix these for you. That's the only change I'm looking for here.

I can also just do that for you and then get this in if you'd prefer, that's not a problem either.

@Josh-Walker-GM Josh-Walker-GM self-assigned this Nov 15, 2023
@majimaccho
Copy link
Contributor Author

Thanks for this, it looks good! The only concern I had was that this wouldn't be opt-in and the new file generated appears to be quite large. On balance, I'd be happy to get this in as it is and get your setup working more smoothly.

You'll notice just a small linting warning on the files changed. We have a yarn lint --fix command you can run from within the framework which should fix these for you. That's the only change I'm looking for here.

I can also just do that for you and then get this in if you'd prefer, that's not a problem either.

Thank you for your kind explanation.
I built this project locally and ran yarn eslint --fix.
Then I got some unexpected changes attached below.
image

I just committed the file I modified.
If you want me to commit these too, I can do so.

Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a comment

Choose a reason for hiding this comment

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

Yeah off the top of my head I'm not sure where all those other file changes have come from. No need for them in this PR.

Thanks again!

@Josh-Walker-GM Josh-Walker-GM merged commit e75d074 into redwoodjs:main Nov 16, 2023
32 checks passed
jtoar pushed a commit that referenced this pull request Nov 16, 2023
## Why is this PR created?
The default `yarn rw storybook --build` doesn't generate
preview-stats.json which is required for TurboSnap feature of Chromatic.

![image](https://github.com/redwoodjs/redwood/assets/43738254/bcab7455-0917-4fb2-95d3-afee174c8a6a)

https://www.chromatic.com/docs/turbosnap/

## How it's tested
I made same change in my local environment and build my real project and
confirmed successful build and generation of the preview-stats.json.

![image](https://github.com/redwoodjs/redwood/assets/43738254/15b1dd24-c0b9-497b-9775-d41984b1bc73)
@jtoar jtoar modified the milestones: next-release, v6.4.0 Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants