initiatives ui plan
Initiatives UI Enhancement Plan
Goal
Bring Brain’s GitBook-style UI patterns to the Initiatives section while respecting its unique data structure (Initiatives → Epics → Documents/Stories/Tasks).
Current Analysis
Brain Features to Port
- Reading Progress Bar - Top progress indicator
- Table of Contents (TOC) Panel - Sticky sidebar with scroll spy
- Back to Top Button - Appears when scrolled
- Keyboard Navigation - j/k for prev/next
- Enhanced Breadcrumbs - With folder icons, title case
- Code Copy Buttons - For code blocks
- Smooth Transitions - Content fade-in animations
- Print Optimization - Full document print support
Initiatives-Specific Needs
- Tab-based document switching (Overview, Idea Brief, PRD, etc.)
- Phase stepper visualization
- Story/Task list views
- Initiative → Epic hierarchy
Implementation Plan
Phase 1: Shared Components (Foundation)
Create reusable components in /resources/js/Components/Documentation/:
-
DocumentTocPanel.vue - Generic TOC sidebar
- Scroll spy for active heading
- Click to scroll
- Collapsible on mobile
-
DocumentContentPanel.vue - Generic markdown viewer
- Code copy buttons
- Smooth animations
- Print optimizations
-
DocumentBreadcrumb.vue - Enhanced breadcrumb
- Folder icons for non-clickable segments
- Title case formatting
- Consistent styling
-
DocumentProgress.vue - Reading progress bar
- Horizontal progress indicator
- Smooth animation
-
BackToTopButton.vue - Floating back to top
- Appears on scroll
- Smooth scroll to top
Phase 2: Epic Show Enhancement
Apply components to Epic Show page:
-
Layout Update
- Add reading progress bar at top
- Restructure document tabs to include TOC sidebar
- Add back-to-top button
-
Document Tabs (Idea Brief, PRD, RACI)
- Replace inline TOC with TocPanel component
- Add code copy functionality
- Improve print styles
-
Breadcrumb Enhancement
- Use DocumentBreadcrumb component
- Add folder icon for Initiative segment
-
Keyboard Navigation
- Add j/k for prev/next epic
- Add ? for keyboard shortcuts help
Phase 3: Initiatives Index Enhancement
Improve the master-detail view:
-
Sidebar Refinement
- Add expand/collapse all button
- Improve hover/active states
- Add keyboard navigation (arrows)
-
Detail Panel
- Add loading skeleton
- Smooth transitions between initiatives
-
Search Enhancement
- Keyboard shortcut (Cmd+K)
- Search result highlighting
Phase 4: Polish & Consistency
Final touches:
- Dark Mode - Ensure all new components support dark mode
- Mobile Responsiveness - Test and fix mobile layouts
- Print Styles - Ensure documents print correctly
- Accessibility - ARIA labels, keyboard nav, focus states
Component Architecture
/resources/js/Components/Documentation/├── DocumentBreadcrumb.vue # Enhanced breadcrumb├── DocumentContentPanel.vue # Markdown viewer with code copy├── DocumentProgress.vue # Reading progress bar├── DocumentTocPanel.vue # TOC sidebar with scroll spy├── BackToTopButton.vue # Floating back to top└── KeyboardShortcutsHelp.vue # ? modal showing shortcutsFiles to Modify
New Files
Components/Documentation/DocumentTocPanel.vueComponents/Documentation/DocumentContentPanel.vueComponents/Documentation/DocumentBreadcrumb.vueComponents/Documentation/DocumentProgress.vueComponents/Documentation/BackToTopButton.vue
Modified Files
Pages/Documentation/Initiatives/Epics/Show.vue- Major refactorPages/Documentation/Initiatives/Index.vue- Minor enhancementsicons.ts- Add any new icons
Implementation Order
- Create
DocumentTocPanel.vue(can reuse Brain’s TocPanel logic) - Create
BackToTopButton.vue(extract from BrainLayout) - Create
DocumentBreadcrumb.vue(extract from ContentHeader) - Update Epic Show with new components
- Add keyboard navigation to Epic Show
- Enhance Index page sidebar
- Final polish and testing
Estimated Effort
- Phase 1: 4-6 components
- Phase 2: Major page refactor
- Phase 3: Minor enhancements
- Phase 4: Testing and polish
Success Criteria
- Epic documents have TOC sidebar with scroll spy
- Reading progress bar shows on Epic Show
- Back to top button appears on scroll
- j/k navigates between epics
- Breadcrumbs have folder icons
- Code blocks have copy buttons
- Print produces full document
- Dark mode works correctly