Browse Source

feat(escalating): Use resolved badge instead of strikethrough (#51158)

Scott Cooper 1 year ago
parent
commit
c733af4e4d

+ 5 - 1
static/app/components/eventOrGroupHeader.tsx

@@ -95,10 +95,14 @@ function EventOrGroupHeader({
   function getTitle() {
   function getTitle() {
     const {id, status} = data as Group;
     const {id, status} = data as Group;
     const {eventID, groupID} = data as Event;
     const {eventID, groupID} = data as Event;
+    const hasEscalatingIssues = organization.features.includes('escalating-issues');
 
 
     const commonEleProps = {
     const commonEleProps = {
       'data-test-id': status === 'resolved' ? 'resolved-issue' : null,
       'data-test-id': status === 'resolved' ? 'resolved-issue' : null,
-      style: status === 'resolved' ? {textDecoration: 'line-through'} : undefined,
+      style:
+        status === 'resolved' && !hasEscalatingIssues
+          ? {textDecoration: 'line-through'}
+          : undefined,
     };
     };
 
 
     if (isTombstone(data)) {
     if (isTombstone(data)) {

+ 4 - 0
static/app/components/group/inboxBadges/statusBadge.spec.tsx

@@ -41,4 +41,8 @@ describe('GroupStatusBadge', () => {
     );
     );
     expect(screen.getByText('Regressed')).toBeInTheDocument();
     expect(screen.getByText('Regressed')).toBeInTheDocument();
   });
   });
+  it('should display resolved', () => {
+    render(<GroupStatusBadge status={ResolutionStatus.RESOLVED} />);
+    expect(screen.getByText('Resolved')).toBeInTheDocument();
+  });
 });
 });

+ 7 - 1
static/app/components/group/inboxBadges/statusBadge.tsx

@@ -6,14 +6,20 @@ import {Group, GroupSubstatus} from 'sentry/types';
 
 
 interface SubstatusBadgeProps {
 interface SubstatusBadgeProps {
   status: Group['status'];
   status: Group['status'];
-  substatus: Group['substatus'];
   fontSize?: 'sm' | 'md';
   fontSize?: 'sm' | 'md';
+  substatus?: Group['substatus'];
 }
 }
 
 
 function getBadgeProperties(
 function getBadgeProperties(
   status: Group['status'],
   status: Group['status'],
   substatus: Group['substatus']
   substatus: Group['substatus']
 ): {status: string; tagType: keyof Theme['tag']; tooltip?: string} | undefined {
 ): {status: string; tagType: keyof Theme['tag']; tooltip?: string} | undefined {
+  if (status === 'resolved') {
+    return {
+      tagType: 'highlight',
+      status: t('Resolved'),
+    };
+  }
   if (status === 'unresolved') {
   if (status === 'unresolved') {
     if (substatus === GroupSubstatus.REGRESSED) {
     if (substatus === GroupSubstatus.REGRESSED) {
       return {
       return {