docs(ui): add stories for Recharging page#2496
docs(ui): add stories for Recharging page#2496cylewaitforit wants to merge 2 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds MSW-based request mocking to Storybook: a service worker script, request handlers for two API endpoints, Storybook MSW initialization/loader, updated/new stories that opt into or disable mocks, and package/catalog configuration for MSW dependencies and tooling. Changes
Sequence DiagramsequenceDiagram
participant Story as Story Instance
participant Storybook as Storybook Runtime
participant MSWLoader as MSW Loader
participant SW as Service Worker
participant Handlers as MSW Handlers
participant AppNetwork as Browser Network
Story->>Storybook: Load story (msw params)
Storybook->>MSWLoader: Run mswLoader
MSWLoader->>SW: Activate/register worker
Story->>AppNetwork: Fetch /api/...
AppNetwork->>SW: Request intercepted
SW->>Handlers: Route request (mock or passthrough)
Handlers-->>SW: Mocked Response
SW-->>AppNetwork: Respond with mocked payload
AppNetwork-->>Story: Story receives mock data
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
| 📦 Package | 📋 Versions |
|---|---|
| h3 | 5 versions
h3@2.0.1-rc.11 h3@2.0.1-rc.16 h3@2.0.1-rc.20 |
| glob | 5 versions
|
| @rolldown/pluginutils | 5 versions
@rolldown/pluginutils@1.0.0-rc.9 |
| @oxc-project/types | 6 versions
|
💡 To find out what depends on a specific package, run: pnpm -r why example-package
📊 Dependency Size Changes
Warning
This PR adds 13 MB of new dependencies, which exceeds the threshold of 200 kB.
| 📦 Package | 📏 Size |
|---|---|
| msw@2.13.2 | 5.3 MB |
| tldts@7.0.28 | 3.1 MB |
| @mswjs/interceptors@0.41.3 | 1.5 MB |
| graphql@16.13.2 | 1.4 MB |
| tough-cookie@6.0.1 | 755.4 kB |
| tldts-core@7.0.28 | 239.7 kB |
| headers-polyfill@4.0.3 | 133.8 kB |
| @inquirer/core@10.3.2 | 103 kB |
| rettime@0.10.1 | 71.1 kB |
| cookie@1.1.1 | 60.5 kB |
| strict-event-emitter@0.5.1 | 45.7 kB |
| @inquirer/figures@1.0.15 | 38.2 kB |
| @open-draft/deferred-promise@2.2.0 | 25.4 kB |
| @open-draft/logger@0.3.0 | 24.3 kB |
| outvariant@1.4.3 | 23.2 kB |
| msw-storybook-addon@2.0.7 | 22.9 kB |
| yoctocolors-cjs@2.1.3 | 11 kB |
| @open-draft/until@2.1.0 | 10.1 kB |
| @inquirer/confirm@5.1.21 | 9.5 kB |
| wrap-ansi@6.2.0 | 9.5 kB |
| @inquirer/type@3.0.10 | 9.4 kB |
| until-async@3.0.2 | 9.2 kB |
| @inquirer/ansi@1.0.2 | 8 kB |
| mute-stream@2.0.0 | 6.5 kB |
| is-node-process@1.2.0 | 6 kB |
| @types/statuses@2.0.6 | 4.9 kB |
| cli-width@4.1.0 | 4.8 kB |
Total size change: 13 MB
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🔗 Linked issue
#2150
🧭 Context
This would enable a storybook mock page, storybook a11y checks, and chromatic visual regression tests for this page as documented by the storybook stories.
📚 Description
Adds stories for Recharging page.
Adds MSW and MSW storybook addon for mocking API calls on pages in Storybook. (Can be broken into separate PR if this feels too large.)