:+1: DX | Making sure `storybook` can be started encapsulated from the `docs`.
Summary
Hey :wave: ,
Cool stuff we have here. I wanted to contribute slightly to the DX. Currently we have two apps who live inside of this monorepo:
docs
storybook
They're (to my understanding) supposed to be able to run and live in parallel. I noticed that when starting the storybook in preview mode, that was not the case, as the build would fail, because of a built resource from Gatsby would be missing, and the -o argument inside of the storybook build script would fail.
This fixes that, and allows devs to just start storybook, avoiding a race condition. Vice versa, it does not mess with the docs build progress.
List of notable
-
updated: The
build-storybookcommand not looks for if a directory$STATIC_DIRexists, if not, it creates it. Thanks to the-pcommand, we don't have to create a side effect to create it. -
updated: The documentation inside of
apps/docs/README.mdas it references a command which does not exist.
What should reviewers focus on?
Ive tested pretty thoroughly that the built is not encapsulated in such a way that we can start storybook without messing with the Gatsby build, for quick and easy previewing.
Steps to test:
-
npm i(in root) -
npm run build:storybook:preview(in root) -
npm run start:storybook(in root)
On main:
ERR! Failed to load static files, no such directory: [outside of module]/apps/docs/public/static
On branch:
:trumpet: We get a preview of storybook!
Supporting resources (related issues, external links, etc):
Contributor checklist:
- [x] All new and existing CI checks pass
- [x] Tests prove that the feature works and covers both happy and unhappy paths
- [x] Any drop in coverage, breaking changes or regressions have been documented above
- [x] New visual snapshots have been generated / updated for any UI changes
- [x] All developer debugging and non-functional logging has been removed
- [x] Related issues have been referenced in the PR description
Reviewer checklist:
- [ ] Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
- [ ] Check that tests prove the feature works and covers both happy and unhappy paths
- [ ] Check that there aren't other open Pull Requests for the same update/change
Screenshots:
Please try to provide before and after screenshots or videos
Before: sad.webm
After: happy.webm
⚠️ No Changeset found
Latest commit: 985ada31c5f032401caae7b5d243fe7ae62564c6
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Sorry @rezrah, I just updated the branch, mind triggering the workflows again, so I can see whats wrong and fix it?
I'd love to fix those failing actions, but I do not think I am allowed to. It looks like they are asking for secrets.
Ui test, Visual test, & Deploy all seem to use the action phulsechinmay/[email protected] and probably relies upon a secret.
But the secret should be tied to the repository, right? Hopefully not the PAT?