Skip to content

Comments

P2-2: Dynamic Slide Generation#23

Open
ib823 wants to merge 1 commit intomainfrom
feat/p2-dynamic-slides
Open

P2-2: Dynamic Slide Generation#23
ib823 wants to merge 1 commit intomainfrom
feat/p2-dynamic-slides

Conversation

@ib823
Copy link
Owner

@ib823 ib823 commented Oct 7, 2025

🎯 Summary

Implements P2-2: Dynamic Slide Generation - Adaptive presentation slides based on project data.

Per Roadmap: Sprint 3 (P2-2) - Dynamic Slide Generation


📦 What's Included

1. Slide Generator (src/lib/presentation/slide-generator.ts)

  • Conditional slide logic based on project data
  • Slide count varies by complexity (5-8 range)
  • Utilities for reordering and visibility toggle
  • Slide validation and recommendations

Conditional Logic:

{
  id: 'phase-breakdown',
  title: 'Phase Breakdown',
  type: 'phase-breakdown',
  enabled: phases.length > 3,  // Only if >3 phases
  order: 3,
}

2. Slide Components (src/components/project-v2/modes/slides/SlideComponents.tsx)

  • Modular, reusable slide components
  • Data-driven rendering
  • Framer Motion animations
  • 8 slide types:
    • Cover (always)
    • Requirements (if chips exist)
    • Timeline (if phases exist)
    • Phase Breakdown (if >3 phases)
    • RICEFW (if items exist - placeholder)
    • Team Structure (if resources exist)
    • Milestones (uses phases)
    • Summary (always)

3. PresentModeV2 (src/components/project-v2/modes/PresentModeV2.tsx)

  • Dynamic slide rendering
  • Slide management panel (press 'S')
  • Hide/show individual slides
  • Reorder slides (UI ready, drag TBD)
  • Keyboard navigation (arrows, Escape, 'S')

🎨 Features

Conditional Slide Inclusion

Slide Condition Purpose
Cover Always Project overview
Requirements chips.length > 0 Show captured requirements
Timeline phases.length > 0 Show implementation timeline
Phase Breakdown phases.length > 3 Detailed phase info for complex projects
RICEFW ricefwItems.length > 0 Custom objects (placeholder)
Team Structure Resources exist Team composition
Milestones Phases exist Key deliverables
Summary Always Project summary

Slide Management UI

  • Settings Panel: Press 'S' to toggle
  • Hide/Show: Eye icon to toggle visibility
  • Reorder: Drag handle (UI ready, drag logic TBD)
  • Visual Feedback: Disabled slides grayed out

Navigation

  • Keyboard: ← → arrows, Escape to exit, 'S' for settings
  • Mouse: Navigation buttons, slide dots, settings button
  • Counter: Shows current/total (e.g., "3 / 7")

✅ Definition of Done (from Roadmap)

  • Slides generated based on project data
  • RICEFW slide only if items exist (placeholder for now)
  • Phase breakdown only if >3 phases
  • Slide count varies by project (5-8 range)
  • User can reorder slides (UI ready, drag TBD)
  • User can hide/show slides

🔧 Technical Details

Slide Generation Flow

1. Generate slide configs based on project data
2. Filter enabled slides
3. Sort by order
4. Render components dynamically

Type-Safe Slide System

export type SlideType = 
  | 'cover' 
  | 'requirements' 
  | 'timeline'
  | 'phase-breakdown'
  | 'ricefw'
  | 'team'
  | 'milestones'
  | 'summary';

Validation

  • Cover must be first
  • Summary must be last
  • No duplicate IDs
  • Min 3 slides (cover + summary + 1 content)

📝 Files Changed

Created:

  • src/lib/presentation/slide-generator.ts (180 lines)
  • src/components/project-v2/modes/slides/SlideComponents.tsx (260 lines)
  • src/components/project-v2/modes/PresentModeV2.tsx (260 lines)

Modified:

  • tsconfig.tsbuildinfo (auto-generated)

🚀 Next Steps

  1. Drag-and-Drop: Implement actual drag reordering (use @dnd-kit or react-beautiful-dnd)
  2. RICEFW Integration: Connect to actual RICEFW data when available
  3. Replace PresentMode: Swap PresentMode with PresentModeV2 in ProjectShell
  4. Persistence: Save user's slide preferences to localStorage
  5. Export: Ensure PDF export works with dynamic slides

🔗 Related


🤖 AI Context

Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

**Core Implementation:**
- Dynamic slide generator based on project data
- Conditional slide inclusion (RICEFW, phase breakdown, etc.)
- Slide count varies by project (5-8 range)
- Slide management UI (reorder, hide/show)

**Files Created:**
- `src/lib/presentation/slide-generator.ts` (slide logic)
- `src/components/project-v2/modes/slides/SlideComponents.tsx` (slide components)
- `src/components/project-v2/modes/PresentModeV2.tsx` (updated present mode)

**Features:**
1. **Conditional Slides:**
   - Requirements: only if chips exist
   - Timeline: only if phases exist
   - Phase Breakdown: only if >3 phases
   - RICEFW: only if items exist (placeholder for now)
   - Team Structure: only if resources exist
   - Milestones: shows phases as milestones

2. **Slide Management:**
   - Settings panel (press 'S' to toggle)
   - Hide/show individual slides
   - Reorder slides (UI ready, drag pending)
   - Visual indicators for visibility

3. **Navigation:**
   - Keyboard: Arrow keys, Escape, 'S' for settings
   - Mouse: Navigation buttons, dots, settings button
   - Slide counter shows current/total

**Definition of Done (from Roadmap):**
- [x] Slides generated based on project data
- [x] RICEFW slide only if items exist (placeholder)
- [x] Phase breakdown only if >3 phases
- [x] Slide count varies by project (5-8 range)
- [x] User can reorder slides (UI ready)
- [x] User can hide/show slides

**Next Steps:**
- Add drag-and-drop for slide reordering
- Connect to actual RICEFW data when available
- Replace PresentMode with PresentModeV2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Oct 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cockpit Ready Ready Preview Comment Oct 7, 2025 2:55am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant