Skip to content

Commit ce7b51a

Browse files
committed
Add UI/UX Pro Max workflow and data resources
Introduced the UI/UX Pro Max workflow documentation and added supporting CSV data files for charts, colors, landing patterns, products, prompts, stacks, styles, typography, and UX guidelines. Included core and search Python scripts for the workflow. Also updated several Dart files related to dialogs, group management, home, notifications, and widgets.
1 parent ffa557b commit ce7b51a

26 files changed

Lines changed: 1685 additions & 115 deletions

.agent/workflows/ui-ux-pro-max.md

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
---
2+
description: Plan and implement UI
3+
auto_execution_mode: 3
4+
---
5+
6+
# UI/UX Pro Max - Design Intelligence
7+
8+
Searchable database of UI styles, color palettes, font pairings, chart types, product recommendations, UX guidelines, and stack-specific best practices.
9+
10+
## Prerequisites
11+
12+
Check if Python is installed:
13+
14+
```bash
15+
python3 --version || python --version
16+
```
17+
18+
If Python is not installed, install it based on user's OS:
19+
20+
**macOS:**
21+
```bash
22+
brew install python3
23+
```
24+
25+
**Ubuntu/Debian:**
26+
```bash
27+
sudo apt update && sudo apt install python3
28+
```
29+
30+
**Windows:**
31+
```powershell
32+
winget install Python.Python.3.12
33+
```
34+
35+
---
36+
37+
## How to Use This Workflow
38+
39+
When user requests UI/UX work (design, build, create, implement, review, fix, improve), follow this workflow:
40+
41+
### Step 1: Analyze User Requirements
42+
43+
Extract key information from user request:
44+
- **Product type**: SaaS, e-commerce, portfolio, dashboard, landing page, etc.
45+
- **Style keywords**: minimal, playful, professional, elegant, dark mode, etc.
46+
- **Industry**: healthcare, fintech, gaming, education, etc.
47+
- **Stack**: React, Vue, Next.js, or default to `html-tailwind`
48+
49+
### Step 2: Search Relevant Domains
50+
51+
Use `search.py` multiple times to gather comprehensive information. Search until you have enough context.
52+
53+
```bash
54+
python3 .shared/ui-ux-pro-max/scripts/search.py "<keyword>" --domain <domain> [-n <max_results>]
55+
```
56+
57+
**Recommended search order:**
58+
59+
1. **Product** - Get style recommendations for product type
60+
2. **Style** - Get detailed style guide (colors, effects, frameworks)
61+
3. **Typography** - Get font pairings with Google Fonts imports
62+
4. **Color** - Get color palette (Primary, Secondary, CTA, Background, Text, Border)
63+
5. **Landing** - Get page structure (if landing page)
64+
6. **Chart** - Get chart recommendations (if dashboard/analytics)
65+
7. **UX** - Get best practices and anti-patterns
66+
8. **Stack** - Get stack-specific guidelines (default: html-tailwind)
67+
68+
### Step 3: Stack Guidelines (Default: html-tailwind)
69+
70+
If user doesn't specify a stack, **default to `html-tailwind`**.
71+
72+
```bash
73+
python3 .shared/ui-ux-pro-max/scripts/search.py "<keyword>" --stack html-tailwind
74+
```
75+
76+
Available stacks: `html-tailwind`, `react`, `nextjs`, `vue`, `svelte`, `swiftui`, `react-native`, `flutter`
77+
78+
---
79+
80+
## Search Reference
81+
82+
### Available Domains
83+
84+
| Domain | Use For | Example Keywords |
85+
|--------|---------|------------------|
86+
| `product` | Product type recommendations | SaaS, e-commerce, portfolio, healthcare, beauty, service |
87+
| `style` | UI styles, colors, effects | glassmorphism, minimalism, dark mode, brutalism |
88+
| `typography` | Font pairings, Google Fonts | elegant, playful, professional, modern |
89+
| `color` | Color palettes by product type | saas, ecommerce, healthcare, beauty, fintech, service |
90+
| `landing` | Page structure, CTA strategies | hero, hero-centric, testimonial, pricing, social-proof |
91+
| `chart` | Chart types, library recommendations | trend, comparison, timeline, funnel, pie |
92+
| `ux` | Best practices, anti-patterns | animation, accessibility, z-index, loading |
93+
| `prompt` | AI prompts, CSS keywords | (style name) |
94+
95+
### Available Stacks
96+
97+
| Stack | Focus |
98+
|-------|-------|
99+
| `html-tailwind` | Tailwind utilities, responsive, a11y (DEFAULT) |
100+
| `react` | State, hooks, performance, patterns |
101+
| `nextjs` | SSR, routing, images, API routes |
102+
| `vue` | Composition API, Pinia, Vue Router |
103+
| `svelte` | Runes, stores, SvelteKit |
104+
| `swiftui` | Views, State, Navigation, Animation |
105+
| `react-native` | Components, Navigation, Lists |
106+
| `flutter` | Widgets, State, Layout, Theming |
107+
108+
---
109+
110+
## Example Workflow
111+
112+
**User request:** "Làm landing page cho dịch vụ chăm sóc da chuyên nghiệp"
113+
114+
**AI should:**
115+
116+
```bash
117+
# 1. Search product type
118+
python3 .shared/ui-ux-pro-max/scripts/search.py "beauty spa wellness service" --domain product
119+
120+
# 2. Search style (based on industry: beauty, elegant)
121+
python3 .shared/ui-ux-pro-max/scripts/search.py "elegant minimal soft" --domain style
122+
123+
# 3. Search typography
124+
python3 .shared/ui-ux-pro-max/scripts/search.py "elegant luxury" --domain typography
125+
126+
# 4. Search color palette
127+
python3 .shared/ui-ux-pro-max/scripts/search.py "beauty spa wellness" --domain color
128+
129+
# 5. Search landing page structure
130+
python3 .shared/ui-ux-pro-max/scripts/search.py "hero-centric social-proof" --domain landing
131+
132+
# 6. Search UX guidelines
133+
python3 .shared/ui-ux-pro-max/scripts/search.py "animation" --domain ux
134+
python3 .shared/ui-ux-pro-max/scripts/search.py "accessibility" --domain ux
135+
136+
# 7. Search stack guidelines (default: html-tailwind)
137+
python3 .shared/ui-ux-pro-max/scripts/search.py "layout responsive" --stack html-tailwind
138+
```
139+
140+
**Then:** Synthesize all search results and implement the design.
141+
142+
---
143+
144+
## Tips for Better Results
145+
146+
1. **Be specific with keywords** - "healthcare SaaS dashboard" > "app"
147+
2. **Search multiple times** - Different keywords reveal different insights
148+
3. **Combine domains** - Style + Typography + Color = Complete design system
149+
4. **Always check UX** - Search "animation", "z-index", "accessibility" for common issues
150+
5. **Use stack flag** - Get implementation-specific best practices
151+
6. **Iterate** - If first search doesn't match, try different keywords
152+
7. **Split Into Multiple Files** - For better maintainability:
153+
- Separate components into individual files (e.g., `Header.tsx`, `Footer.tsx`)
154+
- Extract reusable styles into dedicated files
155+
- Keep each file focused and under 200-300 lines
156+
157+
---
158+
159+
## Common Rules for Professional UI
160+
161+
These are frequently overlooked issues that make UI look unprofessional:
162+
163+
### Icons & Visual Elements
164+
165+
| Rule | Do | Don't |
166+
|------|----|----- |
167+
| **No emoji icons** | Use SVG icons (Heroicons, Lucide, Simple Icons) | Use emojis like 🎨 🚀 ⚙️ as UI icons |
168+
| **Stable hover states** | Use color/opacity transitions on hover | Use scale transforms that shift layout |
169+
| **Correct brand logos** | Research official SVG from Simple Icons | Guess or use incorrect logo paths |
170+
| **Consistent icon sizing** | Use fixed viewBox (24x24) with w-6 h-6 | Mix different icon sizes randomly |
171+
172+
### Interaction & Cursor
173+
174+
| Rule | Do | Don't |
175+
|------|----|----- |
176+
| **Cursor pointer** | Add `cursor-pointer` to all clickable/hoverable cards | Leave default cursor on interactive elements |
177+
| **Hover feedback** | Provide visual feedback (color, shadow, border) | No indication element is interactive |
178+
| **Smooth transitions** | Use `transition-colors duration-200` | Instant state changes or too slow (>500ms) |
179+
180+
### Light/Dark Mode Contrast
181+
182+
| Rule | Do | Don't |
183+
|------|----|----- |
184+
| **Glass card light mode** | Use `bg-white/80` or higher opacity | Use `bg-white/10` (too transparent) |
185+
| **Text contrast light** | Use `#0F172A` (slate-900) for text | Use `#94A3B8` (slate-400) for body text |
186+
| **Muted text light** | Use `#475569` (slate-600) minimum | Use gray-400 or lighter |
187+
| **Border visibility** | Use `border-gray-200` in light mode | Use `border-white/10` (invisible) |
188+
189+
### Layout & Spacing
190+
191+
| Rule | Do | Don't |
192+
|------|----|----- |
193+
| **Floating navbar** | Add `top-4 left-4 right-4` spacing | Stick navbar to `top-0 left-0 right-0` |
194+
| **Content padding** | Account for fixed navbar height | Let content hide behind fixed elements |
195+
| **Consistent max-width** | Use same `max-w-6xl` or `max-w-7xl` | Mix different container widths |
196+
197+
---
198+
199+
## Pre-Delivery Checklist
200+
201+
Before delivering UI code, verify these items:
202+
203+
### Visual Quality
204+
- [ ] No emojis used as icons (use SVG instead)
205+
- [ ] All icons from consistent icon set (Heroicons/Lucide)
206+
- [ ] Brand logos are correct (verified from Simple Icons)
207+
- [ ] Hover states don't cause layout shift
208+
209+
### Interaction
210+
- [ ] All clickable elements have `cursor-pointer`
211+
- [ ] Hover states provide clear visual feedback
212+
- [ ] Transitions are smooth (150-300ms)
213+
- [ ] Focus states visible for keyboard navigation
214+
215+
### Light/Dark Mode
216+
- [ ] Light mode text has sufficient contrast (4.5:1 minimum)
217+
- [ ] Glass/transparent elements visible in light mode
218+
- [ ] Borders visible in both modes
219+
- [ ] Test both modes before delivery
220+
221+
### Layout
222+
- [ ] Floating elements have proper spacing from edges
223+
- [ ] No content hidden behind fixed navbars
224+
- [ ] Responsive at 320px, 768px, 1024px, 1440px
225+
- [ ] No horizontal scroll on mobile
226+
227+
### Accessibility
228+
- [ ] All images have alt text
229+
- [ ] Form inputs have labels
230+
- [ ] Color is not the only indicator
231+
- [ ] `prefers-reduced-motion` respected
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
No,Data Type,Keywords,Best Chart Type,Secondary Options,Color Guidance,Performance Impact,Accessibility Notes,Library Recommendation,Interactive Level
2+
1,Trend Over Time,"trend, time-series, line, growth, timeline, progress",Line Chart,"Area Chart, Smooth Area",Primary: #0080FF. Multiple series: use distinct colors. Fill: 20% opacity,⚡ Excellent (optimized),✓ Clear line patterns for colorblind users. Add pattern overlays.,"Chart.js, Recharts, ApexCharts",Hover + Zoom
3+
2,Compare Categories,"compare, categories, bar, comparison, ranking",Bar Chart (Horizontal or Vertical),"Column Chart, Grouped Bar",Each bar: distinct color. Category: grouped same color. Sorted: descending order,⚡ Excellent,✓ Easy to compare. Add value labels on bars for clarity.,"Chart.js, Recharts, D3.js",Hover + Sort
4+
3,Part-to-Whole,"part-to-whole, pie, donut, percentage, proportion, share",Pie Chart or Donut,"Stacked Bar, Treemap",Colors: 5-6 max. Contrasting palette. Large slices first. Use labels.,⚡ Good (limit 6 slices),⚠ Hard for accessibility. Better: Stacked bar with legend. Avoid pie if >5 items.,"Chart.js, Recharts, D3.js",Hover + Drill
5+
4,Correlation/Distribution,"correlation, distribution, scatter, relationship, pattern",Scatter Plot or Bubble Chart,"Heat Map, Matrix",Color axis: gradient (blue-red). Size: relative. Opacity: 0.6-0.8 to show density,⚠ Moderate (many points),⚠ Provide data table alternative. Use pattern + color distinction.,"D3.js, Plotly, Recharts",Hover + Brush
6+
5,Heatmap/Intensity,"heatmap, heat-map, intensity, density, matrix",Heat Map or Choropleth,"Grid Heat Map, Bubble Heat",Gradient: Cool (blue) to Hot (red). Scale: clear legend. Divergent for ±data,⚡ Excellent (color CSS),⚠ Colorblind: Use pattern overlay. Provide numerical legend.,"D3.js, Plotly, ApexCharts",Hover + Zoom
7+
6,Geographic Data,"geographic, map, location, region, geo, spatial","Choropleth Map, Bubble Map",Geographic Heat Map,Regional: single color gradient or categorized colors. Legend: clear scale,⚠ Moderate (rendering),⚠ Include text labels for regions. Provide data table alternative.,"D3.js, Mapbox, Leaflet",Pan + Zoom + Drill
8+
7,Funnel/Flow,funnel/flow,"Funnel Chart, Sankey",Waterfall (for flows),Stages: gradient (starting color → ending color). Show conversion %,⚡ Good,✓ Clear stage labels + percentages. Good for accessibility if labeled.,"D3.js, Recharts, Custom SVG",Hover + Drill
9+
8,Performance vs Target,performance-vs-target,Gauge Chart or Bullet Chart,"Dial, Thermometer",Performance: Red→Yellow→Green gradient. Target: marker line. Threshold colors,⚡ Good,✓ Add numerical value + percentage label beside gauge.,"D3.js, ApexCharts, Custom SVG",Hover
10+
9,Time-Series Forecast,time-series-forecast,Line with Confidence Band,Ribbon Chart,Actual: solid line #0080FF. Forecast: dashed #FF9500. Band: light shading,⚡ Good,✓ Clearly distinguish actual vs forecast. Add legend.,"Chart.js, ApexCharts, Plotly",Hover + Toggle
11+
10,Anomaly Detection,anomaly-detection,Line Chart with Highlights,Scatter with Alert,Normal: blue #0080FF. Anomaly: red #FF0000 circle/square marker + alert,⚡ Good,✓ Circle/marker for anomalies. Add text alert annotation.,"D3.js, Plotly, ApexCharts",Hover + Alert
12+
11,Hierarchical/Nested Data,hierarchical/nested-data,Treemap,"Sunburst, Nested Donut, Icicle",Parent: distinct hues. Children: lighter shades. White borders 2-3px.,⚠ Moderate,⚠ Poor - provide table alternative. Label large areas.,"D3.js, Recharts, ApexCharts",Hover + Drilldown
13+
12,Flow/Process Data,flow/process-data,Sankey Diagram,"Alluvial, Chord Diagram",Gradient from source to target. Opacity 0.4-0.6 for flows.,⚠ Moderate,⚠ Poor - provide flow table alternative.,"D3.js (d3-sankey), Plotly",Hover + Drilldown
14+
13,Cumulative Changes,cumulative-changes,Waterfall Chart,"Stacked Bar, Cascade",Increases: #4CAF50. Decreases: #F44336. Start: #2196F3. End: #0D47A1.,⚡ Good,✓ Good - clear directional colors with labels.,"ApexCharts, Highcharts, Plotly",Hover
15+
14,Multi-Variable Comparison,multi-variable-comparison,Radar/Spider Chart,"Parallel Coordinates, Grouped Bar",Single: #0080FF 20% fill. Multiple: distinct colors per dataset.,⚡ Good,⚠ Moderate - limit 5-8 axes. Add data table.,"Chart.js, Recharts, ApexCharts",Hover + Toggle
16+
15,Stock/Trading OHLC,stock/trading-ohlc,Candlestick Chart,"OHLC Bar, Heikin-Ashi",Bullish: #26A69A. Bearish: #EF5350. Volume: 40% opacity below.,⚡ Good,⚠ Moderate - provide OHLC data table.,"Lightweight Charts (TradingView), ApexCharts",Real-time + Hover + Zoom
17+
16,Relationship/Connection Data,relationship/connection-data,Network Graph,"Hierarchical Tree, Adjacency Matrix",Node types: categorical colors. Edges: #90A4AE 60% opacity.,❌ Poor (500+ nodes struggles),❌ Very Poor - provide adjacency list alternative.,"D3.js (d3-force), Vis.js, Cytoscape.js",Drilldown + Hover + Drag
18+
17,Distribution/Statistical,distribution/statistical,Box Plot,"Violin Plot, Beeswarm",Box: #BBDEFB. Border: #1976D2. Median: #D32F2F. Outliers: #F44336.,⚡ Excellent,"✓ Good - include stats table (min, Q1, median, Q3, max).","Plotly, D3.js, Chart.js (plugin)",Hover
19+
18,Performance vs Target (Compact),performance-vs-target-(compact),Bullet Chart,"Gauge, Progress Bar","Ranges: #FFCDD2, #FFF9C4, #C8E6C9. Performance: #1976D2. Target: black 3px.",⚡ Excellent,✓ Excellent - compact with clear values.,"D3.js, Plotly, Custom SVG",Hover
20+
19,Proportional/Percentage,proportional/percentage,Waffle Chart,"Pictogram, Stacked Bar 100%",10x10 grid. 3-5 categories max. 2-3px spacing between squares.,⚡ Good,✓ Good - better than pie for accessibility.,"D3.js, React-Waffle, Custom CSS Grid",Hover
21+
20,Hierarchical Proportional,hierarchical-proportional,Sunburst Chart,"Treemap, Icicle, Circle Packing",Center to outer: darker to lighter. 15-20% lighter per level.,⚠ Moderate,⚠ Poor - provide hierarchy table alternative.,"D3.js (d3-hierarchy), Recharts, ApexCharts",Drilldown + Hover
22+
21,Root Cause Analysis,"root cause, decomposition, tree, hierarchy, drill-down, ai-split",Decomposition Tree,"Decision Tree, Flow Chart",Nodes: #2563EB (Primary) vs #EF4444 (Negative impact). Connectors: Neutral grey.,⚠ Moderate (calculation heavy),✓ clear hierarchy. Allow keyboard navigation for nodes.,"Power BI (native), React-Flow, Custom D3.js",Drill + Expand
23+
22,3D Spatial Data,"3d, spatial, immersive, terrain, molecular, volumetric",3D Scatter/Surface Plot,"Volumetric Rendering, Point Cloud",Depth cues: lighting/shading. Z-axis: color gradient (cool to warm).,❌ Heavy (WebGL required),❌ Poor - requires alternative 2D view or data table.,"Three.js, Deck.gl, Plotly 3D",Rotate + Zoom + VR
24+
23,Real-Time Streaming,"streaming, real-time, ticker, live, velocity, pulse",Streaming Area Chart,"Ticker Tape, Moving Gauge",Current: Bright Pulse (#00FF00). History: Fading opacity. Grid: Dark.,⚡ Optimized (canvas/webgl),⚠ Flashing elements - provide pause button. High contrast.,Smoothed D3.js, CanvasJS, SciChart,Real-time + Pause
25+
24,Sentiment/Emotion,"sentiment, emotion, nlp, opinion, feeling",Word Cloud with Sentiment,"Sentiment Arc, Radar Chart",Positive: #22C55E. Negative: #EF4444. Neutral: #94A3B8. Size = Frequency.,⚡ Good,⚠ Word clouds poor for screen readers. Use list view.,"D3-cloud, Highcharts, Nivo",Hover + Filter
26+
25,Process Mining,"process, mining, variants, path, bottleneck, log",Process Map / Graph,"Directed Acyclic Graph (DAG), Petri Net",Happy path: #10B981 (Thick). Deviations: #F59E0B (Thin). Bottlenecks: #EF4444.,⚠ Moderate to Heavy,⚠ Complex graphs hard to navigate. Provide path summary.,"React-Flow, Cytoscape.js, Recharts",Drag + Node-Click

0 commit comments

Comments
 (0)