Skip to content

Conversation

@syedszeeshan
Copy link
Collaborator

@syedszeeshan syedszeeshan commented Oct 8, 2025

Before (the change)

After (the change)

Make sure that you've checked the boxes below before you submit the PR

  • I have read and followed the setup steps
  • I have created necessary unit tests
  • I have tested the functionality in both React and Angular.

Steps needed to test

For testing, you can add a border to the newly added styles in ::before and visually verify the increased clickable area, as in the screenshot below

image

@syedszeeshan syedszeeshan force-pushed the Syed/2361-UI-clickablearea branch 2 times, most recently from 5d8fd63 to 79bcb45 Compare October 10, 2025 16:55
@syedszeeshan syedszeeshan changed the title NOT READY - feat(#2361): increase clickable area for radio and checkbox feat(#2361): increase clickable area for radio and checkbox Oct 10, 2025
@syedszeeshan syedszeeshan marked this pull request as ready for review October 10, 2025 19:31
@syedszeeshan syedszeeshan linked an issue Oct 10, 2025 that may be closed by this pull request
/* Container */
.container {
position: relative;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Only with Safari, when I am having a checkbox, and when I click on it, there is a light "shift" 22px to 24px around the checkbox, like the below video. Safari I am testing both 17.4.1 and 18.4 (browserstack)

checkbox-safari.mov

// - matrix\(1, 0, 0, 1, = identity matrix
// - -2[0-9.]+ = negative number starting with -2 (e.g., -22, -23.6)
// - Flexible pattern accounts for border widths and sub-pixel rendering
expect(beforeStyles.transform).toMatch(/matrix\(1, 0, 0, 1, -2[0-9.]+, -2[0-9.]+\)/);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is extremely specific and I think very brittle. After the tests above, I'm not sure this is adding anything useful, and would make the test far more brittle than I would like.

// - (-22, -22) = translate by -22px in X and Y directions
// Math: 50% of 44px = 22px, so translate(-50%, -50%) = translate(-22px, -22px)
// This centers the 44px touch target on the 24px icon
expect(beforeStyles.transform).toBe("matrix(1, 0, 0, 1, -22, -22)");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as the one I made for the Checkbox tests

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.

Radio Item and Checkbox: Increase clickable area

3 participants