Repository navigation
File tree: show hover and stop the lag - #807
Open
divyanshudhruv wants to merge 1 commit into
Open
divyanshudhruv wants to merge 1 commit into
divyanshudhruv wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
Visible file-tree hover, no lag on fast pointer movement, and a bottom row that respects the rounded window corner.
Short description
I came across this while using the file tree. The hover state only brightened the text, so it was hard to tell which row the pointer was on, and with fast movement the highlight lagged behind. I added a visible fill with the same corner radius as buttons, stopped the hover handler from re-rendering the whole tree, and clipped the bottom row to the shell radius.
Problems
What / Solution
Hover fill:inactive rows get a visibleaccentfill with the same6pxradius as buttons.No lag:hover_rownow returns early for normal rows, so pointer movement no longer triggers a full tree re-render. Only ignored and hidden folders still notify for the deferred size badge.Bottom corner:the last row uses the shell'sisland_radiuson its lower corners.Before / After
Media
Whole treetree-1.mp4
tree-2.mp4
Summary
Hover6pxfillFast movementBottom cornerTesting
cargo check -p file_tree:PASS