Skip to content

Commit

Permalink
fix(dashboards): Add padding around big number actions in Project Det…
Browse files Browse the repository at this point in the history
…ails (#79993)

Fixes a regression introduced in
#79676. Adds a container around
widget actions.
  • Loading branch information
gggritso authored Oct 30, 2024
1 parent 17fffdf commit 1587e29
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styled from '@emotion/styled';

import {space} from 'sentry/styles/space';

export const ActionWrapper = styled('div')`
padding: ${space(2)};
`;
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {getTermHelp, PerformanceTerm} from 'sentry/views/performance/data';

import MissingPerformanceButtons from '../missingFeatureButtons/missingPerformanceButtons';

import {ActionWrapper} from './actionWrapper';

type Props = {
isProjectStabilized: boolean;
organization: Organization;
Expand Down Expand Up @@ -114,7 +116,9 @@ function ProjectApdexScoreCard(props: Props) {
if (!hasTransactions || !organization.features.includes('performance-view')) {
return (
<WidgetFrame title={cardTitle} description={cardHelp}>
<MissingPerformanceButtons organization={organization} />
<ActionWrapper>
<MissingPerformanceButtons organization={organization} />
</ActionWrapper>
</WidgetFrame>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {

import MissingReleasesButtons from '../missingFeatureButtons/missingReleasesButtons';

import {ActionWrapper} from './actionWrapper';

type Props = {
field:
| SessionFieldWithOperation.CRASH_FREE_RATE_SESSIONS
Expand Down Expand Up @@ -135,11 +137,13 @@ function ProjectStabilityScoreCard(props: Props) {
if (hasSessions === false) {
return (
<WidgetFrame title={cardTitle} description={cardHelp}>
<MissingReleasesButtons
organization={organization}
health
platform={props.project?.platform}
/>
<ActionWrapper>
<MissingReleasesButtons
organization={organization}
health
platform={props.project?.platform}
/>
</ActionWrapper>
</WidgetFrame>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {WidgetFrame} from 'sentry/views/dashboards/widgets/common/widgetFrame';

import MissingReleasesButtons from '../missingFeatureButtons/missingReleasesButtons';

import {ActionWrapper} from './actionWrapper';

const API_LIMIT = 1000;

type Release = {date: string; version: string};
Expand Down Expand Up @@ -147,7 +149,9 @@ function ProjectVelocityScoreCard(props: Props) {
if (!isLoading && noReleaseEver) {
return (
<WidgetFrame title={cardTitle} description={cardHelp}>
<MissingReleasesButtons organization={organization} />
<ActionWrapper>
<MissingReleasesButtons organization={organization} />
</ActionWrapper>
</WidgetFrame>
);
}
Expand Down

0 comments on commit 1587e29

Please sign in to comment.