Description
Current loading states vary between spinners, dots, and ad-hoc skeletons. Define a coherent set of branded loading states: button spinner, inline progress, page-level loader, and section skeleton, all using one shimmer token.
Requirements and context
- Must be accessible (WCAG 2.1 AA), responsive, and documented in the design system
- Should be consistent with existing patterns and easy to review
- Relevant code:
src/components/Button.tsx
- Shimmer must pause under
prefers-reduced-motion; spinners must include aria-label
Suggested execution
- Fork the repo and create a branch
git checkout -b uiux/branded-loading-states
- Implement changes
- Define the shimmer token and four loading variants
- Document when to use each (latency thresholds)
- Add reduced-motion fallback
- Validate accessibility and responsive assumptions
Test and commit
- Run checks
npm run lint and component/visual tests
- Cover edge cases
- Sub-200ms (no spinner), 200ms-2s, >2s with cancel, mobile, RTL
- Include screenshots/before-after and accessibility (axe) notes
Example commit message
design: branded loading states with shimmer token
Guidelines
- Minimum 95 percent test coverage
- Clear documentation
- Timeframe: 96 hours
Description
Current loading states vary between spinners, dots, and ad-hoc skeletons. Define a coherent set of branded loading states: button spinner, inline progress, page-level loader, and section skeleton, all using one shimmer token.
Requirements and context
src/components/Button.tsxprefers-reduced-motion; spinners must includearia-labelSuggested execution
git checkout -b uiux/branded-loading-statesTest and commit
npm run lintand component/visual testsExample commit message
design: branded loading states with shimmer tokenGuidelines