From 80992ca97546d46310f7b8db32c9806de7b29a7c Mon Sep 17 00:00:00 2001 From: sean-eskerium Date: Thu, 9 Oct 2025 09:31:47 -0400 Subject: [PATCH] Epgrade to Tailwind 4 --- .../archon/archon-ui-consistency-review.md | 464 ++---- .../TAILWIND_RESPONSIVE_BEST_PRACTICES.md | 489 ------ PRPs/ai_docs/UI_STANDARDS.md | 935 +++++++++++ archon-ui-main/package-lock.json | 1427 ++++++----------- archon-ui-main/package.json | 4 +- archon-ui-main/postcss.config.js | 2 +- .../layouts/KnowledgeLayoutExample.tsx | 2 +- .../layouts/ProjectsLayoutExample.tsx | 29 +- .../layouts/SettingsLayoutExample.tsx | 2 +- .../features/style-guide/tabs/LayoutsTab.tsx | 2 +- .../src/features/ui/primitives/data-card.tsx | 2 +- archon-ui-main/src/index.css | 178 +- archon-ui-main/tailwind.config.js | 83 +- archon-ui-main/vite.config.ts | 2 + 14 files changed, 1711 insertions(+), 1910 deletions(-) delete mode 100644 PRPs/ai_docs/TAILWIND_RESPONSIVE_BEST_PRACTICES.md create mode 100644 PRPs/ai_docs/UI_STANDARDS.md diff --git a/.claude/commands/archon/archon-ui-consistency-review.md b/.claude/commands/archon/archon-ui-consistency-review.md index b0625f01..c5c2fcf5 100644 --- a/.claude/commands/archon/archon-ui-consistency-review.md +++ b/.claude/commands/archon/archon-ui-consistency-review.md @@ -11,139 +11,51 @@ thinking: auto I'll analyze the UI components and generate a detailed report on consistency, reusability, and adherence to the Archon design system. -## Analysis Framework - -### Design System Standards - -**Archon uses:** -- **Primitives**: `/src/features/ui/primitives/` - Reusable Radix components with glassmorphism styling -- **Card Variants**: - - Base glass card - - Edge-lit cards: `` - - Outer glow cards - - Inner glow cards -- **Navigation**: PillNavigation component for all pill-style navigation -- **Glassmorphism**: `backdrop-blur-sm` (minimal), frosted glass backgrounds -- **Colors**: Semantic colors (Primary blue #3b82f6, Success, Warning, Error) + accents - -### Scoring Criteria - -**1. Reusability (1-10)** -- 10: Uses shared primitives, no hardcoded styles -- 7-9: Mostly reusable, minor hardcoding -- 4-6: Mix of primitives and custom code -- 1-3: Completely custom, duplicates existing patterns - -**2. Radix Component Usage (1-10)** -- 10: Uses Radix primitives for ALL interactive elements (Select, Checkbox, Switch, Tabs, Dialog, etc.) -- 7-9: Mostly Radix, few native HTML elements -- 4-6: Mix of Radix and native elements -- 1-3: Primarily native HTML elements - -**3. Primitives Usage (1-10)** -- 10: Uses Card, Button, Input primitives with proper props -- 7-9: Uses most primitives, some custom styling -- 4-6: Mix of primitives and manual styling -- 1-3: Hardcoded styling, doesn't use primitives - -**4. Styling Consistency (1-10)** -- 10: Matches design system exactly (colors, blur, edge-lit patterns) -- 7-9: Close match, minor deviations -- 4-6: Significant inconsistencies -- 1-3: Completely different styling approach - ## Review Process -### Step 1: Identify Components +### Step 1: Load UI Standards + +**CRITICAL: First, read the UI standards document:** + +``` +/Users/sean/Software/Archon/Archon/PRPs/ai_docs/UI_STANDARDS.md +``` + +This document contains ALL rules, patterns, anti-patterns, and examples. Use it as the single source of truth for the review. + +### Step 2: Scan Components Scan the provided path for: - React components (`.tsx` files) - Component usage patterns - Imports from primitives vs manual styling -### Step 2: Analyze Each Component +### Step 3: Compare Against Standards -For each component, check: +For each component, compare against UI_STANDARDS.md: +- Check all rules from each section (0-7) +- Identify violations of anti-patterns +- Score based on adherence to standards +- Note missing patterns that should be used -**Primitives Usage:** -```tsx -// GOOD - Uses Card primitive with props -... +### Step 4: Automated Scans -// BAD - Hardcoded edge glow -
-
-
- ... -
+Run automated pattern detection to find common violations: + +```bash +# Scan for violations (grep patterns will be in UI_STANDARDS.md) +# Examples: dynamic class construction, unconstrained scroll, non-responsive grids, etc. ``` -**Radix Usage:** -```tsx -// GOOD - Radix Select primitive -import { Select, SelectTrigger, SelectContent, SelectItem } from '@/features/ui/primitives/select'; +Use the patterns and anti-patterns documented in UI_STANDARDS.md to guide the automated scans. -// BAD - Native HTML - -``` +### Step 5: Generate Report -**Reusable Patterns:** -```tsx -// GOOD - Shared PillNavigation component - - -// BAD - Custom hardcoded pill navigation -
- {items.map(item =>
-``` - -### Step 3: Generate Scores - -Calculate scores for each component based on: -- Count of primitive vs hardcoded elements -- Radix usage vs native HTML -- Styling duplication vs reuse -- Pattern consistency - -### Step 4: Identify Issues - -Common anti-patterns to flag: - -**Hardcoded Edge-Lit Cards:** -```tsx -// BAD - Manual implementation (like KnowledgeCard currently) -
-
-
-
- -// GOOD - Use Card primitive - -``` - -**Native HTML Form Elements:** -```tsx -// BAD -, - -// GOOD -\|