diff --git a/docs/plans/Frontend/COMPONENT_EXAMPLES.md b/docs/plans/Frontend/COMPONENT_EXAMPLES.md new file mode 100644 index 00000000..e72487ed --- /dev/null +++ b/docs/plans/Frontend/COMPONENT_EXAMPLES.md @@ -0,0 +1,290 @@ +# Component Migration Examples + +## Common Component Transformations + +### 1. Card Component + +**BEFORE (Old Design):** +```tsx +
+

Title

+

Content

+
+``` + +**AFTER (New Design):** +```tsx +
+

Title

+

Content

+
+``` + +--- + +### 2. Active/Highlighted Card + +**BEFORE:** +```tsx +
+ {/* content */} +
+``` + +**AFTER (Bright Glow):** +```tsx +
+ {/* content */} +
+``` + +--- + +### 3. Icon in Card + +**BEFORE:** +```tsx +
+ +
+``` + +**AFTER (with subtle color):** +```tsx +
+ +
+``` + +--- + +### 4. Badge/Status + +**BEFORE:** +```tsx + + Admin + +``` + +**AFTER:** +```tsx +
+ Admin +
+``` + +--- + +### 5. Primary Button + +**BEFORE:** +```tsx + +``` + +**AFTER:** +```tsx + +``` + +--- + +### 6. Secondary Button + +**BEFORE:** +```tsx + +``` + +**AFTER:** +```tsx + +``` + +--- + +### 7. Input/Search + +**BEFORE:** +```tsx + +``` + +**AFTER:** +```tsx +
+
+ {/* search icon */} + +
+
+``` + +--- + +### 8. Progress Bar + +**BEFORE:** +```tsx +
+
+
+``` + +**AFTER:** +```tsx +
+
+
+``` + +--- + +### 9. Stat Card with Trend + +**BEFORE:** +```tsx +
+
Active Users
+
1,234
+
+``` + +**AFTER:** +```tsx +
+
Active Users
+
1,234
+
+ {/* up arrow */} + 12% vs last week +
+
+``` + +--- + +### 10. Section Header + +**BEFORE:** +```tsx +
+

Recent Trees

+

Your recently accessed decision trees

+
+``` + +**AFTER:** +```tsx +
+

Recent Trees

