Skip to content

feat: add hover info tooltip on thumbnails with H hotkey (#441) - #605

Merged
julyx10 merged 2 commits into
julyx10:mainfrom
leeyupeng:feature/441-thumbnail-tooltip
Nov 30, 2026
Merged

julyx10 merged 2 commits into
julyx10:mainfrom
leeyupeng:feature/441-thumbnail-tooltip

Conversation

@leeyupeng

Copy link
Copy Markdown
Contributor

Description

Fixes #441

Screenshots

441-dark.mp4
441 441

What

Resting the pointer on a gallery thumbnail for ~0.5 s shows a small tooltip below the thumbnail with the 4 basic file details requested in the issue, one per line:

  • file name
  • location (parent path)
  • file size
  • modified date

The tooltip is optional and can be toggled:

  • H hotkey while browsing the gallery (default: disabled — opt-in)
  • Settings → Grid → "Hover info tooltip"

Behavior details:

  • Positioned below the thumbnail with exact pixel placement (measured size, viewport clamped); flips above the thumbnail when there is no room below.
  • Hides on pointer leave, on grid scroll (wheel doesn't fire pointerleave), or when the feature is disabled.
  • Re-enabling via H while hovering shows the tooltip on the current photo immediately (no dwell wait).
  • Fade-in + quick settle animation (--hover-info-duration / --hover-info-start-scale CSS variables at the bottom of Thumbnail.vue); no transform remains after the animation, so text renders as sharp as the rest of the UI (an earlier backdrop-blur/transform version rendered softer in the webview).

Files changed

  • src-vite/src/components/Thumbnail.vue — tooltip UI + hover/dwell/position/enter animation logic
  • src-vite/src/common/shortcuts.ts — new view.hoverInfoTooltip shortcut, bound to H (content context; verified no conflicts on mac/windows/linux)
  • src-vite/src/components/Content.vue — H keydown handler toggles the setting
  • src-vite/src/stores/configStore.js — settings.grid.hoverInfoTooltip default (false, opt-in)
  • src-vite/src/views/Settings.vue — toggle in the Grid tab
  • src-vite/src/locales/*.json (18) — settings.grid.hover_info_tooltip label, translated
  • src-vite/tests/hoverInfoTooltip.test.mjs — new regression suite (9 tests)
  • src-vite/package.json — test:hover-info-tooltip script

No Rust changes.

Verification

  • pnpm test:hover-info-tooltip — 9/9 pass
  • All pre-existing test suites re-run — results identical to baseline
    (one pre-existing failure in test:startup, unrelated, fails on clean main too)
  • pnpm build — passes
  • Manual: cargo tauri dev, hover a thumbnail for ~0.5 s (tooltip below, flips near
    viewport bottom), H off/on (instant show while hovering), scroll (tooltip hides),
    dark mode (crisp text, clear border), Settings toggle

Open questions for review

  • Label translations done by the author; native-speaker review welcome
  • H as the hotkey (was free in the content context)
  • Consistency note: tooltip styling follows the existing InfoTooltip.vue pattern (opaque bg-base-100, no backdrop-filter, so text renders sharp), and the hotkey plugs into the existing shortcut system with a Settings-exposed default

@julyx10
julyx10 merged commit 857eca6 into julyx10:main Nov 30, 2026
4 checks passed
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.

[FEAT] thumbnail hover tooltip with basic file information

2 participants