-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(issues): Add context tooltips for issue header status #92081
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
Changes from 1 commit
c198374
b739ef5
371c105
5495fff
f54ad18
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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12,11 +12,12 @@ import ErrorBoundary from 'sentry/components/errorBoundary'; | |||||||||||||||
import EventMessage from 'sentry/components/events/eventMessage'; | ||||||||||||||||
import {getBadgeProperties} from 'sentry/components/group/inboxBadges/statusBadge'; | ||||||||||||||||
import UnhandledTag from 'sentry/components/group/inboxBadges/unhandledTag'; | ||||||||||||||||
import ExternalLink from 'sentry/components/links/externalLink'; | ||||||||||||||||
import Link from 'sentry/components/links/link'; | ||||||||||||||||
import {TourElement} from 'sentry/components/tours/components'; | ||||||||||||||||
import {MAX_PICKABLE_DAYS} from 'sentry/constants'; | ||||||||||||||||
import {IconInfo} from 'sentry/icons'; | ||||||||||||||||
import {t} from 'sentry/locale'; | ||||||||||||||||
import {t, tct} from 'sentry/locale'; | ||||||||||||||||
import HookStore from 'sentry/stores/hookStore'; | ||||||||||||||||
import {space} from 'sentry/styles/space'; | ||||||||||||||||
import type {Event} from 'sentry/types/event'; | ||||||||||||||||
|
@@ -156,12 +157,19 @@ export default function StreamlinedGroupHeader({ | |||||||||||||||
</StatLink> | ||||||||||||||||
))} | ||||||||||||||||
</StatTitle> | ||||||||||||||||
<EventMessage | ||||||||||||||||
data={group} | ||||||||||||||||
level={group.level} | ||||||||||||||||
message={secondaryTitle} | ||||||||||||||||
type={group.type} | ||||||||||||||||
/> | ||||||||||||||||
<Tooltip | ||||||||||||||||
title={t( | ||||||||||||||||
'The main message summarizing the event. Typically the error message or log string that triggered this issue.' | ||||||||||||||||
)} | ||||||||||||||||
isHoverable | ||||||||||||||||
> | ||||||||||||||||
<EventMessage | ||||||||||||||||
data={group} | ||||||||||||||||
level={group.level} | ||||||||||||||||
message={secondaryTitle} | ||||||||||||||||
type={group.type} | ||||||||||||||||
/> | ||||||||||||||||
</Tooltip> | ||||||||||||||||
{issueTypeConfig.eventAndUserCounts.enabled && ( | ||||||||||||||||
<Fragment> | ||||||||||||||||
<StatCount value={eventCount} aria-label={t('Event count')} /> | ||||||||||||||||
|
@@ -178,15 +186,34 @@ export default function StreamlinedGroupHeader({ | |||||||||||||||
{statusProps?.status ? ( | ||||||||||||||||
<Fragment> | ||||||||||||||||
<Tooltip title={statusProps?.tooltip}> | ||||||||||||||||
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. double tooltips 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. ah i did not notice this. when does status show a from this? 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. looks like here sentry/static/app/components/group/inboxBadges/statusBadge.tsx Lines 51 to 57 in 4525724
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. you could add your tooltips there or fallback to a default tooltip or something |
||||||||||||||||
<Subtext>{statusProps?.status}</Subtext> | ||||||||||||||||
<Subtext> | ||||||||||||||||
<Tooltip | ||||||||||||||||
isHoverable | ||||||||||||||||
title={tct('The status of the issue. [link:Learn more]', { | ||||||||||||||||
link: ( | ||||||||||||||||
<ExternalLink href="https://docs.sentry.io/product/issues/states-triage/" /> | ||||||||||||||||
), | ||||||||||||||||
})} | ||||||||||||||||
> | ||||||||||||||||
{statusProps?.status} | ||||||||||||||||
</Tooltip> | ||||||||||||||||
</Subtext> | ||||||||||||||||
</Tooltip> | ||||||||||||||||
</Fragment> | ||||||||||||||||
) : null} | ||||||||||||||||
{subtitle && ( | ||||||||||||||||
<Fragment> | ||||||||||||||||
<Divider /> | ||||||||||||||||
<Subtitle title={subtitle} isHoverable showOnlyOnOverflow delay={1000}> | ||||||||||||||||
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. subtitle here is also a tooltip 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. 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. how should we handle this then? render the info tooltip on these only if the overflow tooltip isn't showing? |
||||||||||||||||
<Subtext>{subtitle}</Subtext> | ||||||||||||||||
<Subtext> | ||||||||||||||||
<Tooltip | ||||||||||||||||
title={ | ||||||||||||||||
'Some extra context (function, route, query, etc.) to help you spot where the error happened.' | ||||||||||||||||
} | ||||||||||||||||
> | ||||||||||||||||
{subtitle} | ||||||||||||||||
</Tooltip> | ||||||||||||||||
</Subtext> | ||||||||||||||||
</Subtitle> | ||||||||||||||||
</Fragment> | ||||||||||||||||
)} | ||||||||||||||||
|
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.
use skipWrapper where possible which basically just doesn't render an extra span. If you're wrapping a div or an existing span you don't need another span.