fix(tooltip): dismiss a preview whose row is gone - #157
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From a screenshot of a preview stranded over the timeline, describing a group that was not in that view.
The tooltip is positioned from a single anchor element kept in document.body, not from the row that triggered it, so nothing about that row reaching the end of its life reaches the tooltip. Hover a card, switch view: the card unmounts without ever sending mouseleave, and the preview hangs over whatever comes next until something unrelated happens to dismiss it. TableView and GraphView escape this because they unmount on a view change and their onUnmounted cleanup fires; App owns the instance used by cards and the timeline and never unmounts, so nothing cleaned up after it.
watch(viewMode, ...)existed already but only loaded the trash.Added the exits that do not depend on the trigger still being there:
Four tests in useNodeTooltip.test.js, red first, including that a locked preview is dismissed too - a locked one survives mouseleave by design, so it is the one that would stay longest - and that the listeners come off on cleanup rather than leaking per instance.
2241 unit tests and 30 e2e pass.