Phase 13: UI/UX Polish & Design System Enhancement
Objective: Polish the existing custom design system to create a modern, accessible UI that attracts both users and developers.
Current State: Framework M already has a custom CSS-based design system with dark mode, i18n, and Refine.dev integration. This phase focuses on enhancement, not replacement.
1. Audit Current Design System
1.1 Review Existing Implementation
- Audit
frontend/src/App.cssdesign tokens:- Color palette (currently sky blue
#0ea5e9) - Typography (Inter font family)
- Spacing scale (xs to xl)
- Border radius (sm, md, lg)
- Shadows
- Color palette (currently sky blue
- Review dark mode implementation in
ThemeContext - Test current mobile responsiveness
- Run accessibility audit (Lighthouse, axe-core)
1.2 Identify Gaps
- Document missing components (tooltips, dropdowns, etc.)
- Identify inconsistent spacing/colors
- List accessibility issues (contrast, keyboard nav, ARIA)
- Note missing animations/transitions
2. Refine Color Palette
2.1 Update to Deep Blue (Trust Theme)
- Replace current sky blue (
#0ea5e9) with deep blue palette:--color-primary: #2563eb; /* Deep blue for trust */
--color-primary-dark: #1d4ed8; /* Darker variant */
--color-primary-light: #3b82f6; /* Lighter variant */ - Update semantic colors:
- Success:
#059669(emerald-600) - Warning:
#d97706(amber-600) - Error:
#dc2626(red-600) - Info:
#0284c7(sky-600)
- Success:
2.2 Verify WCAG AA Contrast
- Test all text/background combinations
- Ensure minimum 4.5:1 contrast for normal text
- Ensure minimum 3:1 contrast for UI components
- Test in both light and dark modes
- Use tools: WebAIM Contrast Checker, Lighthouse
2.3 Update Dark Mode Colors
- Refine dark mode palette for better contrast
- Test readability in low-light environments
- Ensure primary blue works in dark mode (
#38bdf8)
3. Typography & Spacing Refinement
3.1 Typography Scale
- Review current font sizes (14px base)
- Add missing heading sizes if needed
- Ensure consistent line-heights (1.3 for headings, 1.5 for body)
- Test readability at different viewport sizes
3.2 Spacing Consistency
- Audit all components for consistent spacing
- Use spacing scale consistently (xs, sm, md, lg, xl)
- Fix any hard-coded pixel values
- Document spacing patterns (e.g., card padding, button spacing)
4. Component Polish
4.1 Buttons
- Add hover/active/focus states
- Add loading state (spinner)
- Add disabled state styling
- Ensure consistent sizing (height, padding)
- Add keyboard focus indicators (visible outline)
4.2 Form Inputs
- Polish input focus states (already has blue ring)
- Add error state styling (red border + message)
- Add success state styling (green border)
- Improve placeholder text contrast
- Add floating labels (optional enhancement)
4.3 Tables
- Add row hover effects (already exists)
- Add sortable column indicators
- Add loading skeleton for data tables
- Improve mobile table responsiveness (card view)
- Add empty state illustration
4.4 Cards
- Add subtle shadow on hover
- Ensure consistent border radius
- Add loading skeleton variant
- Test card layouts on mobile
4.5 Sidebar
- Polish active state (already uses primary color)
- Add smooth collapse animation
- Improve search input styling
- Add keyboard navigation support
- Test mobile drawer behavior
4.6 Navbar
- Polish search bar styling
- Add user menu dropdown
- Add notification badge
- Ensure consistent height (56px)
5. Animations & Micro-interactions
5.1 Add CSS Transitions
- Button hover effects (0.15s ease)
- Input focus transitions (0.15s ease)
- Sidebar item hover (0.15s ease)
- Card hover effects (subtle lift)
- Modal/drawer slide-in animations
5.2 Loading States
- Add skeleton loaders for:
- List view (table rows)
- Form view (form fields)
- Dashboard (cards)
- Add spinner component for buttons
- Add page transition fade
5.3 Optimistic UI Updates
- Instant feedback on create (fade in new row)
- Instant feedback on update (highlight changed row)
- Instant feedback on delete (fade out row)
- Rollback on error with toast notification
6. Mobile Optimization
6.1 Responsive Layouts
- Test all screens on mobile viewports:
- 320px (iPhone SE)
- 375px (iPhone 12/13)
- 414px (iPhone 12 Pro Max)
- 768px (iPad)
- Ensure sidebar collapses to drawer on mobile
- Test table responsiveness (switch to card view)
- Ensure touch targets are min 44px
6.2 Mobile-Specific Enhancements
- Add swipe gestures for sidebar drawer
- Optimize form layouts for mobile (single column)
- Add bottom navigation (optional)
- Test keyboard behavior on mobile browsers
7. Accessibility (WCAG 2.1 AA)
7.1 Color Contrast
- Run automated contrast checks (Lighthouse)
- Fix any failing combinations
- Ensure all interactive elements meet 3:1 minimum
- Test with color blindness simulators
7.2 Keyboard Navigation
- Test tab order for all pages
- Add visible focus indicators (already has some)
- Implement keyboard shortcuts:
-
Ctrl+Kfor command palette (already exists) -
Escto close modals/drawers - Arrow keys for table navigation
-
Enterto activate buttons
-
- Add skip navigation links
7.3 Screen Reader Support
- Add ARIA labels to all interactive elements
- Add ARIA live regions for dynamic content (toasts, notifications)
- Test with screen readers:
- NVDA (Windows)
- JAWS (Windows)
- VoiceOver (macOS/iOS)
- Add meaningful alt text for images/icons
7.4 Form Accessibility
- Ensure all inputs have associated labels
- Add ARIA descriptions for error messages
- Add required field indicators (
*or "required" text) - Add field help text with
aria-describedby
8. Missing Components
8.1 Add Essential Components
- Tooltip - For icon buttons and help text
- Dropdown Menu - For user menu, actions
- Toast Notifications - For success/error messages
- Modal Dialog - For confirmations, forms
- Badge - For counts, status indicators
- Alert - For warnings, errors, info messages
- Tabs - For multi-section forms/views
- Accordion - For collapsible sections
8.2 Implementation Approach
- Use vanilla CSS + React state (no library)
- Follow existing design token patterns
- Ensure dark mode support
- Add to component library documentation
9. Documentation
9.1 Design System Documentation
- Create
docs/design-system.md:- Color palette with hex codes
- Typography scale
- Spacing system
- Component patterns
- Animation principles
- Accessibility guidelines
9.2 Component Documentation
- Document each component with:
- Usage examples
- Props/variants
- Accessibility notes
- Code snippets
9.3 Storybook (Optional)
- Set up Storybook for component showcase
- Create stories for all components
- Add dark mode toggle in Storybook
- Deploy Storybook for team reference
10. Performance Optimization
10.1 CSS Optimization
- Remove unused CSS rules
- Minimize CSS file size
- Use CSS containment where applicable
- Optimize font loading (already using Google Fonts)
10.2 Bundle Size
- Analyze bundle size with Vite build
- Code-split large components
- Lazy load routes
- Optimize images (use WebP, lazy loading)
10.3 Runtime Performance
- Test First Contentful Paint (FCP) - target
< 1.5s - Test Time to Interactive (TTI) - target
< 3s - Test Largest Contentful Paint (LCP) - target
< 2.5s - Optimize re-renders (React.memo, useMemo)
11. Testing
11.1 Visual Regression Testing
- Set up Chromatic or Percy (optional)
- Create visual snapshots for key pages
- Test across browsers:
- Chrome
- Firefox
- Safari
- Edge
11.2 Accessibility Testing
- Run Lighthouse accessibility audit (target 100)
- Run axe-core automated tests
- Manual keyboard-only testing
- Manual screen reader testing
11.3 Cross-Browser Testing
- Test on Windows (Chrome, Firefox, Edge)
- Test on macOS (Chrome, Firefox, Safari)
- Test on iOS (Safari, Chrome)
- Test on Android (Chrome)
12. Example Screens Enhancement
12.1 Polish Reference Screens
- Dashboard - Add chart widgets, metric cards
- List View - Polish filters, search, pagination
- Form View - Polish validation, error states
- Detail View - Add tabs, related lists
- Settings Page - Add sections, save states
12.2 Create Demo Content
- Add sample data for screenshots
- Create video walkthrough showing:
- Dark mode toggle
- Mobile responsiveness
- Smooth animations
- Accessibility features
Validation Checklist
Before considering Phase 13 complete, verify:
- Deep blue color palette is consistently applied
- Dark mode works perfectly across all screens
- Mobile responsiveness is 100% (tested on real devices)
- WCAG 2.1 AA compliance verified (Lighthouse score 100)
- All animations are smooth (60fps)
- No UI library dependencies (pure CSS + React)
- Design system is documented
- Developers say: "Wow, this looks professional!"
Success Metrics
Before (Current State)
- Custom CSS design system (good foundation)
- Sky blue color palette
- Basic dark mode
- Some mobile responsiveness
- Minimal animations
After (Target State)
- Polished design system with deep blue palette
- Smooth transitions and micro-interactions
- 100% mobile responsive with touch-friendly UI
- WCAG 2.1 AA compliant (verified)
- Professional, modern aesthetic that attracts users and developers
- Zero UI library dependencies - pure custom CSS
Notes
- No shadcn/ui or Ant Design - We already have a custom system
- No Tailwind in Desk UI - Keep vanilla CSS approach (Studio uses Tailwind)
- Enhance, don't replace - Build on existing CSS variables
- Focus on polish - Animations, spacing, colors, accessibility
- Document everything - Make the design system reusable