feat: multi-annotation hover tooltip (#234)#254
Draft
Moomboh wants to merge 4 commits into
Draft
Conversation
e4a0bb2 to
d271e0f
Compare
Owner
|
Collaborator
Author
|
Addressed the three review items:
|
Lets users opt additional annotation features into the hover tooltip alongside the primary annotation that drives the legend. Dropdown UI: - Primary indicator dot on the currently selected annotation row. - (i) toggle on every other row that flips the annotation on/off in the hover tooltip. Hidden on the primary row (it is already shown). Hover tooltip: - Refactored TooltipView to carry an ordered blocks[] array. Each block carries its annotation key, display values, scores, evidence, and raw numeric value when applicable. The primary block renders first. Persistence: - New ?tooltip= URL param (comma-separated, deduped, primary stripped). - Dataset-scoped localStorage seeded on dataset load when the URL does not pin a value, then kept in sync with subsequent toggles. - Promoting an extra annotation to primary drops it from the extras. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Elias Kahl <contact@elias.works>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Swap (i) icon for open/closed-eye icons in annotation dropdown. - Rename "Raw value" → "Value" and render it non-bold in the tooltip. - Measure the actual tooltip height after render so multi-block tooltips no longer overflow the bottom of the plot viewport. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4d21dfa to
2546e9f
Compare
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.
Summary
Closes #234.
Lets users opt extra annotation features into the hover tooltip alongside the primary (legend-defining) annotation.
Dropdown UI (
protspace-annotation-select)titleprovides the help text ("Show in hover tooltip" / "Hide from hover tooltip").aria-pressedreflects state.tooltip-annotation-toggle(separate fromannotation-select); the row label still selects the primary.Hover tooltip
TooltipViewnow carries an orderedblocks[]array. EachAnnotationBlockhas its ownkey,displayValues,numericValue/numericType,scores,evidence.State + persistence
?tooltip=foo,barURL param (comma-separated). Parser dedupes, drops the primary, drops names not in the dataset, marks anything off for normalization on next URL write.protspace:tooltip-annotations:<hash>) seeded on dataset load when the URL does not pin a value; kept in sync afterwards via the existing view-change subscription.Test coverage
buildTooltipView.multi-annotation-tooltip.spec.ts(3 tests) covers the dropdown indicator/toggle, URL writes on toggle, and round-trip removal — all pass locally.818 + 73 + 243unit/component tests still pass.Test plan
aria-pressed+titleon (i) for a11y🤖 Generated with Claude Code