Skip to content

Commit f6f233f

Browse files
authored
ref/scraps/removeChonkColors (#106166)
Removing the `chonk.*` group of tokens from the `lightColors` and `darkColors` theme object
1 parent 76455db commit f6f233f

File tree

7 files changed

+28
-28
lines changed

7 files changed

+28
-28
lines changed

static/app/components/core/badge/badge.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,33 +37,33 @@ function makeBadgeTheme(p: BadgeProps, theme: Theme): React.CSSProperties {
3737
// @TODO(jonasbadalic) these should use feature badge variants
3838
case 'alpha':
3939
return {
40-
color: theme.colors.black,
41-
background: theme.colors.chonk.pink400,
40+
color: theme.tokens.content.onVibrant.dark,
41+
background: theme.tokens.background.promotion.vibrant,
4242
};
4343
case 'beta':
4444
return {
45-
color: theme.colors.black,
46-
background: theme.colors.chonk.yellow400,
45+
color: theme.tokens.content.onVibrant.dark,
46+
background: theme.tokens.background.warning.vibrant,
4747
};
4848
case 'new':
4949
return {
50-
color: theme.colors.black,
51-
background: theme.colors.chonk.green400,
50+
color: theme.tokens.content.onVibrant.dark,
51+
background: theme.tokens.background.success.vibrant,
5252
};
5353
case 'experimental':
5454
return {
55-
color: theme.colors.gray500,
56-
background: theme.colors.gray100,
55+
color: theme.tokens.content.secondary,
56+
background: theme.tokens.background.transparent.neutral.muted,
5757
};
5858
case 'muted':
5959
return {
60-
color: theme.colors.gray500,
61-
background: theme.colors.gray100,
60+
color: theme.tokens.content.secondary,
61+
background: theme.tokens.background.transparent.neutral.muted,
6262
};
6363
case 'internal':
6464
return {
65-
color: theme.colors.gray500,
66-
background: theme.colors.gray100,
65+
color: theme.tokens.content.secondary,
66+
background: theme.tokens.background.transparent.neutral.muted,
6767
};
6868
// End feature badge variants
6969
// Highlight maps to info badge for now, but the highlight variant should be removed
@@ -76,22 +76,22 @@ function makeBadgeTheme(p: BadgeProps, theme: Theme): React.CSSProperties {
7676
case 'promotion':
7777
return {
7878
color: theme.tokens.content.promotion,
79-
background: theme.colors.pink100,
79+
background: theme.tokens.background.transparent.promotion.muted,
8080
};
8181
case 'danger':
8282
return {
8383
color: theme.tokens.content.danger,
84-
background: theme.colors.red100,
84+
background: theme.tokens.background.transparent.danger.muted,
8585
};
8686
case 'warning':
8787
return {
8888
color: theme.tokens.content.warning,
89-
background: theme.colors.yellow100,
89+
background: theme.tokens.background.transparent.warning.muted,
9090
};
9191
case 'success':
9292
return {
9393
color: theme.tokens.content.success,
94-
background: theme.colors.green100,
94+
background: theme.tokens.background.transparent.success.muted,
9595
};
9696
default:
9797
unreachable(p.variant);

static/app/components/list/utils.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ const numericStyle = (
4040
height: 24px;
4141
font-weight: ${theme.fontWeight.normal};
4242
font-size: ${theme.fontSize.sm};
43-
background-color: ${theme.colors.chonk.yellow400};
44-
color: ${theme.black};
43+
background-color: ${theme.tokens.background.warning.vibrant};
44+
color: ${theme.tokens.content.onVibrant.dark};
4545
`
4646
: css`
4747
top: 3px;

static/app/views/alerts/rules/metric/details/sidebar.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ function TriggerDescription({
130130

131131
function getColor(theme: Theme, type: 'critical' | 'warning' | 'success') {
132132
return type === 'critical'
133-
? theme.colors.chonk.red400
133+
? theme.tokens.background.danger.vibrant
134134
: type === 'warning'
135-
? theme.colors.chonk.yellow400
136-
: theme.colors.chonk.green400;
135+
? theme.tokens.background.warning.vibrant
136+
: theme.tokens.background.success.vibrant;
137137
}
138138
const StyledIconDiamond = styled(IconDiamond)<{type: 'critical' | 'warning' | 'success'}>`
139139
fill: ${p => getColor(p.theme, p.type)};

static/app/views/nav/sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,5 @@ const SuperuserBadge = styled('div')`
129129
z-index: ${p => p.theme.zIndex.initial};
130130
left: 0;
131131
width: ${PRIMARY_SIDEBAR_WIDTH}px;
132-
background: ${p => p.theme.colors.chonk.red400};
132+
background: ${p => p.theme.tokens.background.danger.vibrant};
133133
`;

static/app/views/onboarding/components/stepHeading.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const StepHeading = styled(
3333
justify-content: center;
3434
width: 30px;
3535
height: 30px;
36-
background-color: ${p => p.theme.colors.chonk.yellow400};
36+
background-color: ${p => p.theme.tokens.background.warning.vibrant};
3737
border-radius: 50%;
38-
color: ${p => p.theme.colors.black};
38+
color: ${p => p.theme.tokens.content.onVibrant.dark};
3939
font-size: 1rem;
4040
}
4141
`;

static/app/views/relocation/components/stepHeading.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ const StepHeading = styled((props: React.ComponentProps<typeof motion.h2>) => (
3131
justify-content: center;
3232
width: 30px;
3333
height: 30px;
34-
background-color: ${p => p.theme.colors.chonk.yellow400};
34+
background-color: ${p => p.theme.tokens.background.warning.vibrant};
3535
border-radius: 50%;
36-
color: ${p => p.theme.colors.black};
36+
color: ${p => p.theme.tokens.content.onVibrant.dark};
3737
font-size: 1rem;
3838
}
3939
`;

static/gsApp/components/superuser/superuserWarning.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ function SuperuserWarning({organization, className}: Props) {
103103
}
104104

105105
const StyledBadge = styled(Badge)`
106-
color: ${p => p.theme.white};
107-
background: ${p => p.theme.colors.chonk.red400};
106+
color: ${p => p.theme.tokens.content.onVibrant.light};
107+
background: ${p => p.theme.tokens.background.danger.vibrant};
108108
`;
109109

110110
const TooltipContent = styled('div')`

0 commit comments

Comments
 (0)