Skip to content

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

Merged
merged 5 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions static/app/components/group/inboxBadges/statusBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,37 @@ export function getBadgeProperties(
return {
tagType: 'highlight',
status: t('Resolved'),
tooltip: t('This issue was marked as fixed.'),
};
}
if (status === 'unresolved') {
if (substatus === GroupSubstatus.REGRESSED) {
return {
tagType: 'highlight',
status: t('Regressed'),
tooltip: t('This issue was resolved then occurred again.'),
};
}
if (substatus === GroupSubstatus.ESCALATING) {
return {
tagType: 'error',
status: t('Escalating'),
tooltip: t('This issue has exceeded its forecasted event volume.'),
Copy link
Member Author

Choose a reason for hiding this comment

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

this one could be improved i think.

Copy link
Member

Choose a reason for hiding this comment

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

I don't particularly like my phrasing here but maybe something along the lines of "This issue is occurring significantly more often it used to."

https://docs.sentry.io/product/issues/states-triage/escalating-issues/ says "Sentry defines an issue as Escalating when the number of events is significantly higher than the previous week." but there is also the caveat for issues <7d old

Copy link
Member Author

Choose a reason for hiding this comment

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

i like this a lot better!

};
}
if (substatus === GroupSubstatus.NEW) {
return {
tagType: 'warning',
status: t('New'),
tooltip: t('This issue first occurred in the last 7 days.'),
};
}
return {
tagType: 'default',
status: t('Ongoing'),
tooltip: t(
'This issue was created more than 7 days ago or has manually been marked as reviewed.'
),
};
}
if (status === 'ignored') {
Expand All @@ -50,10 +57,10 @@ export function getBadgeProperties(
status: t('Archived'),
tooltip:
substatus === GroupSubstatus.ARCHIVED_FOREVER
? t('Archived forever')
? t('Archived forever.')
: substatus === GroupSubstatus.ARCHIVED_UNTIL_ESCALATING
? t('Archived until escalating')
: t('Archived until condition met'),
? t('Archived until escalating.')
: t('Archived until condition met.'),
};
}
return undefined;
Expand Down
13 changes: 11 additions & 2 deletions static/app/views/issueDetails/streamline/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -177,7 +178,15 @@ export default function StreamlinedGroupHeader({
)}
{statusProps?.status ? (
<Fragment>
<Tooltip title={statusProps?.tooltip}>
<Tooltip
isHoverable
title={tct('[tooltip] [link:Learn more]', {
tooltip: statusProps?.tooltip ?? '',
link: (
<ExternalLink href="https://docs.sentry.io/product/issues/states-triage/" />
),
})}
>
<Subtext>{statusProps?.status}</Subtext>
</Tooltip>
</Fragment>
Expand Down
Loading