|
| 1 | +# Batch 1: New HIG Playground Component Pages |
| 2 | + |
| 3 | +## Reference Template |
| 4 | +Use `components/buttons.html` as the template. Each page follows the same structure: |
| 5 | +- Header with nav |
| 6 | +- Breadcrumb |
| 7 | +- Page title + description |
| 8 | +- playground-layout grid: iPhone frame (left) + right panel (controls + guidelines + code preview) |
| 9 | +- Interactive controls that update the iPhone preview in real-time |
| 10 | +- SwiftUI code preview that updates with the controls |
| 11 | +- Do/Don't guidelines section (static text for now) |
| 12 | + |
| 13 | +## Components to Create |
| 14 | + |
| 15 | +### Content Category (4 pages) |
| 16 | +1. **charts.html** — Charts (SwiftUI Charts framework) |
| 17 | + - Bar, Line, Area, Pie chart types |
| 18 | + - Controls: chart type, data points, color scheme, show legend toggle |
| 19 | + - Do: Use clear labels, appropriate chart type for data |
| 20 | + - Don't: Overcrowd with data, use 3D effects, misleading scales |
| 21 | + |
| 22 | +2. **image-views.html** — Image Views |
| 23 | + - resizable(), aspectRatio, contentMode (.fit, .fill), clipShape |
| 24 | + - Controls: content mode, corner radius, overlay toggle, shadow |
| 25 | + - Do: Maintain aspect ratio, use appropriate resolution |
| 26 | + - Don't: Stretch images, use low-res on retina displays |
| 27 | + |
| 28 | +3. **text-views.html** — Text Views (read-only styled text) |
| 29 | + - Font styles (title, body, caption, etc.), line limit, truncation |
| 30 | + - Controls: font style, weight, alignment, line limit, color |
| 31 | + - Do: Use Dynamic Type, semantic font styles |
| 32 | + - Don't: Use fixed font sizes, ignore accessibility |
| 33 | + |
| 34 | +4. **web-views.html** — Web Views |
| 35 | + - WKWebView container with URL bar |
| 36 | + - Controls: show/hide nav bar, progress indicator, allow zoom |
| 37 | + - Do: Show loading state, handle errors gracefully |
| 38 | + - Don't: Replace native UI with web content unnecessarily |
| 39 | + |
| 40 | +### Layout Category (6 pages) |
| 41 | +5. **collections.html** — Collections (LazyVGrid/LazyHGrid) |
| 42 | + - Grid of items with different column counts |
| 43 | + - Controls: columns (2/3/4), spacing, item shape (square/rounded) |
| 44 | + - Do: Consistent item sizes, appropriate spacing |
| 45 | + - Don't: Mix wildly different item sizes, tiny tap targets |
| 46 | + |
| 47 | +6. **disclosure-groups.html** — Disclosure Groups |
| 48 | + - Expandable/collapsible sections |
| 49 | + - Controls: default expanded, animation, nested levels |
| 50 | + - Do: Clear hierarchy, meaningful labels |
| 51 | + - Don't: Deep nesting (>3 levels), hide critical info |
| 52 | + |
| 53 | +7. **labels.html** — Labels (icon + text) |
| 54 | + - SF Symbol + text combinations, label styles |
| 55 | + - Controls: icon position, style (.titleOnly, .iconOnly, .titleAndIcon), size |
| 56 | + - Do: Pair icon with text for clarity, use SF Symbols |
| 57 | + - Don't: Use ambiguous icons alone, mismatched icons |
| 58 | + |
| 59 | +8. **outline-views.html** — Outline Views |
| 60 | + - Hierarchical tree list with expand/collapse |
| 61 | + - Controls: indent level, show disclosure indicator, selection style |
| 62 | + - Do: Clear parent-child relationships |
| 63 | + - Don't: Flatten deep hierarchies |
| 64 | + |
| 65 | +9. **split-views.html** — Split Views (NavigationSplitView) |
| 66 | + - Sidebar + detail layout |
| 67 | + - Controls: column visibility, sidebar width, style (prominent/balanced) |
| 68 | + - Do: Maintain context in sidebar, adaptive layout |
| 69 | + - Don't: Force split view on compact screens |
| 70 | + |
| 71 | +10. **tables.html** — Tables |
| 72 | + - Multi-column sortable table |
| 73 | + - Controls: column count, sortable toggle, row selection, alternating rows |
| 74 | + - Do: Align data appropriately, allow sorting |
| 75 | + - Don't: Cramped columns, no scroll for overflow |
| 76 | + |
| 77 | +### Selection & Status (5 pages) |
| 78 | +11. **color-wells.html** — Color Wells (ColorPicker) |
| 79 | + - Color picker circle that opens picker sheet |
| 80 | + - Controls: supports opacity, style (wheel/grid/spectrum) |
| 81 | + - Do: Show current color clearly, provide presets |
| 82 | + - Don't: Tiny tap target, no color preview |
| 83 | + |
| 84 | +12. **pickers.html** — Pickers (wheel, menu, inline styles) |
| 85 | + - Item selection with different display styles |
| 86 | + - Controls: style (wheel/menu/segmented/inline), items count |
| 87 | + - Do: Reasonable number of options, clear labels |
| 88 | + - Don't: Too many items in wheel, vague labels |
| 89 | + |
| 90 | +13. **steppers.html** — Steppers |
| 91 | + - +/- increment control with value display |
| 92 | + - Controls: step size, range, label position |
| 93 | + - Do: Show current value, appropriate range |
| 94 | + - Don't: No value display, unreasonable step sizes |
| 95 | + |
| 96 | +14. **activity-rings.html** — Activity Rings |
| 97 | + - Concentric progress rings (like Apple Watch) |
| 98 | + - Controls: ring count, progress values, colors, animation |
| 99 | + - Do: Clear progress indication, meaningful colors |
| 100 | + - Don't: Too many rings, unclear what they represent |
| 101 | + |
| 102 | +15. **gauges.html** — Gauges |
| 103 | + - Circular/linear gauge indicators |
| 104 | + - Controls: style (circular/linear), range, current value, color gradient |
| 105 | + - Do: Clear min/max labels, appropriate scale |
| 106 | + - Don't: Misleading scale, no context for values |
| 107 | + |
| 108 | +## Style Guidelines |
| 109 | +- Use iOS system colors (--ios-blue, --ios-green, etc.) |
| 110 | +- iPhone frame: 375x812px with Dynamic Island |
| 111 | +- All interactive — controls on right panel update iPhone preview live |
| 112 | +- Include SwiftUI code preview that updates with controls |
| 113 | +- Korean descriptions for page-desc, English for screen content inside iPhone |
| 114 | +- Responsive: single column on mobile (<860px) |
| 115 | + |
| 116 | +## File naming |
| 117 | +All lowercase with hyphens: `charts.html`, `image-views.html`, etc. |
| 118 | +Place in `components/` directory. |
0 commit comments