Skip to content

Add responsive design enhancements for larger screens#11

Merged
Isaiahriveraa merged 1 commit into
mainfrom
feat/responsive-design
Jan 26, 2026
Merged

Add responsive design enhancements for larger screens#11
Isaiahriveraa merged 1 commit into
mainfrom
feat/responsive-design

Conversation

@Isaiahriveraa

Copy link
Copy Markdown
Owner

Summary

Increases container max-widths and adds more grid columns on large screens to better utilize available space.

Context

Application containers were capped at 672px on all desktop sizes, making the app feel cramped on large monitors (1440px+, 1920px+).

Changes

  • PageContainer: Added xl:max-w-5xl (1024px) and 2xl:max-w-7xl (1280px) breakpoints
  • Header: Added matching xl/2xl max-widths to align with page content
  • Games page: Enhanced grid from 2 columns max to 3 columns (lg) and 4 columns (2xl)

Implementation Details

Container width progression:

  • Mobile: 512px (unchanged)
  • Desktop (1024px): 672px (unchanged)
  • XL (1280px): 1024px (new)
  • 2XL (1536px+): 1280px (new)

Games grid progression:

  • Mobile: 1 column
  • Tablet: 2 columns
  • Desktop: 3 columns (new)
  • 2XL: 4 columns (new)

Tests

Ran existing tests - all passing (84/84)

How to test

Open http://localhost:3000/games in browser DevTools responsive mode and test at 1280px, 1536px, 1920px widths.

Impact / Risk

Low risk - only affects CSS classes. No breaking changes.

Checklist

  • Code builds and passes linters
  • Tests pass locally
  • No breaking changes

Copilot AI review requested due to automatic review settings January 26, 2026 19:47
@netlify

netlify Bot commented Jan 26, 2026

Copy link
Copy Markdown

Deploy Preview for huskybids ready!

Name Link
🔨 Latest commit 97b0db3
🔍 Latest deploy log https://app.netlify.com/projects/huskybids/deploys/6977c6a9feeef80008131a2f
😎 Deploy Preview https://deploy-preview-11--huskybids.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to add responsive design enhancements for larger screens by increasing container max-widths and adding more grid columns. However, it also includes numerous unrelated changes that significantly broaden the scope beyond responsive design improvements.

Changes:

  • Responsive design: Enhanced PageContainer, Header, and games page grid to better utilize larger screens
  • Clerk integration: Centralized Clerk appearance configuration and added loading states to login/signup pages
  • Betting system: Migrated from startTime to gameDate field with validation improvements

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
PageContainer.jsx Added xl/2xl breakpoints for max-width (1024px, 1280px) and padding adjustments
Header.jsx Added matching xl/2xl max-widths to align with page content container
games/page.jsx Enhanced grid from 2 columns max to 3 columns (lg) and 4 columns (2xl)
clerk-appearance.js Updated Clerk styling configuration (unrelated to responsive design)
BettingService.js Changed game time validation to use only gameDate field (unrelated)
BettingService.test.js Added gameDate field to test mock (unrelated)
HuskyBidsLoader.jsx Added subtitle prop feature (unrelated)
sign-up/page.jsx Refactored to use shared Clerk config and loading states (unrelated)
login/page.js Refactored to use shared Clerk config and loading states (unrelated)
useBetValidation.js Removed startTime field references, now only uses gameDate (unrelated)
useBetValidation.test.js Updated tests to use gameDate instead of startTime (unrelated)
LoadingContext.jsx Modified useEffect to always clear loading state on route change (unrelated)
tasks/page.jsx Added comment about memoization (unrelated)
auth-pages.test.jsx Added ClerkLoading/ClerkLoaded mock components (unrelated)
sign-up/redirect.test.jsx Added ClerkLoading/ClerkLoaded mock components (unrelated)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

