Skip to content

perf: reduce install size and prepare 5.0.2 - #57

Merged
Cylop merged 1 commit into
mainfrom
perf/bundle-spring-generator
Sep 9, 2026
Merged

Cylop merged 1 commit into
mainfrom
perf/bundle-spring-generator

Conversation

@Cylop

@Cylop Cylop commented Sep 9, 2026

Copy link
Copy Markdown

Installing the sheet currently pulls in roughly 9.2 MB of Motion packages to animate a single numeric value. Bundle Motion’s existing spring generator and duration calculation with a small animation-frame driver, making Motion a development dependency and leaving React/React DOM as peers.

The resulting package is approximately 322 KB unpacked including source maps, versus the reported 9.8 MB installation. ESM JavaScript is 10.4 KB gzip including the spring implementation. Public APIs, CSS, spring settings, and reduced-motion behavior are preserved. Cancellation suppresses stale completion callbacks.

Adds numerical comparisons against Motion’s existing engine, lifecycle tests, a 450 KB package budget, clean-install checks requiring no Motion packages, and the bundled MIT notice. Updates the website’s generated size evidence.

Validation:

  • npm run release:check passes on current main plus this change, including 214 unit tests and the production website build.
  • 45 Chromium, Firefox, and Chromium touch interaction tests passed during prototype validation.
  • Ubuntu CI passes all browser jobs, including WebKit interaction and website tests (run 34335422276). This resolves the local macOS WebKit setup limitation.
  • Independent code review found no actionable issues.

Preview review: try opening/closing, rapid reversal, drag-to-snap/flicks, backdrop continuity, and reduced motion. Detailed measurements and maintenance notes are in docs/motion-size-audit.md.

Release preparation: bump to unused patch version 5.0.2, update the changelog, and regenerate website version evidence. Publication will use the protected Release workflow after merge.

@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
react-spring-bottom-sheet Ready Ready Preview Sep 9, 2026 9:34am UTC

@Cylop
Cylop merged commit 0d5b903 into main Sep 9, 2026
7 checks passed
@Cylop Cylop changed the title perf: reduce install size by bundling the spring generator perf: reduce install size and prepare 5.0.2 Sep 9, 2026
@Cylop Cylop mentioned this pull request Sep 9, 2026
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.

1 participant