docs(ui): add stories for Translation Status page#2559
docs(ui): add stories for Translation Status page#2559cylewaitforit 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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughExtracted the Storybook MSW i18n status handler into a new Changes
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! |
dd673c0 to
d4d445c
Compare
d4d445c to
8e8113c
Compare
| export const Default: Story = {} | ||
|
|
||
| /** No API response — the fetch never succeeds so `fetchStatus` stays as `'pending'`. Shows skeleton blocks in the locale list and skeleton inlines in body text. */ | ||
| export const WithoutTranslationData: Story = { |
There was a problem hiding this comment.
When the translation data is unavailable or loading, the page uses new Date().toISOString(). That will mean that the visual regression snapshot for this test will constantly have a different date on it.
While we could probably mock Date() to make that less flaky for the visual regression tests, I wonder if the page should show something else when the data isn't present. Open to other's thoughts.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.storybook/handlers/lunaria-status.ts:
- Around line 160-177: The pt-PT missingKeys array in
.storybook/handlers/lunaria-status.ts contains a duplicate entry
'package.license', causing the list length to be off; open the missingKeys array
for locale 'pt-PT' (look for the literal array that includes 'package.license'
twice) and remove the duplicate so every key is unique, or replace the literal
with a deduplicated construct (e.g., build the array via a Set) so the count
equals totalKeys - completedKeys; ensure the final array contains 75 distinct
entries and update any inline comments if present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1c161b07-b07a-4995-b755-af31190b0b52
📒 Files selected for processing (4)
.storybook/handlers.ts.storybook/handlers/lunaria-status.tsapp/pages/settings.stories.tsapp/pages/translation-status.stories.ts
💤 Files with no reviewable changes (1)
- .storybook/handlers.ts
🔗 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 Translation Status page.
Moved
i18nStatusHandlerinto its own file in a new handlers directory since the amount of mock data in that handler had grown considerably to support mocking this page.