FRESH START V3
Documentation for Plans
🚀 Universe Canvas V3 - Fresh Start Plan
🎯 The Problem
We've been trying to combine Canvas V2 + Grid-Canvas and it's resulted in:
- ❌ Broken UI (dropdown menu instead of inline buttons)
- ❌ Conflicting CSS and component structure
- ❌ "No modules found" still broken
- ❌ Overall terrible UX
USER DECISION: Start from scratch with brand new components ✅
🏗️ Fresh Architecture Plan
Core Philosophy
Take what WORKS from grid-canvas, apply it to Canvas V2's architecture
What We'll Keep from Grid-Canvas ✅
- EXACT HTML structure for toolbar (that was working perfectly)
- EXACT SCSS for beautiful styling (gradients, glass morphism)
- Mode selector implementation (inline buttons, not dropdown)
- Pink Grid Edit toolbar (that beautiful gradient)
- Module palette (left sidebar with actual modules showing)
- Config panel (right sidebar, pushes canvas)
What We'll Keep from Canvas V2 ✅
- Section-based architecture (recursive sections)
- CanvasStateService (state management with signals)
- Responsive modes (Desktop/Tablet/Mobile)
- Module placement service (smart placement logic)
📂 New Component Structure
libs/libs-structural/modular-universe/src/lib/universe-canvas-v3/
├── components/
│ ├── canvas-builder/ # Main orchestrator (like grid-canvas)
│ ├── canvas-toolbar/ # Top toolbar (EXACT copy from grid-canvas)
│ ├── canvas-section/ # Section rendering (recursive)
│ ├── module-palette/ # Left sidebar (working modules)
│ └── section-config/ # Right sidebar (config panel)
├── services/
│ ├── canvas-state.service.ts # State management (from Canvas V2)
│ └── module-placement.service.ts # Smart placement
└── models/
├── canvas.types.ts # Type definitions
└── section.types.ts # Section types
🎨 UI/UX Design
Top Toolbar (Grid-Canvas Style)
[Title] [Select|Add|Resize|Reorder|Divide|Grid Edit] [Flexbox|Grid] [Desktop|Tablet|Mobile] [Undo|Redo] [Status]
Layout
┌─────────────────────────────────────────────────────────────┐
│ [Top Toolbar - Grid-Canvas Style] │
├──────┬──────────────────────────────────────────────┬──────┤
│ │ │ │
│ Mod │ Canvas Area │ Cfg │
│ ule │ (Sections + Grid) │ Pan │
│ Pal │ │ el │
│ ette │ │ │
│ │ │ │
└──────┴──────────────────────────────────────────────┴──────┘
⚡ Implementation Steps
Phase 1: Foundation (30 min)
- Create
canvas-builder.component(main container) - Copy grid-canvas toolbar HTML/SCSS EXACTLY
- Verify toolbar renders with all 6 modes
- Test mode switching
Phase 2: Canvas Area (45 min)
- Create
canvas-section.component(recursive) - Integrate CanvasStateService
- Render sections in grid
- Add drag-drop zones
Phase 3: Sidebars (30 min)
- Module palette (left) - show actual modules
- Config panel (right) - section configuration
- Push layout (not overlay)
Phase 4: Grid Edit Mode (20 min)
- Pink toolbar for grid edit
- Add/Remove row/column functionality
- Grid dimension display
Phase 5: Polish (30 min)
- Animations and transitions
- Keyboard shortcuts
- Full workflow testing
Total Time: ~2.5 hours for complete working system
🔥 Key Success Factors
- DON'T try to reuse broken components - Fresh start
- COPY working code exactly - Don't reinvent
- TEST each phase before moving to next
- SHOW user progress - Screenshot after each phase
📋 Acceptance Criteria
✅ Toolbar with 6 inline mode buttons (NOT dropdown)
✅ Pink Grid Edit toolbar appears when Grid Edit clicked
✅ Module palette shows actual modules from /modules/structural/
✅ Canvas sections render beautifully (grid-canvas style)
✅ Config panel pushes canvas (doesn't overlay)
✅ Drag module from palette to section
✅ Add/Remove sections with toolbar
✅ Responsive modes work (Desktop/Tablet/Mobile)
🚀 Ready to Start?
Waiting for user approval to:
- Create
universe-canvas-v3folder structure - Start with Phase 1 (toolbar)
- Show progress after each phase
This WILL work because we're starting CLEAN! 🔥