Skip to content

File tree: show hover and stop the lag - #807

Open
divyanshudhruv wants to merge 1 commit into
athasdev:mainfrom
divyanshudhruv:fix/file-tree-hover-and-corners
Open

divyanshudhruv wants to merge 1 commit into
athasdev:mainfrom
divyanshudhruv:fix/file-tree-hover-and-corners

Conversation

@divyanshudhruv

Copy link
Copy Markdown

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

  • Hover on a file row was only a text brighten, easy to miss.
  • Fast pointer movement left the highlight behind.
  • The last row painted over the shell's rounded bottom corner.

What / Solution

  • Hover fill: inactive rows get a visible accent fill with the same 6px radius as buttons.
  • No lag: hover_row now 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's island_radius on its lower corners.

Before / After

Media

Area Before After
Whole tree
tree-1.mp4
tree-2.mp4

Summary

Area Before After
Hover Text-only brighten, hard to see Visible 6px fill
Fast movement Highlight lagged behind pointer Immediate
Bottom corner Last row squared the shell corner Clipped cleanly

Testing

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.

1 participant