Skip to content
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

Merged
merged 4 commits into from Sep 28, 2022

Conversation

colebemis
Copy link
Contributor

@colebemis colebemis commented Sep 27, 2022

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
CleanShot 2022-09-26 at 17 16 46 CleanShot 2022-09-26 at 17 16 20

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@changeset-bot
Copy link

changeset-bot bot commented Sep 27, 2022

🦋 Changeset detected

Latest commit: 151ce1a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 27, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 77.1 KB (0%)
dist/browser.umd.js 77.71 KB (0%)

@colebemis colebemis changed the title TreeView: Increase touch target size for coarse pointers TreeView: Increase touch target size for cursor:coarse Sep 27, 2022
@colebemis colebemis temporarily deployed to github-pages September 27, 2022 00:20 Inactive
@colebemis colebemis changed the title TreeView: Increase touch target size for cursor:coarse TreeView: Increase touch target size for pointer:coarse Sep 27, 2022
@colebemis colebemis marked this pull request as ready for review September 27, 2022 00:23
@colebemis colebemis requested review from a team and josepmartins September 27, 2022 00:23
@colebemis colebemis changed the title TreeView: Increase touch target size for pointer:coarse TreeView: Increase touch target size for coarse pointers Sep 27, 2022
@colebemis colebemis temporarily deployed to github-pages September 27, 2022 00:31 Inactive
Copy link
Member

@broccolinisoup broccolinisoup left a 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
Copy link
Member

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

Copy link
Contributor Author

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!

src/sx.ts Show resolved Hide resolved
@colebemis colebemis temporarily deployed to github-pages September 27, 2022 23:37 Inactive
@colebemis colebemis merged commit 33ba836 into main Sep 28, 2022
@colebemis colebemis deleted the treeview-coarse-pointer branch September 28, 2022 02:53
@primer-css primer-css mentioned this pull request Sep 28, 2022
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.

None yet

2 participants