fix: #4997 theme icon tooltips and delay hover hints by Jocs · Pull Request #5788 · marktext/marktext · GitHub
Skip to content

fix: #4997 theme icon tooltips and delay hover hints - #5788

Merged
Jocs merged 1 commit into
developfrom
fix/themed-icon-tooltips
Oct 18, 2026
Merged

Jocs merged 1 commit into
developfrom
fix/themed-icon-tooltips

Conversation

@Jocs

@Jocs Jocs commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Related: #4997. Follow-up to #5739 and the review comment.

Summary

Icon tooltips added in #5739 always used Element Plus's default dark appearance and opened after only 300ms. They now follow the active MarkText theme and wait longer before appearing when the pointer passes over a control.

  • Use the theme's floating background, border and shadow. Strengthen the theme's title text toward black in light themes and white in dark themes so small labels remain readable; rendered contrast across all 33 bundled themes is at least 4.83:1.
  • Use compact padding and an outline without an arrow, inspired by VS Code's workbench hovers.
  • Match VS Code's workbench hover defaults: 1500ms on macOS, 500ms on Windows/Linux. Layout reference: hoverWidget.css.

The existing Enter/Space handling, Escape dismissal and accessible names are preserved.

Type of change

  • Bug fix (non-breaking, fixes an issue)
  • New feature (non-breaking, adds functionality)
  • Breaking change (causes existing functionality to change)
  • Documentation update

Test plan

  • New E2E coverage for brief hover cancellation, live theme changes and the absence of an arrow. Keyboard-only focus is checked beyond the new hover delay.
  • macOS Electron verification: 17 E2E cases passed; one Windows-only window-controls case skipped.
  • Related unit tests: 8 passed.
  • pnpm run build:unpack, pnpm run typecheck, pnpm run lint (no errors; existing warnings).
  • Additional rendered contrast check across all 33 bundled themes.

Screenshots

Light Dark
Light theme tooltip Dark theme tooltip

Notes for reviewers

The styling is limited to IconTooltip; it does not restyle other Element Plus popovers. The popper is teleported to body, so its class is styled globally within the component.


By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@github-actions

Copy link
Copy Markdown
Contributor

Build artifacts for PR #5788:

Run: https://github.com/marktext/marktext/actions/runs/39140216691

Artifact Size Link
marktext-macos-arm64 300.3 MB Download
marktext-windows-arm64 291.0 MB Download
marktext-macos-x64 313.6 MB Download
marktext-windows-x64 299.2 MB Download
marktext-linux-x64 667.5 MB Download
marktext-linux-arm64 522.4 MB Download

@Jocs
Jocs merged commit f0cf714 into develop Oct 18, 2026
13 checks passed
@Jocs
Jocs deleted the fix/themed-icon-tooltips branch October 18, 2026 15:39
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