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

Extract Storybook content into subdirectory #1852

Closed
wants to merge 8 commits into from
Closed

Conversation

jclem
Copy link
Contributor

@jclem jclem commented Feb 9, 2022

🚨 πŸ—οΈ WIP: Work in progress 🚧 🚨

Closes #1849 by extracting Storybook files and configuration to the stories/ directory.

Screenshots

Please provide before/after screenshots for any visual changes

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2022

⚠️ No Changeset found

Latest commit: 60886df

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

@jclem jclem changed the title Extract stories Extract Storybook content into subdirectory Feb 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

size-limit report πŸ“¦

Path Size
dist/browser.esm.js 62.5 KB (0%)
dist/browser.umd.js 62.88 KB (0%)

@jclem
Copy link
Contributor Author

jclem commented Feb 9, 2022

All tests are passing except for the checkStoriesForAxeViolations tests, which require the stories themselves.

Now that the root and stories/ directories have separate package.json manifests and node_modules, it appears that we may have two separate instances of React installed. Temporarily, this can be resolved by rm -r-ing the stories/node_modules directory, which wipes out the additional React package installation, but I'm not sure what a permanent fix looks like, yet.

@colebemis
Copy link
Contributor

colebemis commented Feb 9, 2022

πŸ‘‹ I know this isn't done yet, but I wanted to mention that this approach would move us away from the file structure ADR that @jfuchs proposed last quarter. Not a dealbreaker but something to consider.

@jclem
Copy link
Contributor Author

jclem commented Feb 10, 2022

@colebemis I don't think we have a choice, unfortunately, unless we want to continue having Primer React ship non-compiling types in its build output. This happens just because those types are in our node_modules directory when we compile.

The only other solution I might try is to restrict the typeRoots in tsconfig.build.json, but it'll mean listing each build dependency's node_modules types path specifically.

@jclem
Copy link
Contributor Author

jclem commented Feb 10, 2022

Closed in favor of #1855

@jclem jclem closed this Feb 10, 2022
@jclem jclem deleted the extract-stories branch February 10, 2022 18:07
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.

Storybook dependency changes types in build output
2 participants