Contributing to the UI docs
Keep the catalog accurate when shared UI changes. Add metadata, previews, translations, and tests in the same change.
Workflow
Use this checklist before opening a UI docs change for review.
Update the registry
Start in the route-local registry so component IDs, categories, imports, exports, and usage snippets stay consistent.
Add or review the preview
Add a contained preview for safe primitives. Mark complex app shells as pattern previews when they cannot run standalone.
Document the component
Every public component needs installation, usage, examples, API exports, customization points, and related links.
Update translations
Add public copy to both English and Vietnamese message bundles, then sort the bundles.
Verify the change
Run registry integrity tests, route render tests, focused preview tests, type-check, and the final repo check when possible.
Respect package release flow
Do not hand-edit package versions or release metadata. Release Please owns package bumps.
Validation
Use focused checks first, then run the repo checks required for TypeScript and message changes.
bun i18n:sort
bun --cwd apps/web test 'src/app/[locale]/ui/component-docs.test.ts'
bun --cwd apps/web test 'src/app/[locale]/ui/ui-docs-sidebar.test.tsx'
bun --cwd apps/web type-check