-
Notifications
You must be signed in to change notification settings - Fork 526
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: Add nesting indicator lines #2350
Conversation
Co-authored-by: Eric Bailey <ericwbailey@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 61a2d83 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 📦
|
This PR is ready for review but let's not merge until we merge #2331 |
src/TreeView/TreeView.tsx
Outdated
// fade in when the user mouses over the entire component, | ||
// or when there's focus inside the component. This makes | ||
// sure the component remains simple when not in use. | ||
'@media (hover: hover)': { |
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.
🔥
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.
So cool, love the usage of grid 🔥
The setup with @media (hover: hover)
is slick, love how it easily it falls back on iOS Safari and enhances on Chrome/FF/Safari
// On devices with :hover support, the nesting indicator lines | ||
// fade in when the user mouses over the entire component, | ||
// or when there's focus inside the component. This makes | ||
// sure the component remains simple when not in use. | ||
'@media (hover: hover)': { |
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.
❤️
Summary
Adds lines to indicate the depth of items in a TreeView:
👉 Try it out
:hover
support, the nesting indicator lines appear at all times.:hover
support, the nesting indicator lines fade in when the user mouses over the entire component, or when there's focus inside the component. This makes sure the component remains simple when not in use.CleanShot.2022-09-19.at.16.56.18.mp4
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.