-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
ref(theme): remove backgroundSecondary
#106037
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
ref(theme): remove backgroundSecondary
#106037
Conversation
bdf76d2 to
38e726b
Compare
|
Waiting on #106127 to unblock the test failures |
In the course of #106037, I hit a fun exception in the `TeamSelector`. Previously, the style functions accessed `state.theme` from the `react-select` callback, casting it as Sentry's global theme because it also uses Emotion. In the test environment, `react-select` provided a theme object that didn't have Sentry's `tokens` property, causing `theme.tokens.background` to fail. In this PR, we've refactored the `TeamSelector` to have receive the theme from `useTheme()` hook instead of expecting Emotion to automatically merge `react-select`'s theme with ours.
38e726b to
88bb026
Compare
bfa8e4f to
4365288
Compare
4365288 to
adb74e2
Compare
JonasBa
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you for adding the :active state here 🥇
1fb0d1a to
ba9090b
Compare
| lineHeight: 12, | ||
| formatter: (value: number) => axisLabelFormatter(value, 'number', true), | ||
| textBorderColor: theme.backgroundSecondary, | ||
| textBorderColor: theme.tokens.border.secondary, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong token used: border instead of background
Medium Severity
The textBorderColor property was changed from theme.backgroundSecondary to theme.tokens.border.secondary, but backgroundSecondary was an alias for tokens.background.secondary. The correct replacement is theme.tokens.background.secondary. Using the wrong token will result in a different color being rendered for the chart axis label text border, which could affect readability depending on the theme's border vs background color values.
| &:hover { | ||
| background-color: ${p => p.theme.backgroundSecondary}; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Active state feedback removed from interactive button
Low Severity
The InsightCardButton component previously had an &:active { opacity: 0.8; } rule that provided visual feedback when clicked. This active state was removed entirely rather than being replaced with the interactive token pattern (tokens.interactive.transparent.neutral.background.active) used consistently elsewhere in this PR for similar interactive elements like autofixSolutionEventItem, autofixTimelineItem, and autofixInsightCard. This inconsistency removes click feedback from a button element that has role="button" and onClick.
Removes
backgroundSecondaryfrom our theme, closes DE-333Recommend reviewing by commit:
049ffe6 replaced simple cases with
background.secondary587e368 replaced gradients
4117747 replaces interactive usage with correct tokens
36bf26d removes
backgroundSecondaryfrom theme