<main
className={cn(
'max-w-lg lg:max-w-2xl mx-auto px-6 lg:px-8 pb-24 lg:pb-12',
'max-w-lg lg:max-w-2xl xl:max-w-5xl 2xl:max-w-7xl mx-auto px-6 lg:px-8 xl:px-10 2xl:px-12 pb-24 lg:pb-12',

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR contains numerous changes that are unrelated to the stated purpose of "responsive design enhancements for larger screens". The following files contain changes that should be in separate PRs:

  • clerk-appearance.js: Changes to Clerk styling configuration
  • BettingService.js and related tests: Changes to betting validation logic
  • HuskyBidsLoader.jsx: Addition of subtitle feature
  • Login and SignUp pages: Integration of loading states and refactoring
  • useBetValidation hook and tests: Removal of startTime field references
  • LoadingContext.jsx: Logic changes to loading state management
  • tasks/page.jsx: Addition of memoization comment

These unrelated changes make the PR difficult to review, increase risk, and violate the single responsibility principle for pull requests. Please separate these into focused PRs.

Copilot uses AI. Check for mistakes.
Comment on lines 104 to +105
startTime: new Date(Date.now() + 86400000), // Tomorrow
gameDate: new Date(Date.now() + 86400000), // Synced with startTime

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mockGame still includes a startTime field (line 104) that should be removed as part of the migration to using only gameDate. The presence of this field in test data could mask bugs where code accidentally relies on startTime.

Suggested change
startTime: new Date(Date.now() + 86400000), // Tomorrow
gameDate: new Date(Date.now() + 86400000), // Synced with startTime
gameDate: new Date(Date.now() + 86400000), // Tomorrow

Copilot uses AI. Check for mistakes.
Comment on lines +69 to +76
setIsLoading(false);
setMessage('');
loadingStartTimeRef.current = null;
if (clearTimeoutRef.current) {
clearTimeout(clearTimeoutRef.current);
clearTimeoutRef.current = null;
}
}, [pathname, isLoading]);
}, [pathname]);

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the isLoading check from the useEffect dependency is problematic. The original code prevented unnecessary state updates when isLoading was already false. Now, every route change will trigger state updates even when no loading state is active, potentially causing unnecessary re-renders. If the intent is to always clear on route change regardless of current state, the change is acceptable, but the dependency array removal is a significant behavioral change that should be explicitly documented or reconsidered.

Copilot uses AI. Check for mistakes.
const cutoffTime = new Date(now.getTime() - BUFFER_MS);

if (gameTime <= cutoffTime) {
if (isNaN(gameTime.getTime()) || gameTime <= cutoffTime) {

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message on line 70 will display "Invalid Date" as the ISO string when gameDate is invalid (NaN check on line 69). This could be confusing to users. Consider providing a more specific error message for invalid dates versus games that have already started, or sanitize the error message when gameDate is invalid.

Suggested change
if (isNaN(gameTime.getTime()) || gameTime <= cutoffTime) {
if (isNaN(gameTime.getTime())) {
throw new Error(`Betting is closed - invalid game date (gameDate: ${game.gameDate})`);
}
if (gameTime <= cutoffTime) {

Copilot uses AI. Check for mistakes.
export default function HuskyBidsLoader({
size = 'md',
centered = false,
subtitle = null, // TODO: New prop added - defaults to null

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TODO comment "New prop added - defaults to null" should be removed. TODO comments are meant for work that still needs to be done, not to document that work has been completed. If this is documentation about the prop's default value, it should be formatted as a proper JSDoc comment instead.

Copilot uses AI. Check for mistakes.
@Isaiahriveraa Isaiahriveraa force-pushed the feat/responsive-design branch from 74156e9 to 97b0db3 Compare January 26, 2026 19:55
@Isaiahriveraa Isaiahriveraa requested a review from Copilot January 26, 2026 19:57
@Isaiahriveraa Isaiahriveraa merged commit bac40af into main Jan 26, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants