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

👍 DX | Making sure storybook can be started encapsulated from the docs. #525

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Rebstorm
Copy link

@Rebstorm Rebstorm commented Jan 25, 2024

Summary

Hey 👋 ,

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-storybook command not looks for if a directory $STATIC_DIR exists, if not, it creates it. Thanks to the -p command, we don't have to create a side effect to create it.
  • updated: The documentation inside of apps/docs/README.md as 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:

  1. npm i (in root)
  2. npm run build:storybook:preview (in root)
  3. 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:
🎺 We get a preview of storybook!

Supporting resources (related issues, external links, etc):

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • New visual snapshots have been generated / updated for any UI changes
  • All developer debugging and non-functional logging has been removed
  • 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

…exists.

(cherry picked from commit 170b3c467358e02155c411364cbf5a89ecde5bbb)
Copy link

changeset-bot bot commented Jan 25, 2024

⚠️ No Changeset found

Latest commit: 985ada3

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

@Rebstorm Rebstorm marked this pull request as ready for review January 25, 2024 12:43
@Rebstorm Rebstorm changed the title 👍 Dx » Making sure Storybook can be started encapsulated from the Gatsby documentation. 👍 DX | Making sure Storybook can be started encapsulated from the Gatsby docs. Jan 25, 2024
@Rebstorm Rebstorm changed the title 👍 DX | Making sure Storybook can be started encapsulated from the Gatsby docs. 👍 DX | Making sure Storybook can be started encapsulated from the docs. Jan 25, 2024
@Rebstorm Rebstorm changed the title 👍 DX | Making sure Storybook can be started encapsulated from the docs. 👍 DX | Making sure storybook can be started encapsulated from the docs. Jan 25, 2024
@Rebstorm
Copy link
Author

Sorry @rezrah, I just updated the branch, mind triggering the workflows again, so I can see whats wrong and fix it?

@Rebstorm
Copy link
Author

Rebstorm commented Jan 25, 2024

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/rewritable-pr-comment@v0.2.1 and probably relies upon a secret.

But the secret should be tied to the repository, right? Hopefully not the PAT?

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