-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: Split tooltip for adjacent traces in two #104150
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| import {ButtonBar} from '@sentry/scraps/button'; | ||
| import {ExternalLink} from '@sentry/scraps/link'; | ||
| import {Tooltip} from '@sentry/scraps/tooltip'; | ||
|
|
||
| import {tct} from 'sentry/locale'; | ||
| import type {TraceRootEventQueryResults} from 'sentry/views/performance/newTraceDetails/traceApi/useTraceRootEvent'; | ||
|
|
@@ -28,35 +27,46 @@ export function TraceLinksNavigation({ | |
| } | ||
|
|
||
| return ( | ||
| <Tooltip | ||
| position="top" | ||
| delay={400} | ||
| isHoverable | ||
| title={tct( | ||
| `Go to the previous or next trace of the same session. [link:Learn More]`, | ||
| { | ||
| link: ( | ||
| <ExternalLink href="https://docs.sentry.io/concepts/key-terms/tracing/trace-view/#previous-and-next-traces" /> | ||
| ), | ||
| } | ||
| )} | ||
| > | ||
| <div> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Is this
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great question. The There are two solutions:
I went for the first, since there is a
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hrrm, alrighty sounds all good to leave as is to me 👍 |
||
| <ButtonBar merged gap="0"> | ||
| <TraceLinkNavigationButton | ||
| direction="previous" | ||
| attributes={rootEventResults.data.attributes} | ||
| currentTraceStartTimestamp={ | ||
| new Date(rootEventResults.data.timestamp).getTime() / 1000 | ||
| } | ||
| tooltipProps={{ | ||
| position: 'top', | ||
| delay: 400, | ||
| isHoverable: true, | ||
| title: tct( | ||
| `Go to the previous trace of the same session. [link:Learn More]`, | ||
| { | ||
| link: ( | ||
| <ExternalLink href="https://docs.sentry.io/concepts/key-terms/tracing/trace-view/#previous-and-next-traces" /> | ||
| ), | ||
| } | ||
| ), | ||
| }} | ||
| /> | ||
| <TraceLinkNavigationButton | ||
| direction="next" | ||
| attributes={rootEventResults.data.attributes} | ||
| currentTraceStartTimestamp={ | ||
| new Date(rootEventResults.data.timestamp).getTime() / 1000 | ||
| } | ||
| tooltipProps={{ | ||
| position: 'top', | ||
| delay: 400, | ||
| isHoverable: true, | ||
| title: tct(`Go to the next trace of the same session. [link:Learn More]`, { | ||
| link: ( | ||
| <ExternalLink href="https://docs.sentry.io/concepts/key-terms/tracing/trace-view/#previous-and-next-traces" /> | ||
| ), | ||
| }), | ||
| }} | ||
| /> | ||
| </ButtonBar> | ||
| </Tooltip> | ||
| </div> | ||
| ); | ||
| } | ||
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.
l (feel free to ignore): Should we inline the
toolTipPropshere and just adjustmessagebased ondirection? based from what I can tell the other props are the same in both cases.