Repository navigation
feat: add hover info tooltip on thumbnails with H hotkey (#441) - #605
Merged
Merged
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.
Description
Fixes #441
Screenshots
441-dark.mp4
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:
The tooltip is optional and can be toggled:
Hhotkey while browsing the gallery (default: disabled — opt-in)Behavior details:
pointerleave), or when the feature is disabled.Hwhile hovering shows the tooltip on the current photo immediately (no dwell wait).--hover-info-duration/--hover-info-start-scaleCSS variables at the bottom ofThumbnail.vue); no transform remains after the animation, so text renders as sharp as the rest of the UI (an earlierbackdrop-blur/transform version rendered softer in the webview).Files changed
src-vite/src/components/Thumbnail.vue— tooltip UI + hover/dwell/position/enter animation logicsrc-vite/src/common/shortcuts.ts— newview.hoverInfoTooltipshortcut, bound toH(content context; verified no conflicts on mac/windows/linux)src-vite/src/components/Content.vue—Hkeydown handler toggles the settingsrc-vite/src/stores/configStore.js—settings.grid.hoverInfoTooltipdefault (false, opt-in)src-vite/src/views/Settings.vue— toggle in the Grid tabsrc-vite/src/locales/*.json(18) —settings.grid.hover_info_tooltiplabel, translatedsrc-vite/tests/hoverInfoTooltip.test.mjs— new regression suite (9 tests)src-vite/package.json—test:hover-info-tooltipscriptNo Rust changes.
Verification
pnpm test:hover-info-tooltip— 9/9 pass(one pre-existing failure in
test:startup, unrelated, fails on clean main too)pnpm build— passescargo tauri dev, hover a thumbnail for ~0.5 s (tooltip below, flips nearviewport bottom),
Hoff/on (instant show while hovering), scroll (tooltip hides),dark mode (crisp text, clear border), Settings toggle
Open questions for review
Has the hotkey (was free in the content context)InfoTooltip.vuepattern (opaquebg-base-100, no backdrop-filter, so text renders sharp), and the hotkey plugs into the existing shortcut system with a Settings-exposed default