-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Canvas: Improved tooltip #90162
Canvas: Improved tooltip #90162
Conversation
Great work on this!! I am wondering if we should also consider showing the timestamp (if relevant) in the tooltip as well as we have gotten this as a request before 🤔 could be a next step though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the ability to view timestamps with data now and also removed limitation of viewing tooltips only when element is attached to datalink(s)
Great job on this!
Screen.Recording.2024-07-09.at.2.51.29.PM.mov
<div className={style.wrapper}>{renderDataLinks()}</div> | ||
<VizTooltipHeader item={headerItem} isPinned={scene.tooltip.isOpen!} /> | ||
{element.data.text && <VizTooltipContent items={contentItems} isPinned={scene.tooltip.isOpen!} />} | ||
<VizTooltipFooter dataLinks={element.data?.links} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
standardized tooltips coming in strong here 💪
Let's hold off on merging this until we've discussed how we want to handle which elements display a tooltip (see this internal slack discussion) |
const canShowElementTooltip = !this.isEditingEnabled; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like if we go with more exclusive method for displaying tooltips
const canShowElementTooltip = !this.isEditingEnabled; | |
const isTooltipValid = (this.tooltip?.element?.data?.links?.length ?? 0) > 0 || this.tooltip?.element?.data?.field; | |
const canShowElementTooltip = !this.isEditingEnabled && isTooltipValid; |
Co-authored-by: nmarrs <[email protected]>
Before
After
Screen.Recording.2024-07-09.at.2.51.29.PM.mov
TODO:
Please check that: