2025-12-03 21:56:50 +00:00
|
|
|
import type { ReactNode } from 'react';
|
|
|
|
|
import { Header } from './Header';
|
|
|
|
|
import { Sidebar } from './Sidebar';
|
feat: Visual masterpiece - true light mode & premium UI
🎨 **True Light/Dark Mode**
- Implemented proper light mode with inverted color scheme
- Smooth theme transitions (0.3s ease)
- Light mode colors: white backgrounds, dark text, vibrant accents
- System theme detection with proper class application
🌈 **Enhanced Theme System**
- 4 color themes work in both light and dark modes
- Cyber (cyan/magenta), Ocean (blue/teal), Forest (green/lime), Sunset (orange/purple)
- Theme-specific glassmorphism effects
- Proper contrast in light mode
✨ **Premium Animations**
- Float, glow-pulse, slide-in, scale-in, rotate-in animations
- Smooth page transitions
- Hover effects with depth (lift, glow, scale)
- Micro-interactions on all interactive elements
🎯 **Visual Polish**
- Enhanced glassmorphism for light/dark modes
- Custom scrollbar with theme colors
- Beautiful text selection
- Focus indicators for accessibility
- Premium utility classes
🔧 **Technical Improvements**
- Updated UIStore to properly apply light/dark classes
- Added data-theme attribute for CSS targeting
- Smooth scroll behavior
- Optimized transitions
The app is now a visual masterpiece with perfect light/dark mode support!
2026-01-11 01:32:21 +00:00
|
|
|
import { GlobalPlayer } from '@/features/player/components/GlobalPlayer';
|
2026-02-19 23:13:33 +00:00
|
|
|
import { useQueueSync } from '@/features/player/hooks/useQueueSync';
|
2026-01-18 12:32:17 +00:00
|
|
|
import { useUIStore } from '@/stores/ui';
|
|
|
|
|
import { cn } from '@/lib/utils';
|
2026-01-18 21:36:15 +00:00
|
|
|
import { AstralBackground } from '../ui/AstralBackground';
|
2025-12-03 21:56:50 +00:00
|
|
|
|
|
|
|
|
interface DashboardLayoutProps {
|
|
|
|
|
children: ReactNode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-01-22 16:23:11 +00:00
|
|
|
* Layout principal "App Shell" - Veza Professional V2
|
2026-01-18 12:32:17 +00:00
|
|
|
*
|
2026-01-22 16:23:11 +00:00
|
|
|
* Architecture:
|
|
|
|
|
* - Body: Fixed viewport (overflow-hidden)
|
|
|
|
|
* - Sidebar: Fixed left, z-index high
|
|
|
|
|
* - Main: Scrollable container independent of window
|
|
|
|
|
* - Header: Sticky top within Main
|
2025-12-03 21:56:50 +00:00
|
|
|
*/
|
|
|
|
|
export function DashboardLayout({ children }: DashboardLayoutProps) {
|
2026-01-18 12:32:17 +00:00
|
|
|
const { sidebarOpen } = useUIStore();
|
2026-02-19 23:13:33 +00:00
|
|
|
useQueueSync();
|
2026-01-18 21:27:53 +00:00
|
|
|
|
2025-12-03 21:56:50 +00:00
|
|
|
return (
|
2026-02-07 14:25:44 +00:00
|
|
|
<div className="flex h-screen w-full overflow-hidden relative bg-background">
|
2026-01-22 16:23:11 +00:00
|
|
|
{/* 1. Global Background (Fixed z-0) */}
|
2026-01-18 21:36:15 +00:00
|
|
|
<AstralBackground />
|
2026-01-22 16:23:11 +00:00
|
|
|
|
|
|
|
|
{/* 2. Fixed Sidebar (z-90) */}
|
2025-12-03 21:56:50 +00:00
|
|
|
<Sidebar />
|
2026-01-22 16:23:11 +00:00
|
|
|
|
|
|
|
|
{/* 3. Main Content Area (The only thing that scrolls) */}
|
2026-01-18 21:27:53 +00:00
|
|
|
<div
|
2026-01-18 12:32:17 +00:00
|
|
|
className={cn(
|
refactor: Phase 5 — Migrate layout shell to SUMI tokens
- Sidebar: bg-raised, border-faint tokens
- Header: glass bg + backdrop-blur-12px, z-200 sticky, SUMI durations
- PlayerBarGlass: glass-bg + blur-16px, accent colors, remove glow
- PlayerBarProgress: solid accent fill, SUMI border tokens
- PlayerBarRight/TrackInfo: text-foreground, SUMI border tokens
- MiniPlayer: glass-bg, border-faint, z-200, SUMI shadows
- GlobalPlayer: SUMI z-index and duration tokens
- DashboardLayout: SUMI z-raised, duration tokens
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 01:01:39 +00:00
|
|
|
'flex-1 flex flex-col h-full min-w-0 relative z-[var(--sumi-z-raised)] transition-all duration-[var(--sumi-duration-slow)] ease-[var(--sumi-ease-in-out)]',
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
sidebarOpen ? 'lg:ml-main-expanded' : 'lg:ml-main-collapsed',
|
2026-02-08 21:47:53 +00:00
|
|
|
'max-lg:ml-0'
|
2026-01-18 12:32:17 +00:00
|
|
|
)}
|
|
|
|
|
>
|
2026-01-22 16:23:11 +00:00
|
|
|
{/* Header is part of the flow but stays at top */}
|
2025-12-03 21:56:50 +00:00
|
|
|
<Header />
|
2026-01-22 16:23:11 +00:00
|
|
|
|
|
|
|
|
{/* Scrollable Content Container */}
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
<main
|
fix: UI remediation Phase 1 (S0-S5) + Phase 2 Sprint 6 shadow system
Phase 1:
- S0: Fix open redirect (safeNavigate), delete AuthContext/legacy auth, encrypt API keys, gitignore .env files
- S1: Split client.ts god object into 5 modules, unify toast system, delete unused Sidebar
- S2: Add glass button variant, migrate 32 z-index to SUMI tokens, fix card dark mode
- S3: Skip nav link, aria-hidden on icons, focus-visible ring fixes, alt attrs, aria-live regions
- S4: React.memo on list items, fix key={index}, loading=lazy on images
- S5: Branded loading screen, page transitions respect reduced-motion, LikeButton micro-interaction, i18n sidebar/header
Phase 2 Sprint 6:
- Wire Tailwind shadow utilities to SUMI tokens in @theme block (fixes 50+ files)
- Define shadow-card/shadow-card-hover tokens
- Remove dark:shadow-none workarounds from card.tsx (SUMI handles per-theme shadows)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 09:13:44 +00:00
|
|
|
id="main-content"
|
feat(web): UI premium Discord/Spotify-like — tokens, shadows, focus, layout
Plan UI premium 6–8 semaines (design system, shell, Storybook, a11y):
- Design system: DESIGN_TOKENS.md, APP_SHELL.md, FULL_LAYOUT_PAGE.md. Single source
for layout/shell (index.css), shadows (design-system.css), durations/easing.
- Tokens: shadow-cover-depth, shadow-gold-glow, shadow-fab-glow; layout max-height
(max-h-layout-drawer, max-h-layout-panel, max-h-layout-list). All duration-200/300/500
replaced by --duration-fast/normal/slow. Arbitrary shadows replaced by token classes.
- Shell & player: Sidebar, Header, GlobalPlayer, MiniPlayer, PlayerQueue, PlayerControls,
AudioPlayer use tokens; focus-visible on Sidebar, PlayerQueue, DropdownMenuTrigger/Item,
TabsTrigger. Typography: text-[10px]/[9px] → text-xs where applicable.
- ESLint: no-restricted-syntax (warn) for w-/h-/rounded-/shadow-/text-/spacing arbitrary.
- Scripts: report-arbitrary-values.mjs, capture/compare/generate visual; visual-complete.spec.ts.
- Stories full layout: Dashboard, Playlists, Library, Settings, Profile in DashboardLayout.stories.
- .cursorrules + README: DESIGN_TOKENS, APP_SHELL, visual commands, no arbitrary without justification.
- apps/web/.gitignore: e2e test artifacts (test-results-visual, playwright-report-visual).
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 16:15:58 +00:00
|
|
|
className="flex-1 overflow-y-auto overflow-x-hidden pt-main pb-main px-4 md:px-8 custom-scrollbar"
|
fix: UI remediation Phase 1 (S0-S5) + Phase 2 Sprint 6 shadow system
Phase 1:
- S0: Fix open redirect (safeNavigate), delete AuthContext/legacy auth, encrypt API keys, gitignore .env files
- S1: Split client.ts god object into 5 modules, unify toast system, delete unused Sidebar
- S2: Add glass button variant, migrate 32 z-index to SUMI tokens, fix card dark mode
- S3: Skip nav link, aria-hidden on icons, focus-visible ring fixes, alt attrs, aria-live regions
- S4: React.memo on list items, fix key={index}, loading=lazy on images
- S5: Branded loading screen, page transitions respect reduced-motion, LikeButton micro-interaction, i18n sidebar/header
Phase 2 Sprint 6:
- Wire Tailwind shadow utilities to SUMI tokens in @theme block (fixes 50+ files)
- Define shadow-card/shadow-card-hover tokens
- Remove dark:shadow-none workarounds from card.tsx (SUMI handles per-theme shadows)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 09:13:44 +00:00
|
|
|
data-scroll-container="main"
|
2026-01-22 16:23:11 +00:00
|
|
|
>
|
2026-02-05 13:20:06 +00:00
|
|
|
<div className="max-w-layout-content mx-auto w-full">
|
2026-01-22 16:23:11 +00:00
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
|
2026-02-10 21:51:51 +00:00
|
|
|
{/* Floating Player: wrapper constrains width to main area; GlobalPlayer is fixed inside */}
|
|
|
|
|
<div className="absolute bottom-0 left-0 right-0 z-50 w-full min-w-0" aria-label="Player bar container">
|
2026-01-22 16:23:11 +00:00
|
|
|
<GlobalPlayer />
|
|
|
|
|
</div>
|
2025-12-03 21:56:50 +00:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2026-01-22 16:23:11 +00:00
|
|
|
}
|