Skip to content

Peek: Add setting to disable file metadata tooltip#46624

Open
Copilot wants to merge 2 commits intomainfrom
copilot/disable-tooltip-on-peek
Open

Peek: Add setting to disable file metadata tooltip#46624
Copilot wants to merge 2 commits intomainfrom
copilot/disable-tooltip-on-peek

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 29, 2026

Adds a "Show file preview tooltip" toggle to Peek's Behavior settings, letting users disable the metadata tooltip (filename, type, date modified, size) shown on hover over the preview.

Changes

  • PeekProperties — new ShowFilePreviewTooltip: BoolProperty (default true)
  • IUserSettings / UserSettings — expose the setting; updated by the existing file watcher on settings change
  • FilePreview — new ShowFilePreviewTooltip DependencyProperty; sets InfoTooltip = null when disabled (WinUI suppresses tooltip on null content); re-triggers UpdateTooltipAsync when re-enabled with a file loaded; infoTooltip field changed to string?
  • MainWindow.xaml.cs — reads setting from IUserSettings and pushes it to FilePreviewer.ShowFilePreviewTooltip on each Initialize() call, picking up the latest user preference each time Peek activates
  • PeekViewModelShowFilePreviewTooltip property for two-way Settings UI binding
  • PeekPage.xaml — toggle in the Behavior group, consistent with existing toggles
  • Resources.resw — localizable strings for header and description

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Setting defaults to true — no behavior change for existing users. The tooltip suppression works by setting InfoTooltip to null; WinUI's ToolTip does not open when Content is null, so no empty popup appears. The custom tooltip placement logic (top/bottom based on cursor Y) is unaffected.

Validation Steps Performed

  • Verified toggle appears in Peek Settings > Behavior
  • Toggling off suppresses the hover tooltip on image, video, and audio previews
  • Toggling back on restores tooltip with file metadata on next file load
  • Default true preserves existing behavior

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI linked an issue Mar 29, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add option to disable tooltip on Peek window Peek: Add setting to disable file metadata tooltip Mar 29, 2026
Copilot AI requested a review from niels9001 March 29, 2026 22:15
@niels9001 niels9001 marked this pull request as ready for review March 30, 2026 04:53
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.

Disable tooltip on Peek

2 participants