Skip to content

fix: resolve inconsistent tooltip display after drag and rapid hover#3907

Draft
akshay-gupta7 wants to merge 1 commit into
mainfrom
akshay/fix-cursor-issue
Draft

fix: resolve inconsistent tooltip display after drag and rapid hover#3907
akshay-gupta7 wants to merge 1 commit into
mainfrom
akshay/fix-cursor-issue

Conversation

@akshay-gupta7

@akshay-gupta7 akshay-gupta7 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Address three interacting issues in the tooltip stack:

  1. DraggableWrapper: Synthesize pointerenter event after dragend to restore hover state, since the browser doesn't automatically re-fire it after drag.

  2. TokenTooltip: Keep tooltip mounted (pass empty div instead of empty string) when edit form is open to prevent remount issues where pointerenter doesn't fire on already-hovered elements.

  3. Tooltip.Provider: Set skipDelayDuration={0} to prevent the default 300ms delay from overwhelming rapid hover transitions between tokens.

Fixes: drag interactions breaking tooltips, rapid hover inconsistency, edit form closing not restoring tooltips.

Why does this PR exist?

Closes #3891

What does this pull request do?

Testing this change

Additional Notes (if any)

Address three interacting issues in the tooltip stack:

1. DraggableWrapper: Synthesize pointerenter event after dragend to restore
   hover state, since the browser doesn't automatically re-fire it after drag.

2. TokenTooltip: Keep tooltip mounted (pass empty div instead of empty string)
   when edit form is open to prevent remount issues where pointerenter doesn't
   fire on already-hovered elements.

3. Tooltip.Provider: Set skipDelayDuration={0} to prevent the default 300ms
   delay from overwhelming rapid hover transitions between tokens.

Fixes: drag interactions breaking tooltips, rapid hover inconsistency, edit
form closing not restoring tooltips.
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7f8e026

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

⤵️ 📦 ✨ The artifact was successfully created! Want to test it? Download it here 👀 🎁

@github-actions

Copy link
Copy Markdown
Contributor

Commit SHA:3ec9c55d259152923eedb3f79b9071ac891eb103

Test coverage results 🧪

Code coverage diff between base branch:main and head branch: akshay/fix-cursor-issue 
Status File % Stmts % Branch % Funcs % Lines
🔴 total 59.63 (-0.01) 51.28 (-0.01) 57.98 (0) 60.12 (-0.01)
🔴 packages/tokens-studio-for-figma/src/app/components/TokenButton/DraggableWrapper.tsx 34.78 (-3.31) 10.52 (-1.24) 27.27 (0) 37.5 (-4.16)

@github-actions

Copy link
Copy Markdown
Contributor

Commit SHA:3ec9c55d259152923eedb3f79b9071ac891eb103
Current PR reduces the test coverage percentage by 1 for some tests

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

8 file(s) scanned · 0 findings

All changes are UI rendering logic (tooltip display, drag event handling, synthetic pointer events, whitespace cleanup, test formatting). No new data processing, no external calls, no access control changes, no new packages, no credentials.

ℹ️ This check is informational.
🛡️ Hyma Compliance Check · automated

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

Files changed in this PR were reviewed against the compliance taxonomy (ROPA, Subprocessor, Access Control, AI Provider Routing, Secrets/Credentials, Policy Gap). No findings were identified.

🛡️ Hyma Compliance Check · automated

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

9 file(s) scanned · 0 findings

ℹ️ This check is informational.
🛡️ Hyma Compliance Check · automated

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

Files scanned · 0 findings

No new external calls, personal data processing changes, or authentication/authorization modifications detected. No compliance action required.

ℹ️ This check is informational.
🛡️ Hyma Compliance Check · automated

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

9 file(s) scanned · 0 findings

ℹ️ This check is informational.
🛡️ Hyma Compliance Check · automated

@anathaniel-TS

Copy link
Copy Markdown

🛡️ Hyma Compliance Check

No compliance-relevant changes detected

4 file(s) scanned · 0 findings

ℹ️ This check is informational.
🛡️ Hyma Compliance Check · automated

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.

Tooltips inconsistent behavior when interacting ( hovering, editing or dragging )

2 participants