New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TreeView: Increase touch target size for coarse pointers #2376
Conversation
🦋 Changeset detectedLatest commit: 151ce1a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
cursor:coarse
cursor:coarse
pointer:coarse
pointer:coarse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 🚀
fontSize: 1, | ||
color: 'fg.default', | ||
borderRadius: 2, | ||
cursor: 'pointer', | ||
'&:hover': { | ||
backgroundColor: 'actionListItem.default.hoverBg' | ||
}, | ||
'@media (pointer: coarse)': { | ||
'--toggle-width': '1.5rem', // 24px |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Is there a specific value for min touch target size in the guideline? Because I increased the touch target size on the UnderlineNav as well but used the value from design. I am curious to see if there is a guideline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. @mperrotti might know!
Summary
Increases the touch target size of tree items when the device pointer has limited accuracy (example: touch screen devices).
Screenshots
pointer:fine
pointer:coarse
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.