Skip to content

feat: make hover tooltip delay and search radius configurable#210

Open
ApurveKaranwal wants to merge 4 commits into
apple:mainfrom
ApurveKaranwal:fix/configurable-tooltip-hover
Open

feat: make hover tooltip delay and search radius configurable#210
ApurveKaranwal wants to merge 4 commits into
apple:mainfrom
ApurveKaranwal:fix/configurable-tooltip-hover

Conversation

@ApurveKaranwal

Copy link
Copy Markdown
Contributor

Resolves #177

Description

This PR addresses the intermittent hover tooltip behavior by exposing the internal tooltip and hit-detection constraints as configurable properties. The default values remain intact so this is fully backward compatible, but consumers can now override them for custom tooltip experiences (e.g., instant hover tooltips).

Changes Made

  • Added tooltipDelay, tooltipRecentThreshold, and hoverRadius optional properties to the EmbeddingViewConfig interface.
  • Updated the throttleTooltip utility to accept getter functions for delay and threshold timings, ensuring the reactive configuration state updates smoothly without needing to tear down the debouncer instance.
  • Threaded the hoverRadius configuration down to queryClosestPoint in mosaic_client.ts to dynamically scale the nearest-neighbor hit detection.
  • Added comprehensive unit tests in packages/viewer/test/utils.test.ts to verify the microtask and timer logic of throttleTooltip.

Testing

  • npm run check passes successfully.
  • Vitest suite in packages/viewer successfully passes (including 3 new timing-based unit tests for the updated tooltip debouncer logic).

@ApurveKaranwal

Copy link
Copy Markdown
Contributor Author

@domoritz please tell me how to fix this issue? i think so CI Builds are not able to pass.

@domoritz

domoritz commented Jun 9, 2026

Copy link
Copy Markdown
Member

You need to run the formatter. Read the error in https://github.com/apple/embedding-atlas/actions/runs/27203259746/job/80348187177#step:13:1

@ApurveKaranwal

Copy link
Copy Markdown
Contributor Author

@domoritz sir, please check now, all the CI Builds have passed now, do let me know if i need to change anything in the PR.

@domoritz domoritz requested a review from donghaoren June 11, 2026 14:01
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.

Allow configuring hover/tooltip delay and search radius

2 participants