+ +
+``` + +--- + +## Icon Color Guidelines + +### AI/Automation Icons +```tsx +{/* sparkle/star */} +``` + +### Search Icons +```tsx +{/* magnifying glass */} +``` + +### Active/Playing State +```tsx +{/* play button */} +``` + +### Network Category +```tsx +{/* wifi/network */} +``` + +### Printer Category +```tsx +{/* printer */} +``` + +### Email Category +```tsx +{/* envelope */} +``` + +### Success Indicators +```tsx +{/* check/arrow up */} +``` + +### Error Indicators +```tsx +{/* x/arrow down */} +``` + +### Time/Clock (NO COLOR - keep gray) +```tsx +{/* clock */} +``` + +--- + +## Common Mistakes to Avoid + +❌ **DON'T:** +- Use colored backgrounds on cards +- Use gradient text +- Color ALL icons +- Use slate-900, slate-800 (use white/opacity instead) +- Use purple gradients anywhere + +✅ **DO:** +- Use white/black with opacity for all backgrounds +- Keep text white (with varying opacity) +- Only color functional icons +- Use backdrop-blur on cards +- Use white for primary buttons + +--- + +## Quick Reference: Opacity Levels + +**Text:** +- Primary: `text-white` +- Secondary: `text-white/70` +- Tertiary: `text-white/40` +- Placeholder: `text-white/30` + +**Backgrounds:** +- Card: `bg-white/[0.04]` to `bg-white/[0.01]` +- Card hover: `bg-white/[0.06]` to `bg-white/[0.02]` +- Active card: `bg-white/[0.08]` to `bg-white/[0.04]` +- Button secondary: `bg-white/10` +- Badge: `bg-white/10` + +**Borders:** +- Subtle: `border-white/8` +- Normal: `border-white/10` +- Prominent: `border-white/20` +- Active: `border-white/30` diff --git a/docs/plans/Frontend/DESIGN_SYSTEM_GUIDE.md b/docs/plans/Frontend/DESIGN_SYSTEM_GUIDE.md new file mode 100644 index 00000000..55849f3d --- /dev/null +++ b/docs/plans/Frontend/DESIGN_SYSTEM_GUIDE.md @@ -0,0 +1,528 @@ +# ResolutionFlow Design System Implementation Guide + +## Overview +This guide provides everything needed to implement the new monochrome design with subtle icon accents across the entire ResolutionFlow application. + +## Design Philosophy +- **95% Monochrome**: Pure black backgrounds, white text, transparent card overlays +- **5% Color**: Subtle colors ONLY on functional icons +- **Inspiration**: Plasma + Aspect templates (minimalist, modern, enterprise-grade) +- **Key Principle**: Restraint and sophistication over flashy gradients + +--- + +## Color Palette + +### Background Colors +```css +/* Main background - pure black with subtle gradient */ +background: linear-gradient(to bottom, #000000 0%, #0a0a0a 50%, #000000 100%); + +/* Subtle radial overlays (optional, adds depth) */ +background: radial-gradient(circle at 50% 0%, rgba(100, 100, 120, 0.03), transparent 50%), + radial-gradient(circle at 80% 80%, rgba(80, 80, 100, 0.02), transparent 50%); +``` + +### Text Colors +```css +/* Primary text */ +color: white; + +/* Secondary text */ +color: rgba(255, 255, 255, 0.7); /* white/70 */ + +/* Tertiary text */ +color: rgba(255, 255, 255, 0.4); /* white/40 */ + +/* Subtle text */ +color: rgba(255, 255, 255, 0.3); /* white/30 */ +``` + +### Card/Surface Colors +```css +/* Standard cards */ +background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%); +border: 1px solid rgba(255, 255, 255, 0.08); +backdrop-filter: blur(10px); + +/* Card hover state */ +background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%); +border-color: rgba(255, 255, 255, 0.12); + +/* Stat cards */ +background: rgba(20, 20, 25, 0.5); +border: 1px solid rgba(255, 255, 255, 0.06); +backdrop-filter: blur(10px); + +/* Active/Highlighted card (Bright Glow) */ +background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%); +border: 1px solid rgba(255, 255, 255, 0.2); +box-shadow: 0 0 40px rgba(255, 255, 255, 0.1); +``` + +### Icon Colors (THE ONLY COLORS IN THE APP) +```css +/* AI/Sparkle icons */ +color: #22d3ee; /* cyan-400 */ + +/* Search icons */ +color: #60a5fa; /* blue-400 */ + +/* Active/Play icons */ +color: #a78bfa; /* violet-400 */ + +/* Network category */ +color: #60a5fa; /* blue-400 */ + +/* Printer category */ +color: #818cf8; /* indigo-400 */ + +/* Email category */ +color: #22d3ee; /* cyan-400 */ + +/* Success/Up trends */ +color: #34d399; /* emerald-400 */ + +/* Failure/Down trends */ +color: #f87171; /* red-400 */ + +/* Neutral/Time icons (NO COLOR) */ +color: rgba(255, 255, 255, 0.5); /* gray */ +``` + +### Button Colors +```css +/* Primary button (white) */ +background: white; +color: black; + +/* Primary button hover */ +background: rgba(255, 255, 255, 0.9); + +/* Secondary button */ +background: rgba(255, 255, 255, 0.1); +border: 1px solid rgba(255, 255, 255, 0.2); +color: white; + +/* Secondary button hover */ +background: rgba(255, 255, 255, 0.2); +``` + +--- + +## Typography + +### Font Family +```css +font-family: 'Inter', sans-serif; +``` + +### Font Weights +- Regular: 400 +- Medium: 500 +- Semibold: 600 +- Bold: 700 +- Extrabold: 800 + +### Type Scale +```css +/* Hero heading */ +font-size: 3.5rem; /* 56px */ +font-weight: 700; +line-height: 1.1; +letter-spacing: -0.02em; + +/* Section heading */ +font-size: 2rem; /* 32px */ +font-weight: 700; +line-height: 1.2; + +/* Card title */ +font-size: 1.25rem; /* 20px */ +font-weight: 700; +line-height: 1.3; + +/* Body large */ +font-size: 1.25rem; /* 20px */ +font-weight: 400; +line-height: 1.6; + +/* Body */ +font-size: 1rem; /* 16px */ +font-weight: 400; +line-height: 1.5; + +/* Small */ +font-size: 0.875rem; /* 14px */ +font-weight: 500; +line-height: 1.4; + +/* Extra small */ +font-size: 0.75rem; /* 12px */ +font-weight: 500; +line-height: 1.3; +``` + +--- + +## Component Patterns + +### Header/Navigation +```jsx +
+
+
+ {/* White logo icon */} +
+ +
+ + ResolutionFlow + +
+
+
+ Admin +
+
+
+
+``` + +### Hero Section +```jsx +
+ {/* Badge with colored icon */} +
+ + AI-POWERED TROUBLESHOOTING +
+ + {/* Main heading */} +

+ All Your Tickets in One
+ Unified Dashboard +

+ + {/* Description */} +

+ Search our library of proven decision trees or continue where you left off +

+
+``` + +### Search Bar +```jsx +
+
+
+
+ {/* Blue search icon */} + + + {/* White button */} + +
+
+
+``` + +### Stat Card +```jsx +
+
Active Sessions
+
18
+
+ {/* Green up arrow icon */} + + 12% vs last week +
+
+``` + +### Active Session Card (Bright Glow) +```jsx +
+
+
+
+ {/* Icon with violet color */} +
+ +
+
+
+ Active Session +
+

Email Delivery Issues

+
+
+

Ticket #5847 • Started 2h ago • 11 of 15 steps

+
+ +
+ + {/* Progress bar */} +
+
+ Progress + 72% +
+
+
+
+
+
+``` + +### Tree Card +```jsx +
+
+ {/* Icon with category-specific color */} +
+ +
+
+ Available +
+
+

Network Connectivity

+

Diagnose and resolve network issues

+
+ {/* Gray clock icon (NO COLOR) */} + + Last used 5h ago +
+
+``` + +### Primary Button (White) +```jsx + +``` + +### Secondary Button (Transparent) +```jsx + +``` + +--- + +## Icon Color Mapping + +### Where to use each color: + +**Cyan (#22d3ee / cyan-400):** +- AI/Sparkle icons +- Email-related icons +- Magic/automation indicators + +**Blue (#60a5fa / blue-400):** +- Search icons +- Network-related icons +- General tech icons + +**Violet (#a78bfa / violet-400):** +- Active/playing state icons +- Current session indicators +- Progress-related icons + +**Indigo (#818cf8 / indigo-400):** +- Printer-related icons +- Hardware icons + +**Emerald (#34d399 / emerald-400):** +- Success indicators +- Up arrows/trends +- Positive metrics + +**Red (#f87171 / red-400):** +- Error indicators +- Down arrows/trends +- Negative metrics + +**Gray (rgba(255,255,255,0.5) / white/50):** +- Time/clock icons +- Neutral informational icons +- Non-critical icons + +--- + +## Tailwind Classes Reference + +### Background Patterns +``` +bg-black +bg-white +bg-white/5 (5% opacity) +bg-white/10 (10% opacity) +bg-white/15 (15% opacity) +``` + +### Text Opacity +``` +text-white +text-white/70 +text-white/60 +text-white/50 +text-white/40 +text-white/30 +``` + +### Border Opacity +``` +border-white/8 +border-white/10 +border-white/12 +border-white/20 +border-white/30 +``` + +### Icon Colors +``` +text-cyan-400 +text-blue-400 +text-violet-400 +text-indigo-400 +text-emerald-400 +text-red-400 +text-slate-500 +``` + +### Rounded Corners +``` +rounded-xl (12px - cards, buttons) +rounded-2xl (16px - large cards) +rounded-3xl (24px - hero sections) +rounded-full (perfect circle - badges, dots) +rounded-lg (8px - small elements) +``` + +### Spacing +``` +gap-1, gap-2, gap-3, gap-4, gap-6, gap-8 +p-4, p-6, p-8, p-12 +mb-2, mb-3, mb-4, mb-6, mb-8, mb-12, mb-16, mb-20 +``` + +--- + +## Animation & Transitions + +### Standard Transition +```css +transition: all 0.2s ease; +``` + +### Hover Scale +```css +hover:scale-105 +transition-transform +``` + +### Hover Opacity +```css +hover:opacity-100 +transition-opacity +``` + +### Card Hover Glow +```css +hover:shadow-[0_0_40px_rgba(255,255,255,0.15)] +``` + +--- + +## Implementation Checklist + +### Phase 1: Global Styles +- [ ] Update background color to pure black gradient +- [ ] Set font-family to Inter +- [ ] Add subtle radial gradient overlays + +### Phase 2: Component Updates +- [ ] Header/Navigation +- [ ] Hero sections +- [ ] Search bars +- [ ] Stat cards +- [ ] Active session cards (Bright Glow) +- [ ] Tree/item cards +- [ ] Buttons (primary & secondary) +- [ ] Forms/inputs +- [ ] Modals +- [ ] Empty states + +### Phase 3: Icon Colors +- [ ] Map all icons to appropriate colors +- [ ] Keep time/clock icons gray +- [ ] Add category colors to tree icons + +### Phase 4: Polish +- [ ] Add hover states to all interactive elements +- [ ] Test backdrop-filter blur support +- [ ] Verify contrast ratios for accessibility +- [ ] Test on dark displays + +--- + +## Notes for Claude Code + +1. **Preserve existing functionality** - Only change visual styling, not logic +2. **Use Tailwind classes** - Avoid custom CSS where possible +3. **Keep shadcn/ui components** - Just reskin them with new colors +4. **Test incrementally** - Update one component type at a time +5. **Icon mapping is critical** - Different tree types get different icon colors + +## Questions to Resolve + +1. Should all buttons use the same white style, or do you want variations? +2. Do you want the subtle radial gradient overlays, or pure black background? +3. Should stat cards always show trend indicators (up/down arrows)? +4. Any specific components that should NOT follow this design? + +--- + +## Example Files to Update + +**Priority 1 (Core UI):** +- `AppLayout.tsx` - Main layout wrapper +- `QuickStartPage.tsx` - Homepage/dashboard +- `Header.tsx` / `Navbar.tsx` - Navigation + +**Priority 2 (Features):** +- Tree list components +- Session components +- Search components +- Stats/metrics components + +**Priority 3 (Supporting):** +- Modals +- Forms +- Settings pages +- Admin panels + +--- + +## Testing Checklist + +After implementation: +- [ ] Dark mode looks correct +- [ ] All text is readable (contrast check) +- [ ] Icons have correct colors +- [ ] Hover states work +- [ ] Cards have proper depth/hierarchy +- [ ] Buttons are prominent +- [ ] Layout is consistent across pages diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 8e776237..c3a27f1c 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -2,11 +2,9 @@ import { useEffect } from 'react' import { RouterProvider } from 'react-router-dom' import { router } from '@/router' import { useAuthStore } from '@/store/authStore' -import { useThemeStore } from '@/store/themeStore' function App() { const { isAuthenticated, fetchUser, setLoading } = useAuthStore() - const { theme, setTheme } = useThemeStore() useEffect(() => { // On app load, check if we have a token and fetch user data @@ -20,19 +18,6 @@ function App() { } }, []) - // Listen for system theme changes - useEffect(() => { - const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)') - const handleChange = () => { - if (theme === 'system') { - setTheme('system') // Re-apply to update resolvedTheme - } - } - - mediaQuery.addEventListener('change', handleChange) - return () => mediaQuery.removeEventListener('change', handleChange) - }, [theme, setTheme]) - return } diff --git a/frontend/src/components/admin/ActionMenu.tsx b/frontend/src/components/admin/ActionMenu.tsx index 24ce3dee..a259dd24 100644 --- a/frontend/src/components/admin/ActionMenu.tsx +++ b/frontend/src/components/admin/ActionMenu.tsx @@ -53,8 +53,8 @@ export function ActionMenu({ items }: ActionMenuProps) { ref={buttonRef} onClick={() => setOpen(!open)} className={cn( - 'rounded-md p-1.5 text-muted-foreground transition-colors', - 'hover:bg-accent hover:text-accent-foreground' + 'rounded-md p-1.5 text-white/50 transition-colors', + 'hover:bg-white/10 hover:text-white' )} > @@ -63,8 +63,8 @@ export function ActionMenu({ items }: ActionMenuProps) {
{item.icon} diff --git a/frontend/src/components/admin/AdminLayout.tsx b/frontend/src/components/admin/AdminLayout.tsx index 210c6929..9677d7ff 100644 --- a/frontend/src/components/admin/AdminLayout.tsx +++ b/frontend/src/components/admin/AdminLayout.tsx @@ -36,7 +36,7 @@ export function AdminLayout() { return (
{/* Desktop sidebar */} -
+
@@ -44,14 +44,14 @@ export function AdminLayout() { {mobileOpen && (
setMobileOpen(false)} /> -
+
@@ -67,7 +67,7 @@ export function AdminLayout() { {/* Mobile menu button */} diff --git a/frontend/src/components/admin/AdminSidebar.tsx b/frontend/src/components/admin/AdminSidebar.tsx index e3ec3526..0e7f9cac 100644 --- a/frontend/src/components/admin/AdminSidebar.tsx +++ b/frontend/src/components/admin/AdminSidebar.tsx @@ -39,7 +39,7 @@ export function AdminSidebar({ className, onNavigate }: AdminSidebarProps) { return (