Commit 4a59078
committed
feat: add responsive breakpoint standardization and documentation
Standardize responsive breakpoints across all components and add comprehensive documentation.
**SummaryCard Button Skeleton Fix:**
- Fix button skeleton showing full-width on desktop in loading states
- Use CSS custom property (--button-skeleton-width) instead of inline width
- Calculate dynamic width based on button text length (min 88px, max 200px)
- Preserve media query behavior for responsive breakpoints
**Responsive Breakpoint Standardization:**
- Add design tokens for breakpoints (640px, 768px, 1024px) in tokens.css
- Standardize all components to use hardcoded px values in media queries
- Add inline comments (/* desktop */, /* desktop-wide */) for clarity
- Document ChatGPT Desktop widget width strategy (768px)
**Breakpoint Strategy:**
- List component: 640px (ensures desktop layout at 768px ChatGPT widget width)
- Card/SummaryCard/Album: 768px (button auto-width at ChatGPT widget size)
- FullscreenMap: 1024px (sidebar only on wide screens)
**Implementation Details:**
- CSS variables cannot be used in @media conditions (browser limitation)
- Follows industry best practices (Tailwind CSS, Bootstrap, Material-UI)
- Design tokens serve as documentation reference
**Storybook Documentation:**
- Add "Responsive Breakpoints" page under Design Tokens
- Interactive demos showing SummaryCard button width at 768px
- Interactive demos showing List layout change at 640px
- Live viewport width indicators for testing
- ChatGPT widget strategy explanation
- Implementation notes with code examples
**Files Changed:**
- SummaryCard: Button skeleton with CSS variable, 768px breakpoint
- List: 640px breakpoint maintained
- Album: 768px breakpoint with inline comments
- FullscreenMap/MapSidebar: 1024px breakpoint with inline comments
- tokens.css: Added breakpoint design tokens
- Tokens.stories.tsx: Added ResponsiveBreakpoints story1 parent ec80c5f commit 4a59078
File tree
15 files changed
+1145
-167
lines changed- packages/ui/src
- components
- Album
- Card
- Carousel
- List
- Map
- tokens
15 files changed
+1145
-167
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
582 | 583 | | |
583 | 584 | | |
584 | 585 | | |
585 | | - | |
| 586 | + | |
586 | 587 | | |
587 | 588 | | |
588 | 589 | | |
| |||
939 | 940 | | |
940 | 941 | | |
941 | 942 | | |
942 | | - | |
943 | | - | |
| 943 | + | |
| 944 | + | |
944 | 945 | | |
945 | 946 | | |
946 | 947 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| |||
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
303 | 312 | | |
304 | | - | |
| 313 | + | |
305 | 314 | | |
306 | 315 | | |
307 | 316 | | |
308 | 317 | | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
309 | 322 | | |
310 | 323 | | |
311 | 324 | | |
| |||
324 | 337 | | |
325 | 338 | | |
326 | 339 | | |
327 | | - | |
328 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
329 | 347 | | |
330 | 348 | | |
331 | 349 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments