mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[PR #5935] fix(ui): add missing tooltips to icon-only buttons #5427
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5427
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5935
Author: @nikhilmahato21
Created: 3/4/2026
Status: 🔄 Open
Base:
next← Head:fix/add-missing-tooltips-icon-buttons📝 Commits (10+)
01c6802fix(ui): add missing tooltips to icon-only buttons67fcf5cfix: improve v-tippy module for tippy wrapper bug0ef644fchore: add suble border for tippy3cc5fb9chore: revert the v-tippy attribute08345ccchore: addunmountedhook5da0f2fchore: update tippy arrow colour38294b9chore: guard against uninitialized tippy props in updated hook0b53e46chore: add binding gaurds24d55fcchore: extract duplicate code to functionadaadb0chore: add doc comment📊 Changes
5 files changed (+125 additions, -7 deletions)
View changed files
📝
packages/hoppscotch-common/assets/themes/tippy-themes.scss(+4 -4)📝
packages/hoppscotch-common/locales/en.json(+1 -0)📝
packages/hoppscotch-common/src/components/app/Header.vue(+2 -0)📝
packages/hoppscotch-common/src/components/graphql/Query.vue(+1 -1)📝
packages/hoppscotch-common/src/modules/tippy.ts(+117 -2)📄 Description
Closes #5915
Summary
v-tippydirective at the platform level to read tooltip content fromvnode.propsinstead ofel.getAttribute('title'), fixing all icon-only buttons inside<tippy>wrappers in one placeunmountedcleanup hook to prevent memory leaks when elements are removed viav-ifsetProps()calls when content hasn't changed to reduce unnecessary work on re-rendersRoot Cause
The original vue-tippy directive reads content via
el.getAttribute('title'), but tippy.js strips thetitleattribute during initialization. When a button is inside a<tippy>wrapper (used for popovers), the parent'suseTippy()strips the title before the child directive can read it — resulting in missing tooltips on ~45 instances across 32 files.Approach
Instead of patching each affected component individually, this overrides the
v-tippydirective intippy.tsto read fromvnode.props(which is immune to DOM attribute stripping). Zero consumer changes needed.❗ Problem
titleattribute instead ofv-tippy’scontent.https://github.com/user-attachments/assets/4fbb81a8-eb2a-4af7-9c15-ef8dfd41e415
Summary by cubic
Standardizes tooltips on icon-only buttons using
vue-tippyto improve accessibility and consistency. Fixes missing tooltips inside<tippy>wrappers and updates the tooltip theme with a subtle divider border and matching arrow color.Bug Fixes
v-tippy(registersvue-tippyastippy-original); reads content fromvnode.propswith DOM fallback, updates on re-render, skips redundantsetProps, adds guards, and destroys on unmount—restores tooltips inside<tippy>wrappers.app.downloads; ensured GraphQL Query action tooltip binds correctly.border-dividerborder and matching arrow fill across themes.Refactors
Written for commit a9f2308b745e0156fb209c486ed8d726437129b4. Summary will update on new commits.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.