Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tooltip to ObsBadge when observation reference index is shown #4573

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

toddburnside
Copy link
Contributor

No description provided.

@mergify mergify bot added the explore label Feb 20, 2025
Copy link
Contributor

@rpiaggio rpiaggio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

val identifierStr = obs.reference.fold(obs.id.show)(_.observationIndex.toString)
val identifier: VdomNode = obs.reference.fold(s"[${obs.id.show}]": VdomNode): ref =>
Tooltip.Fragment(content = s"${ref.label} (${obs.id})")(
<.span(s"[${ref.observationIndex.toString}]")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, there's a withTooltip extension.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is. But, Tooltip.Fragment was used elsewhere in this file, and I didn't have to find the extension. Also, doesn't withTooltip use the floatingui tooltip? It looks slightly different than the prime ones. Or, is there a withTooltip for prime tooltips also?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. I searched in Explore and found a withTooltip usage that uses prime. I can switch to that.

Copy link

bundlemon bot commented Feb 20, 2025

BundleMon

Files updated (1)
Status Path Size Limits
index-(hash).js
1.75MB (+348B +0.02%) -
Unchanged files (7)
Status Path Size Limits
exploreworkers-(hash).js
597.86KB -
index-(hash).css
66.22KB -
workbox-window.prod.es5-(hash).js
2.07KB -
agsworker-(hash).js
83B -
plotworker-(hash).js
83B -
catalogworker-(hash).js
81B -
itcworker-(hash).js
81B -

Total files change +348B +0.01%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@toddburnside toddburnside merged commit cc14a20 into main Feb 20, 2025
14 checks passed
@toddburnside toddburnside deleted the obs-badge-obs-reference-tooltip branch February 20, 2025 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants