Skip to content

fix: add hover highlight and tooltip to directory nodes in treemap#27

Merged
homeles merged 1 commit into
mainfrom
fix/directory-treemap-tooltip
Apr 17, 2026
Merged

fix: add hover highlight and tooltip to directory nodes in treemap#27
homeles merged 1 commit into
mainfrom
fix/directory-treemap-tooltip

Conversation

@lupita-hom

Copy link
Copy Markdown
Collaborator

Problem

Directory nodes (dirG) in the treemap had click handlers but no tooltip and no hover highlight. When directories are small, users couldn't tell what directory they were hovering over.

Changes

  • Moved tooltip creation before dirG and leafG rendering so both can reference it
  • Hover highlight on directory background rects: mouseover sets stroke #58a6ff, mouseout restores #30363d
  • Hover highlight on directory header bar rects: propagates highlight to parent background rect for consistent behavior
  • Directory tooltip: shows 📁 icon + full path, +additions (green), -deletions (red), ±total changes, and interaction hints

Testing

  • tsc --noEmit passes with no errors
  • Leaf node tooltips and hover behavior unchanged

- Move tooltip div creation before dirG/leafG so both can reference it
- Add mouseover/mouseout hover highlight (stroke #58a6ff) on directory background rects
- Add mouseover/mouseout on directory header bar rects for consistent hover
- Add mousemove/mouseleave tooltip on directory groups showing path, additions, deletions, total changes
@homeles homeles merged commit 6483c19 into main Apr 17, 2026
1 check passed
@homeles homeles deleted the fix/directory-treemap-tooltip branch April 17, 2026 18:35
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.

2 participants