|
| 1 | +# Responsive Design Documentation |
| 2 | + |
| 3 | +This document details the responsive behavior of the BalatroBench leaderboard tables across different screen sizes. |
| 4 | + |
| 5 | +## Tailwind CSS Breakpoints |
| 6 | + |
| 7 | +The application uses standard Tailwind CSS breakpoints: |
| 8 | + |
| 9 | +| Breakpoint | Min Width | Description | |
| 10 | +|------------|-----------|-------------| |
| 11 | +| (default) | 0px | Mobile devices | |
| 12 | +| `sm` | 640px | Small tablets | |
| 13 | +| `md` | 768px | Tablets | |
| 14 | +| `lg` | 1024px | Laptops | |
| 15 | +| `xl` | 1280px | Desktops | |
| 16 | + |
| 17 | +## Index.html - Main Leaderboard |
| 18 | + |
| 19 | +### Column Visibility by Screen Size |
| 20 | + |
| 21 | +| Column | Icon | Mobile | sm (640px+) | md (768px+) | lg (1024px+) | xl (1280px+) | |
| 22 | +|--------|------|--------|-------------|-------------|--------------|--------------| |
| 23 | +| Rank (#) | - | ✓ | ✓ | ✓ | ✓ | ✓ | |
| 24 | +| Model | - | ✓ | ✓ | ✓ | ✓ | ✓ | |
| 25 | +| Vendor | - | ✗ | ✗ | ✗ | ✗ | ✓ | |
| 26 | +| Round | - | ✓ | ✓ | ✓ | ✓ | ✓ | |
| 27 | +| Valid tool calls | ✓🔧 | ✗ | ✓ | ✓ | ✓ | ✓ | |
| 28 | +| Invalid tool calls | ⚠️🔧 | ✗ | ✓ | ✓ | ✓ | ✓ | |
| 29 | +| Error responses | ❌🔧 | ✗ | ✓ | ✓ | ✓ | ✓ | |
| 30 | +| Input tokens | In💾/🔧 | ✗ | ✗ | ✗ | ✓ | ✓ | |
| 31 | +| Output tokens | Out💾/🔧 | ✗ | ✗ | ✗ | ✓ | ✓ | |
| 32 | +| Time per call | ⏰/🔧 [s] | ✗ | ✗ | ✓ | ✓ | ✓ | |
| 33 | +| Cost per call | 💲/🔧 [m$] | ✗ | ✗ | ✓ | ✓ | ✓ | |
| 34 | + |
| 35 | +### Responsive Behavior Summary |
| 36 | + |
| 37 | +**Mobile (< 640px):** |
| 38 | +- Shows only essential columns: Rank, Model, Round |
| 39 | +- Minimal view for quick performance comparison |
| 40 | + |
| 41 | +**Small tablets (640px - 767px):** |
| 42 | +- Adds tool call reliability metrics (3 columns) |
| 43 | +- Users can assess model reliability |
| 44 | + |
| 45 | +**Tablets (768px - 1023px):** |
| 46 | +- Adds performance metrics: Time and Cost per tool call |
| 47 | +- Comprehensive view of model efficiency |
| 48 | + |
| 49 | +**Laptops (1024px - 1279px):** |
| 50 | +- Adds token usage metrics (Input/Output tokens) |
| 51 | +- Full performance and resource usage visibility |
| 52 | + |
| 53 | +**Desktops (1280px+):** |
| 54 | +- Adds Vendor column |
| 55 | +- Complete dataset with all available information |
| 56 | + |
| 57 | +## Community.html - Community Strategies |
| 58 | + |
| 59 | +### Column Visibility by Screen Size |
| 60 | + |
| 61 | +| Column | Icon | Mobile | sm (640px+) | md (768px+) | lg (1024px+) | xl (1280px+) | |
| 62 | +|--------|------|--------|-------------|-------------|--------------|--------------| |
| 63 | +| Rank (#) | - | ✓ | ✓ | ✓ | ✓ | ✓ | |
| 64 | +| Author | - | ✗ | ✗ | ✗ | ✓ | ✓ | |
| 65 | +| Strategy | - | ✓ | ✓ | ✓ | ✓ | ✓ | |
| 66 | +| Round | - | ✓ | ✓ | ✓ | ✓ | ✓ | |
| 67 | +| Valid tool calls | ✓🔧 | ✗ | ✓ | ✓ | ✓ | ✓ | |
| 68 | +| Invalid tool calls | ⚠️🔧 | ✗ | ✓ | ✓ | ✓ | ✓ | |
| 69 | +| Error responses | ❌🔧 | ✗ | ✓ | ✓ | ✓ | ✓ | |
| 70 | +| Input tokens | In💾/🔧 | ✗ | ✗ | ✗ | ✓ | ✓ | |
| 71 | +| Output tokens | Out💾/🔧 | ✗ | ✗ | ✗ | ✓ | ✓ | |
| 72 | +| Time per call | ⏰/🔧 [s] | ✗ | ✗ | ✓ | ✓ | ✓ | |
| 73 | +| Cost per call | 💲/🔧 [m$] | ✗ | ✗ | ✓ | ✓ | ✓ | |
| 74 | + |
| 75 | +### Responsive Behavior Summary |
| 76 | + |
| 77 | +**Mobile (< 640px):** |
| 78 | +- Shows only essential columns: Rank, Strategy, Round |
| 79 | +- Focus on strategy name and performance |
| 80 | + |
| 81 | +**Small tablets (640px - 767px):** |
| 82 | +- Adds tool call reliability metrics (3 columns) |
| 83 | +- Strategy reliability assessment enabled |
| 84 | + |
| 85 | +**Tablets (768px - 1023px):** |
| 86 | +- Adds performance metrics: Time and Cost per tool call |
| 87 | +- Efficiency comparison between strategies |
| 88 | + |
| 89 | +**Laptops (1024px - 1279px):** |
| 90 | +- Adds Author column and token usage metrics |
| 91 | +- Full attribution and resource usage visibility |
| 92 | + |
| 93 | +**Desktops (1280px+):** |
| 94 | +- No additional columns (same as laptop view) |
| 95 | +- Complete dataset with all available information |
| 96 | + |
| 97 | +## Key Differences Between Pages |
| 98 | + |
| 99 | +| Feature | Index.html | Community.html | |
| 100 | +|---------|------------|----------------| |
| 101 | +| Secondary identifier | Vendor (xl+ only) | Author (lg+ only) | |
| 102 | +| Vendor column threshold | 1280px+ | N/A | |
| 103 | +| Author column threshold | N/A | 1024px+ | |
| 104 | +| Additional chart | Performance bar chart (lg+) | None | |
| 105 | + |
| 106 | +## Design Patterns |
| 107 | + |
| 108 | +### Progressive Disclosure |
| 109 | +Both pages follow a mobile-first approach with progressive disclosure: |
| 110 | +1. **Core metrics first**: Rank and performance (Round) always visible |
| 111 | +2. **Reliability next**: Tool call metrics at small screens |
| 112 | +3. **Efficiency follows**: Performance metrics at medium screens |
| 113 | +4. **Resources last**: Token usage at large screens |
| 114 | +5. **Attribution finally**: Vendor/Author at largest screens |
| 115 | + |
| 116 | +### Visual Hierarchy |
| 117 | +- **Border separators** (`border-l-2`): Used to visually group column sections |
| 118 | + - Stats section (Round) |
| 119 | + - Tool calls section |
| 120 | + - Tokens section |
| 121 | + - Performance section |
| 122 | + |
| 123 | +### Accessibility |
| 124 | +- All columns use `aria-label` attributes for icon-based headers |
| 125 | +- Screen reader text provided via `.sr-only` class |
| 126 | +- Semantic HTML with proper `scope` attributes on table headers |
| 127 | + |
| 128 | +## Additional Responsive Features |
| 129 | + |
| 130 | +### Performance Bar Chart (index.html only) |
| 131 | +- Hidden on mobile/tablet: `hidden lg:block` |
| 132 | +- Visible from 1024px+ |
| 133 | +- Height: 250px fixed |
| 134 | +- Shows model comparison with rounds reached |
| 135 | + |
| 136 | +### Interactive Row Expansion |
| 137 | +- Available on desktop sizes (lg+) |
| 138 | +- Shows detailed statistics including: |
| 139 | + - Round distribution histogram |
| 140 | + - Provider usage pie chart |
| 141 | + - Per-game statistics table |
| 142 | + - Total aggregated metrics |
| 143 | + |
| 144 | +### Navigation |
| 145 | +- Responsive navigation bar on all pages |
| 146 | +- Adjustable button widths: `w-28 sm:w-32 md:w-36 lg:w-40` |
| 147 | +- Horizontal padding adjusts: `px-2 xl:px-4` |
0 commit comments