Skip to content

Fix shared row pill overflow on single-person lists - #341

Merged
timgent merged 1 commit into
mainfrom
claude/shared-items-mobile-alignment-a82i9a
Aug 31, 2026
Merged

Fix shared row pill overflow on single-person lists#341
timgent merged 1 commit into
mainfrom
claude/shared-items-mobile-alignment-a82i9a

Conversation

@timgent

@timgent timgent commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes a layout bug where shared row pills (controls) would overflow off the side of the card on single-person lists. The chip block width (44px for one person) was too narrow to contain the pill, which is several times wider than a single person's disc.

Changes

  • CategoryItemGrid.tsx: Changed shared rows from fixed width to minWidth styling, allowing their pills to expand beyond the chip block width when needed while still aligning with person chips when space permits
  • CategoryItemGrid.test.tsx: Added test fixtures (soloPeople, soloItems, soloColumns, soloRows) and helper (renderSoloGrid) to test single-person list layouts, plus two new test cases:
    • Verifies shared rows use minWidth instead of width on single-person lists
    • Confirms person rows still maintain fixed width to hold their place

Implementation Details

The fix distinguishes between two row types:

  • Person rows: Keep fixed width to maintain consistent column alignment throughout the card
  • Shared rows: Use minWidth to allow the pill to take the space it needs while respecting the minimum width when there's room

This ensures shared items don't overflow on narrow lists while maintaining the layout integrity for person-specific items.

https://claude.ai/code/session_01DjmC4oY6u11uF7yL6oJzQD

The chip block is sized to hold a fixed number of 32px discs — one
person's worth is 44px — and a shared row was pinned to the same width.
Its pill is a checkbox and the word "Shared", about 109px, so on every
one-person list at phone width the pill ran out past the right edge of
the category card and was clipped.

A shared row now takes that width as a minimum rather than a rule: with
several people it still starts at the first chip column, exactly as
before, and with one it takes the room the pill needs and gives the rest
back to the name.
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-packing-app Ready Ready Preview Aug 31, 2026 2:47pm

@timgent
timgent merged commit f5ec695 into main Aug 31, 2026
4 checks passed
@timgent
timgent deleted the claude/shared-items-mobile-alignment-a82i9a branch August 31, 2026 14:49
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