Skip to content

Addon Onboarding: Prebundle react-confetti#29996

Merged
yannbf merged 2 commits intonextfrom
yann/prebundle-react-confetti
Dec 11, 2024
Merged

Addon Onboarding: Prebundle react-confetti#29996
yannbf merged 2 commits intonextfrom
yann/prebundle-react-confetti

Conversation

@yannbf
Copy link
Member

@yannbf yannbf commented Dec 10, 2024

Closes #

What I did

This PR is an attempt to support React 19 without having to fork the react-confetti library

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This pull request has been released as version 0.0.0-pr-29996-sha-871eec73. Try it out in a new sandbox by running npx storybook@0.0.0-pr-29996-sha-871eec73 sandbox or in an existing project with npx storybook@0.0.0-pr-29996-sha-871eec73 upgrade.

More information
Published version 0.0.0-pr-29996-sha-871eec73
Triggered by @yannbf
Repository storybookjs/storybook
Branch yann/prebundle-react-confetti
Commit 871eec73
Datetime Tue Dec 10 07:58:13 UTC 2024 (1733817493)
Workflow run 12251750602

To request a new release of this pull request, mention the @storybookjs/core team.

core team members can create a new canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=29996

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 77.7 MB 77.7 MB 0 B 1.36 0%
initSize 133 MB 133 MB 18.7 kB 0.47 0%
diffSize 55.1 MB 55.2 MB 18.7 kB 0.44 0%
buildSize 6.87 MB 6.87 MB -843 B 0.25 0%
buildSbAddonsSize 1.51 MB 1.51 MB -843 B -0.53 -0.1%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.86 MB 1.86 MB 0 B 0.57 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.57 MB 3.57 MB -843 B 0.1 0%
buildPreviewSize 3.3 MB 3.3 MB 0 B 0.53 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 6.4s 7.1s 668ms -0.39 9.4%
generateTime 18.7s 19.7s 996ms -0.5 5.1%
initTime 12.1s 13.2s 1s -0.52 8%
buildTime 10.5s 10.6s 80ms 1.35 0.7%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 5.2s 4.7s -480ms -1.04 -10%
devManagerResponsive 3.6s 3.6s -62ms -0.9 -1.7%
devManagerHeaderVisible 540ms 497ms -43ms -1.29 🔰-8.7%
devManagerIndexVisible 572ms 531ms -41ms -1.28 🔰-7.7%
devStoryVisibleUncached 1.8s 1.7s -100ms -0.24 -5.7%
devStoryVisible 570ms 526ms -44ms -1.36 🔰-8.4%
devAutodocsVisible 492ms 464ms -28ms -1.19 -6%
devMDXVisible 504ms 508ms 4ms -0.75 0.8%
buildManagerHeaderVisible 547ms 542ms -5ms -0.75 -0.9%
buildManagerIndexVisible 654ms 635ms -19ms -0.72 -3%
buildStoryVisible 506ms 505ms -1ms -0.6 -0.2%
buildAutodocsVisible 426ms 409ms -17ms -0.94 -4.2%
buildMDXVisible 420ms 416ms -4ms -0.84 -1%

Greptile Summary

Here's my concise review of the PR based on the provided information:

Moves react-confetti to devDependencies and prebundles it for React 19 compatibility in the Storybook onboarding addon, ensuring future compatibility without forking the library.

  • Modifies code/addons/onboarding/package.json to move react-confetti from dependencies to devDependencies
  • Enables prebundling of react-confetti for React 19 support
  • Maintains existing onboarding addon functionality while preparing for future React versions
  • Avoids need to fork react-confetti library by handling compatibility internally

The changes are focused and minimal while addressing an important forward compatibility concern for the onboarding experience.

@yannbf yannbf added bug react ci:merged Run the CI jobs that normally run when merged. addon: onboarding labels Dec 10, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@nx-cloud
Copy link

nx-cloud bot commented Dec 10, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit ecd8707. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@storybook-app-bot
Copy link

storybook-app-bot bot commented Dec 10, 2024

Package Benchmarks

Commit: ecd8707, ran on 11 December 2024 at 12:31:15 UTC

The following packages have significant changes to their size or dependencies:

@storybook/addon-onboarding

Before After Difference
Dependency count 2 0 🎉 -2 🎉
Self size 216 KB 235 KB 🚨 +19 KB 🚨
Dependency size 235 KB 670 B 🎉 -235 KB 🎉
Bundle Size Analyzer Link Link

@yannbf yannbf merged commit 25d6ef6 into next Dec 11, 2024
@yannbf yannbf deleted the yann/prebundle-react-confetti branch December 11, 2024 14:24
@yannbf yannbf self-assigned this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addon: onboarding bug ci:merged Run the CI jobs that normally run when merged. react

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants