docs(ui): add stories for Settings page#2545
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds Storybook stories for the Settings page, a new MSW handler exposing i18n status at Changes
Sequence Diagram(s)sequenceDiagram
participant Storybook
participant Head as preview-head.html
participant MSW
participant Settings as Settings component
Storybook->>Head: load page (head script runs)
Head-->>Storybook: window.__NUXT_COLOR_MODE__ defined
Storybook->>Settings: mount Settings story (decorators apply)
Settings->>MSW: GET /lunaria/status.json
MSW-->>Settings: 200 JSON (generatedAt, sourceLocale, locales...)
Settings->>Storybook: render UI (translation helper / locale metrics)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| '@nuxtjs/i18n', | ||
| ...(isStorybook ? [] : ['@nuxt/fonts', '@nuxtjs/color-mode']), | ||
| '@nuxtjs/color-mode', | ||
| ...(isStorybook ? [] : ['@nuxt/fonts']), |
There was a problem hiding this comment.
We also have to load those in the preview-head file at the moment. So we have them, just not from @nuxt/fonts.
Would be great to not have any special carve outs for storybook in the nuxt config eventually.

🔗 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 Settings page.
Removes conditional logic for '@nuxtjs/color-mode' when using storybook and moves
__NUXT_COLOR_MODE__mocking to the preview-head file. This both reduces the workarounds for storybook in the nuxt config as well as prevents the storybook from crashing when a theme was selected on the Settings page in the storybook.