# StemEngine Web UI Redesign — MetroUI Plan Redesign the StemEngine React frontend using the [MetroUI](https://github.com/olton/metroui) (`@olton/metroui`) component framework, replacing the current Tailwind CSS utility-class approach with MetroUI's Metro Style design language (flat, tile-based, high-contrast, strongly typographic). --- ## Current Stack | Layer | Current | |-------|---------| | Build | Vite 5 + TypeScript | | Framework | React 18 | | Styling | Tailwind CSS 3 + custom CSS variables (`--brand-*`) | | Icons | lucide-react | | Query | TanStack React Query 5 | | Audio | Tone.js, @tonejs/midi, abcjs | The Tailwind dependency is removed; everything else stays. --- ## Why MetroUI - **Zero external dependencies** — one CSS + one JS bundle, no tree-shaking puzzle. - **Metro Style** matches the tool's technical, editor-like aesthetic better than a generic utility framework. - **Built-in dark theme** — `data-theme="dark"` on ``, no custom variable juggling. - **Rich component set** already covers every current UI pattern: panels, tiles, appbar, sidenav, progress bars, sliders, dialogs, toasts, accordions, tabs, badges, activity indicators. - **Live Tiles** — ideal for the project browser grid: each project tile can show job-status colour and animated activity indicator natively. - **CSS-class driven** — React keeps all interactivity; MetroUI JS is only needed for a handful of overlay components (dialog, toast, window). No framework conflict. --- ## Installation ```bash npm install @olton/metroui ``` In `main.tsx` (replaces Tailwind imports in `index.css`): ```ts import '@olton/metroui/dist/css/metro.css' import '@olton/metroui/dist/css/icons.css' // MetroUI JS (for dialog/toast/tooltip JS API) import '@olton/metroui/dist/js/metro.js' ``` Remove from `package.json`: - `tailwindcss`, `autoprefixer`, `postcss` - `tailwind.config.js`, `postcss.config.js` The `index.css` file is reduced to: - Custom scrollbar overrides - `KaraokeEditor` canvas variables (these are purely internal and not Tailwind) - Any one-off layout rules not covered by MetroUI --- ## Design Language Decisions | Decision | Choice | |----------|--------| | Theme | Dark (`data-theme="dark"`) by default; user can toggle to Light | | Accent | Six Metro accent colours matching current set: Blue, Violet, Rose, Emerald, Amber, Cyan — applied via `data-accent` on `` and MetroUI's built-in accent palette | | Typography | Keep current font selection feature (Archivo, Inter, Poppins, etc.); MetroUI's font stack is overridden with the user's chosen font | | Border radius | Metro default (minimal rounding, ~2–4 px) | | Spacing | MetroUI grid (12-column) + flexbox utilities | | Icons | Replace lucide-react with MetroUI icon font (``) or keep lucide SVGs as-is (both work) | --- ## Layout Shell (App.tsx) ### Current Flex column: fixed header → flex row (collapsible sidebar + main content) → fixed footer. Tab navigation (`Separator` / `ProjectDetail` / `Settings`) via `activeTabId` state. ### MetroUI Redesign ``` ┌─────────────────────────────────────────────────────┐ │ AppBar [≡ StemEngine] [GPU status] [⚙ Settings] │ ← metro appbar ├───────────┬─────────────────────────────────────────┤ │ │ │ │ SideNav │ Main content panel │ │ │ (routed view) │ │ Project │ │ │ list │ │ │ (tiles) │ │ │ │ │ ├───────────┴─────────────────────────────────────────┤ │ GlobalAudioBar (fixed bottom strip) │ └─────────────────────────────────────────────────────┘ ``` **Key class mappings:** | Old | MetroUI | |-----|---------| | `fixed top-0` header div | `
` | | Sidebar div | `
` or custom vertical nav panel | | Main content flex area | `
` with MetroUI grid | | Footer credits | `