Skip to content

feat(frontend): UI Redesign Migration to shadcn/uiΒ #87

@jonasyr

Description

@jonasyr

🎯 Issue Type

  • ✨ Feature - New functionality
  • πŸ”§ Enhancement - Improvement of existing functionality

πŸ“‹ Description

Problem/Need

Current GitRay frontend uses basic styling and a single-page architecture. We need to modernize the UI with a professional component library, implement a landing page β†’ dashboard flow, and add dark/light theme support for better UX.

Expected Behavior

  • Modern, professional UI using shadcn/ui component library
  • Landing page with repository input and info modals
  • Dashboard with tabs for heatmap and commit list
  • Settings drawer with theme selector (light/dark/system)
  • News drawer for updates
  • Responsive design across all devices
  • All existing functionality preserved (API, visualizations, Rive animations)

Current Behavior

  • Single-page application with basic styling
  • No landing page or onboarding flow
  • No theme switching capability
  • Limited component reusability

πŸ”„ Steps to Reproduce

This is a feature implementation. To test completion:

  1. Clone branch feature/ui-redesign
  2. Run npm install and npm run dev
  3. Navigate to landing page - verify hero section, input, info buttons
  4. Enter repository URL and click "Analyze"
  5. Verify redirect to dashboard with data visualizations
  6. Test theme switching in settings drawer
  7. Verify all drawers and modals open/close correctly
  8. Test on mobile devices and different browsers

🎨 Mockups/Screenshots

Mockup files available in design repository. Key components:

  • Landing page with centered hero
  • Dashboard with Header (logo, menu, news bell)
  • Settings drawer (theme selector, future language selector)
  • News drawer (updates with badges)
  • Info modals (3 types: what, private, local)

πŸ§ͺ Acceptance Criteria

  • Landing page implemented with hero, input, and info buttons
  • Dashboard page with tabs (Heatmap/Commits)
  • Header component with conditional navigation
  • Footer component with links
  • Settings drawer with theme switching (light/dark/system)
  • News drawer with release notes
  • Info modals (3 types) functional
  • All existing features work: repository analysis, heatmap, commit list
  • Rive animations preserved (RiveLoader, RiveLogo)
  • Theme persists across sessions
  • Responsive design on mobile/tablet/desktop
  • No console errors
  • TypeScript compiles without errors
  • Test coverage maintained (>80%)
  • Code reviewed and approved
  • Documentation updated

πŸ›  Technical Details

Affected Files/Components

New Structure:

src/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/              # shadcn/ui components (button, card, sheet, dialog, tabs, etc.)
β”‚   β”œβ”€β”€ layout/          # Header, Footer
β”‚   β”œβ”€β”€ drawers/         # SettingsDrawer, NewsDrawer
β”‚   β”œβ”€β”€ modals/          # InfoModal
β”‚   β”œβ”€β”€ visualization/   # ActivityHeatmap, CommitList, RiveLoader (migrated)
β”‚   └── forms/
β”œβ”€β”€ pages/
β”‚   β”œβ”€β”€ LandingPage.tsx  # NEW
β”‚   └── DashboardPage.tsx # NEW
β”œβ”€β”€ lib/
β”‚   └── utils.ts         # cn() function for className merging
└── App.tsx              # Updated with router logic

Updated Files:

  • App.tsx - Page routing, state management
  • tailwind.config.cjs - Theme configuration
  • index.css - CSS variables for theming
  • vite.config.ts - Path aliases
  • ActivityHeatmap.tsx - Styling updates
  • CommitList.tsx - shadcn/ui Table integration

Preserved (no changes):

  • api.ts - API integration
  • RiveLoader.tsx, RiveLogo.tsx - Rive animations
  • dateUtils.ts - Utility functions

Dependencies

New packages to install:

npm install @radix-ui/react-dialog @radix-ui/react-dropdown-menu \
  @radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-separator \
  @radix-ui/react-label @radix-ui/react-slot \
  class-variance-authority clsx sonner tailwind-merge next-themes \
  tailwindcss-animate --save-dev

Depends on:

  • Nothing - can start immediately

Blocks:

  • #[i18n-issue-number] - i18n implementation (must be completed first)

Breaking Changes

  • No, backward compatible change
  • Architecture changes are internal, API integration unchanged

🏷 Categorization

Scope

  • scope:frontend - Frontend/UI changes

Priority

  • prio:high - Important feature/bug

Effort

  • effort:xl - > 3 days (5-7 working days estimated)

🌍 Environment

Development:

  • OS: Cross-platform (Windows, macOS, Linux)
  • Browser: Chrome 120+, Firefox 121+, Safari 17+
  • Node Version: 18+ required
  • Repo Branch: feature/ui-redesign (create from main)

πŸ”— Related Issues/PRs

  • Blocks #[i18n-issue-number] - i18n must wait for UI migration to complete
  • Related to: Design mockups (link if available)

πŸ“ Additional Notes

Implementation Timeline (5-7 days)

Day 1-2: Setup, dependencies, base components, Tailwind config
Day 3: Page components (Landing, Dashboard)
Day 4: Migrate visualization components with new styling
Day 5: Integration, wire everything in App.tsx
Day 6: Testing, polish, bug fixes
Day 7: Code review, documentation, deployment prep

Documentation

Complete migration plan available:

  • docs/migration-plan/MIGRATION_PLAN.md - Full strategy (50 pages)
  • docs/migration-plan/COMPONENT_GUIDE.md - Implementation reference with code
  • docs/migration-plan/DAILY_CHECKLIST.md - Day-by-day tasks
  • docs/migration-plan/QUICK_REFERENCE.md - Developer cheat sheet

Rollback Plan

  • Quick rollback: Revert merge commit (< 5 min)
  • Feature flag option: Toggle between old/new UI if needed
  • Full restoration: Restore from main branch backup (< 30 min)

Success Metrics

  • Bundle size < 550KB (currently ~500KB, allow +50KB for new components)
  • Lighthouse score > 90
  • First Contentful Paint < 1.5s
  • No increase in console errors
  • Test coverage maintained at 80%+

Key Risks & Mitigations

Risk: API integration breaks during refactor

  • Mitigation: Keep API service unchanged, test thoroughly before merge

Risk: Theme switching causes layout issues

  • Mitigation: Use CSS variables properly, test both themes extensively

Risk: Mobile responsiveness issues

  • Mitigation: Test on real devices throughout development

βœ… Checklist for Reviewer

  • Issue is clearly and understandably formulated
  • Acceptance criteria are measurable
  • Labels and priority are set
  • Technical feasibility is given
  • Migration plan documentation linked and accessible
  • Dependencies listed and installable
  • Timeline is realistic (5-7 days confirmed)
  • Rollback strategy documented

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions