Browse Source

fix(issues): Remove suspect commit padding (#66024)

Scott Cooper 1 year ago
parent
commit
bfb673515c

+ 3 - 11
static/app/components/events/suspectCommits.tsx

@@ -3,7 +3,7 @@ import styled from '@emotion/styled';
 import uniqBy from 'lodash/uniqBy';
 
 import type {CommitRowProps} from 'sentry/components/commitRow';
-import {DataSection, SuspectCommitHeader} from 'sentry/components/events/styles';
+import {SuspectCommitHeader} from 'sentry/components/events/styles';
 import Panel from 'sentry/components/panels/panel';
 import {IconAdd, IconSubtract} from 'sentry/icons';
 import {t, tn} from 'sentry/locale';
@@ -79,7 +79,7 @@ export function SuspectCommits({group, eventId, project, commitRow: CommitRow}:
   const commitHeading = tn('Suspect Commit', 'Suspect Commits (%s)', commits.length);
 
   return (
-    <StyledDataSection>
+    <div>
       <SuspectCommitHeader>
         <h3 data-test-id="suspect-commit">{commitHeading}</h3>
         {commits.length > 1 && (
@@ -109,18 +109,10 @@ export function SuspectCommits({group, eventId, project, commitRow: CommitRow}:
           />
         ))}
       </StyledPanel>
-    </StyledDataSection>
+    </div>
   );
 }
 
-const StyledDataSection = styled(DataSection)`
-  padding: ${space(0.5)} ${space(2)};
-
-  @media (min-width: ${p => p.theme.breakpoints.medium}) {
-    padding: ${space(1)} ${space(4)};
-  }
-`;
-
 export const StyledPanel = styled(Panel)`
   margin: 0;
 `;

+ 1 - 5
static/app/views/discover/table/quickContext/issueContext.tsx

@@ -4,7 +4,7 @@ import styled from '@emotion/styled';
 import ActorAvatar from 'sentry/components/avatar/actorAvatar';
 import Count from 'sentry/components/count';
 import {QuickContextCommitRow} from 'sentry/components/discover/quickContextCommitRow';
-import {DataSection, SuspectCommitHeader} from 'sentry/components/events/styles';
+import {SuspectCommitHeader} from 'sentry/components/events/styles';
 import {StyledPanel, SuspectCommits} from 'sentry/components/events/suspectCommits';
 import {getAssignedToDisplayName} from 'sentry/components/group/assignedTo';
 import Panel from 'sentry/components/panels/panel';
@@ -191,10 +191,6 @@ const SuspectCommitsContainer = styled(ContextContainer)`
     box-shadow: none;
   }
 
-  ${DataSection} {
-    padding: 0;
-  }
-
   ${SuspectCommitHeader} {
     margin: ${space(2)} 0 ${space(0.75)};
   }

+ 16 - 6
static/app/views/issueDetails/groupEventDetails/groupEventDetailsContent.tsx

@@ -103,12 +103,14 @@ function DefaultGroupEventDetailsContent({
       {hasActionableItems && (
         <ActionableItems event={event} project={project} isShare={false} />
       )}
-      <SuspectCommits
-        project={project}
-        eventId={event.id}
-        group={group}
-        commitRow={CommitRow}
-      />
+      <StyledDataSection>
+        <SuspectCommits
+          project={project}
+          eventId={event.id}
+          group={group}
+          commitRow={CommitRow}
+        />
+      </StyledDataSection>
       {event.userReport && (
         <EventDataSection title="User Feedback" type="user-feedback">
           <EventUserFeedback
@@ -293,4 +295,12 @@ const NotFoundMessage = styled('div')`
   padding: ${space(2)} ${space(4)};
 `;
 
+const StyledDataSection = styled(DataSection)`
+  padding: ${space(0.5)} ${space(2)};
+
+  @media (min-width: ${p => p.theme.breakpoints.medium}) {
+    padding: ${space(1)} ${space(4)};
+  }
+`;
+
 export default GroupEventDetailsContent;