Skip to content

Simplify mobile Hand & Brain UI - display pieces in single row#196

Merged
kevinjosethomas merged 6 commits into
devfrom
copilot/fix-195
Aug 6, 2025
Merged

Simplify mobile Hand & Brain UI - display pieces in single row#196
kevinjosethomas merged 6 commits into
devfrom
copilot/fix-195

Conversation

Copilot AI commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

This PR addresses the mobile usability issue in the Hand & Brain chess mode where players had to scroll to see all piece selection options.

Problem

The piece selection UI in HandBrainPlayControls used a fixed 3-column grid layout, causing chess pieces to be displayed in 2 rows of 3 pieces each. On mobile devices, this often required scrolling to access all piece options, creating a poor user experience.

Solution

Modified the piece selection layout to be responsive:

  • Mobile (≤768px): All 6 pieces display in a single row using grid-cols-6
  • Desktop (>768px): Maintains original 2×3 grid layout using md:grid-cols-3

Key Changes

  • Grid layout: grid-cols-3grid-cols-6 md:grid-cols-3
  • Container width: max-w-48max-w-full md:max-w-48
  • Button size: h-12 w-12h-10 w-10 md:h-12 md:w-12
  • Icon size: h-6 w-6h-5 w-5 md:h-6 md:w-6
  • Gap spacing: gap-2gap-1 md:gap-2

Visual Results

Mobile Layout - Single Row (No Scrolling Required):
Mobile Layout

Desktop Layout - Original 2×3 Grid Preserved:
Desktop Layout

The solution is minimal and surgical, preserving all existing functionality while eliminating the mobile scrolling issue. Players can now see and access all piece options at a glance on mobile devices.

Fixes #195.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dock2.csslab.ca
    • Triggering command: next-server (v15.4.3) (dns block)
  • fonts.googleapis.com
    • Triggering command: node /home/REDACTED/work/maia-platform-frontend/maia-platform-frontend/node_modules/.bin/next build (dns block)
    • Triggering command: next-server (v15.4.3) (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

kevinjosethomas and others added 5 commits July 28, 2025 22:24
fix: handle missing maia analysis from backend
Improve play controls in Play Against Maia + Play Hand & Brain
@vercel

vercel Bot commented Aug 5, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maia-platform-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 5, 2025 2:15pm

Co-authored-by: kevinjosethomas <46242684+kevinjosethomas@users.noreply.github.com>
Copilot AI changed the title [WIP] Simplify mobile Hand & Brain UI Simplify mobile Hand & Brain UI - display pieces in single row Aug 5, 2025
Copilot AI requested a review from kevinjosethomas August 5, 2025 14:13
@kevinjosethomas kevinjosethomas marked this pull request as ready for review August 6, 2025 03:36
@kevinjosethomas kevinjosethomas changed the base branch from main to dev August 6, 2025 03:36
@kevinjosethomas kevinjosethomas merged commit e9ae508 into dev Aug 6, 2025
11 checks passed
@kevinjosethomas kevinjosethomas deleted the copilot/fix-195 branch August 6, 2025 05:09
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.

Simplify mobile Hand & Brain UI

2 participants