Page MenuHomePhabricator

[web] make mouse pointer when hovering over checkbox input
ClosedPublic

Authored by ginsu on Jan 18 2024, 11:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 10:27 AM
Unknown Object (File)
Thu, Oct 31, 10:27 AM
Unknown Object (File)
Thu, Oct 31, 10:27 AM
Unknown Object (File)
Thu, Oct 31, 10:27 AM
Unknown Object (File)
Thu, Oct 31, 10:27 AM
Unknown Object (File)
Thu, Oct 31, 1:21 AM
Unknown Object (File)
Thu, Oct 31, 12:15 AM
Unknown Object (File)
Oct 5 2024, 12:17 PM
Subscribers

Details

Summary

Our new add/select users modal uses checkboxes to select a group of users. As I was working on building this modal I noticed that when I hovered over a checkbox the mouse was not a pointer. I thought that was a bit strange and updated the behavior so that the mouse would be a pointer whenever a checkbox is hovered over

Test Plan

Please see the demo videos below

before:

after:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Seems fine to me as long as we're consistent with this sort of thing.

(Have read misc things on Twitter that cursor: pointer should be avoided for non-link elements, but I don't really have an opinion)

This revision is now accepted and ready to land.Jan 18 2024, 9:50 PM

(Have read misc things on Twitter that cursor: pointer should be avoided for non-link elements, but I don't really have an opinion)

I know we use cursor: pointer in other places that are non-link elements so this should be consistent with the rest of the codebase

so this should be consistent with the rest of the codebase

yeah that makes sense and is more important. was mostly just commentary

update with fix to checkbox shrinking

web/components/checkbox.css
5 ↗(On Diff #36432)

Snuck this change in, but noticed that when the username of a user is super long the checkbox width would shrink a tad:

Screenshot 2024-01-31 at 1.47.28 PM.png (1×3 px, 584 KB)

Added this min-width property to enforce that the checkbox will always be 24px

Screenshot 2024-01-31 at 1.47.34 PM.png (1×3 px, 584 KB)