-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor responsive grid layout and update dev dependencies #620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…e loop Antd's Row/Col components with responsive breakpoints (xs, sm, lg, etc.) internally use a responsiveObserver that subscribes to media query changes. When many components use responsive breakpoints (like items in a list), media query changes (e.g., Safari toolbar appearing/disappearing on iOS) can trigger cascading re-renders leading to React's maximum update depth error. This fix: - Replaces responsive Col props with fixed span values in queue-list.tsx, queue-list-item.tsx, and climbs-list.tsx - Adds CSS media queries in climbs-list.module.css for responsive 2-column layout on larger screens - Follows CLAUDE.md guidelines to use CSS media queries instead of JavaScript-based breakpoint detection https://claude.ai/code/session_018BBna6eD1vCRKfZSdK11QR
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Claude Review✅ Ready to merge - Minor issues noted below, but nothing blocking. Issues
|
Explains why CSS flex properties are used alongside antd Col component and documents the responsive breakpoint behavior being replicated. https://claude.ai/code/session_018BBna6eD1vCRKfZSdK11QR
Claude Review✅ Ready to merge - Minor issues noted below, but nothing blocking. Issues
Notes
|
Summary
This PR refactors the responsive grid layout system in the climbs list and queue components to use CSS media queries instead of Ant Design's responsive Col props. Additionally, it updates package dependencies to mark certain packages as optional dev dependencies.
Key Changes
Layout Refactoring
Created new CSS module (
climbs-list.module.css) with responsive grid styling using CSS media queries instead of Ant Design'sxs,sm,lg,xlpropsUpdated ClimbsList component to use the new CSS module for responsive column sizing
xs={24} lg={12} xl={12}withclassName={styles.climbCol}Simplified QueueListItem and QueueList components by removing responsive breakpoint props
xs={6} sm={5}withspan={5}(fixed width)xs={15} sm={17}withspan={17}(fixed width)xs={3} sm={2}withspan={2}(fixed width)Dependency Updates
Updated
package-lock.jsonto mark the following asdevOptionalinstead ofdev:@playwright/test@1.57.0@types/react@19.2.7bufferutil@4.1.0node-gyp-build@4.8.4playwright@1.57.0playwright-core@1.57.0Removed
dev: trueflag from production dependencies:react@19.2.3react-dom@19.2.3scheduler@0.27.0Implementation Details
The CSS media query approach provides more reliable responsive behavior compared to JavaScript-based breakpoint detection, particularly for static layouts that don't need dynamic recalculation during runtime.
https://claude.ai/code/session_018BBna6eD1vCRKfZSdK11QR