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

docs(storybook): update builder to webpack 5 #2386

Merged
merged 20 commits into from
Oct 11, 2022
Merged

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Sep 29, 2022

This PR updates the storybook builder to webpack 5 and enables lazy compilation to reduce startup times and average chunk size. It also makes some updates to stories to remove deprecated features.

Checklist

  • Update the following storybook deps
    • @storybook/addon-a11y@6.5.12
    • @storybook/addon-actions@6.5.12
    • @storybook/addon-essentials@6.5.12
    • @storybook/addon-interactions@6.5.12
    • @storybook/addon-links@6.5.12
    • @storybook/react@6.5.12
    • @storybook/test-runner@0.7.2
  • Update warnings
    • showName is deprecated as name will stop having dual purposes in the future. Please specify a title in globalTypes instead
      • story-helpers.tsx update showNames to title
    • Use 'parameters.key.disable' instead of 'parameters.key.disabled'.
    • argType.defaultValue is deprecated and will be removed in Storybook 7.0.
      • drafts/InlineAutocomplete/InlineAutocomplete.stories.tsx
      • drafts/MarkdownEditor/MarkdownEditor.stories.tsx
      • drafts/MarkdownViewer/MarkdownViewer.stories.tsx
      • PageLayout/interaction.stories.tsx
      • PageLayout/PageLayout.stories.tsx
      • SegmentedControl/examples.stories.tsx
      • SplitPageLayout/SplitPageLayout.stories.tsx
      • stories/Autocomplete.stories.tsx
      • stories/Checkbox.stories.tsx
      • stories/Dialog.stories.tsx
      • stories/IssueLabelToken.stories.tsx
      • stories/Label.stories.tsx
      • stories/Overlay.stories.tsx
      • stories/ProfileToken.stories.tsx
      • stories/Radio.stories.tsx
      • stories/Select.stories.tsx
      • stories/Textarea.stories.tsx
      • stories/TextInput.stories.tsx
      • stories/Token.stories.tsx
      • stories/CheckboxGroup/examples.stories.tsx
      • stories/CheckboxGroup/fixtures.stories.tsx
      • stories/RadioGroup/examples.stories.tsx
      • stories/RadioGroup/fixtures.stories.tsx
      • stories/Switch/examples.stories.tsx
      • stories/Switch/fixtures.stories.tsx
    • Warning: Invalid prop data-source supplied to React.Fragment. React.Fragment can only have key and children props
    • `control.options' is deprecated and will be removed in Storybook 7.0. Define 'options' directly on the argType instead, and use 'control.labels' for custom labels.
      • Button/Button.stories.tsx
      • SegmentedControl/examples.stories.tsx
      • stories/Autocomplete.stories.tsx
      • stories/Dialog.stories.tsx
      • stories/Label.stories.tsx
      • stories/Overlay.stories.tsx
      • stories/Textarea.stories.tsx
      • stories/Token.stories.tsx
      • stories/useAnchoredPosition.stories.tsx
      • stories/CheckboxGroup/examples.stories.tsx
      • stories/CheckboxGroup/fixtures.stories.tsx
      • stories/deprecated/Button.stories.tsx
      • stories/RadioGroup/examples.stories.tsx
      • stories/RadioGroup/fixtures.stories.tsx
      • stories/Switch/examples.stories.tsx
      • stories/Switch/fixtures.stories.tsx

Performance

Builder Manager Preview Build
webpack4 17s 28s 34s
webpack5 17s 24s 29s
webpack5 (LC) 4.2s 8.9s 7.8s

Note
The trade-off for LC is lower startup times but you will have to load each story afterwards. Let me know if it'd be better without this behavior for your development flow!

Bundles

Webpack 4

Screen Shot 2022-09-29 at 3 11 04 PM

Webpack 5

Screen Shot 2022-09-29 at 3 18 44 PM

Webpack 5 (LC, Split chunks)

Screen Shot 2022-09-29 at 3 22 32 PM

@changeset-bot
Copy link

changeset-bot bot commented Sep 29, 2022

⚠️ No Changeset found

Latest commit: 99b36ac

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

@joshblack joshblack added the skip changeset This change does not need a changelog label Sep 29, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 29, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 77.65 KB (+0.09% 🔺)
dist/browser.umd.js 78.31 KB (+0.08% 🔺)

@joshblack joshblack temporarily deployed to github-pages September 29, 2022 21:15 Inactive
@joshblack joshblack temporarily deployed to github-pages October 3, 2022 21:39 Inactive
@joshblack joshblack temporarily deployed to github-pages October 3, 2022 21:53 Inactive
@joshblack joshblack temporarily deployed to github-pages October 3, 2022 22:19 Inactive
@joshblack joshblack temporarily deployed to github-pages October 3, 2022 22:29 Inactive
@joshblack joshblack marked this pull request as ready for review October 4, 2022 16:48
@joshblack joshblack requested review from a team, pksjce and langermank October 4, 2022 16:48
Copy link
Contributor

@colebemis colebemis left a comment

Choose a reason for hiding this comment

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

Nice! ⚡

@joshblack joshblack temporarily deployed to github-pages October 7, 2022 16:24 Inactive
@joshblack
Copy link
Member Author

Note: looks like some snapshots have been unintentionally updated. Going to dig in to them now to see what's going on

@joshblack joshblack temporarily deployed to github-pages October 10, 2022 16:52 Inactive
@joshblack joshblack temporarily deployed to github-pages October 10, 2022 19:48 Inactive
@joshblack joshblack temporarily deployed to github-pages October 11, 2022 19:16 Inactive
@joshblack joshblack temporarily deployed to github-pages October 11, 2022 20:42 Inactive
@joshblack joshblack merged commit e395681 into main Oct 11, 2022
@joshblack joshblack deleted the chore/update-storybook branch October 11, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants