Skip to content

Improve select checkbox in card list (#2768)#2924

Open
cqnykamp wants to merge 1 commit into
mainfrom
claude/modest-franklin-QwpkC
Open

Improve select checkbox in card list (#2768)#2924
cqnykamp wants to merge 1 commit into
mainfrom
claude/modest-franklin-QwpkC

Conversation

@cqnykamp

Copy link
Copy Markdown
Contributor

Fixes #2768

Summary

  • Full-row click target: Wraps the checkbox in a Flex container with alignSelf="stretch" so the entire row height is clickable. Clicking anywhere above or below the checkbox visual control still toggles the selection, instead of only responding to clicks directly on the small checkbox square.
  • Larger checkbox: Changed from default size (md, 16 px) to size="lg" (20 px) to make the checkbox easier to see.

Implementation details

  • The wrapper Flex carries an onClick handler that calls onSelected/onDeselected when the user clicks outside the checkbox control itself.
  • The inner Checkbox has onClick={(e) => e.stopPropagation()} to prevent double-toggling when the user clicks directly on the checkbox square (the onChange on the Checkbox handles that case).
  • disableSelect and disableAsSelected states still work correctly — the wrapper's onClick returns early and the cursor changes to default.

Test plan

New Card.cy.tsx component tests (group 4) verify:

  • Checkbox does not render when includeSelectionBox is false
  • Checkbox renders when includeSelectionBox is true
  • onSelected is called when clicking the checkbox directly
  • onDeselected is called when clicking a selected checkbox
  • onSelected is called when clicking the top of the row wrapper (above the checkbox)
  • onSelected is called when clicking the bottom of the row wrapper (below the checkbox)
  • Clicking the wrapper does nothing when disableSelect is true
  • Checkbox control is 20 px wide (size="lg")

https://claude.ai/code/session_01Tvq5YAmfNxGctn181NAc4E


Generated by Claude Code

Make the clickable area span the full row height so clicking anywhere above
or below the checkbox visual control still toggles it. Increase the checkbox
to size="lg" so it is easier to see.

https://claude.ai/code/session_01Tvq5YAmfNxGctn181NAc4E
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.

Improve the select box in card list

2 participants