Improve select checkbox in card list (#2768)#2924
Open
cqnykamp wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2768
Summary
Flexcontainer withalignSelf="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.md, 16 px) tosize="lg"(20 px) to make the checkbox easier to see.Implementation details
Flexcarries anonClickhandler that callsonSelected/onDeselectedwhen the user clicks outside the checkbox control itself.CheckboxhasonClick={(e) => e.stopPropagation()}to prevent double-toggling when the user clicks directly on the checkbox square (theonChangeon theCheckboxhandles that case).disableSelectanddisableAsSelectedstates still work correctly — the wrapper'sonClickreturns early and the cursor changes todefault.Test plan
New
Card.cy.tsxcomponent tests (group 4) verify:includeSelectionBoxis falseincludeSelectionBoxis trueonSelectedis called when clicking the checkbox directlyonDeselectedis called when clicking a selected checkboxonSelectedis called when clicking the top of the row wrapper (above the checkbox)onSelectedis called when clicking the bottom of the row wrapper (below the checkbox)disableSelectis truehttps://claude.ai/code/session_01Tvq5YAmfNxGctn181NAc4E
Generated by Claude Code