Skip to content

fix(ui): chart colors in stats usage page #93789

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

Merged
merged 9 commits into from
Jun 18, 2025

Conversation

TkDodo
Copy link
Contributor

@TkDodo TkDodo commented Jun 18, 2025

This PR:

  • removes the theme.outcome values, as we don’t want to have page specific things on the generic theme
    • this was also the reason why charting was wrong in chonk because we were always using the legacy colors, as theme.outcome wasn’t overwritten in the chonk theme, so it was still referencing the old colors.

For chonk, we are now simply creating a color palette without hard-coded colors, as discussed with @Jesse-Box.

before after
Screenshot 2025-06-18 at 09 43 59 Screenshot 2025-06-18 at 09 44 19
Screenshot 2025-06-18 at 09 44 06 Screenshot 2025-06-18 at 09 44 23

Note: I’ve additionally removed the hardcoded mapping for the reservedUsageChart, as the outcome colors now no longer exist on the theme. This does impact the current chart in the legacy theme, too:

before:

dark light
Screenshot 2025-06-18 at 09 49 24 Screenshot 2025-06-18 at 09 49 28

after:

dark light
Screenshot 2025-06-18 at 09 50 37 Screenshot 2025-06-18 at 09 50 44
Screenshot 2025-06-18 at 09 50 55 Screenshot 2025-06-18 at 09 50 50

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 18, 2025
@TkDodo TkDodo marked this pull request as ready for review June 18, 2025 08:18
@TkDodo TkDodo requested review from a team as code owners June 18, 2025 08:18
@TkDodo TkDodo requested a review from Jesse-Box June 18, 2025 08:18
@TkDodo TkDodo merged commit 2958ad9 into master Jun 18, 2025
48 checks passed
@TkDodo TkDodo deleted the tkdodo/fix/de-96-chart-colors-in-stats-usage-page branch June 18, 2025 08:30
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
This PR:

- removes the `theme.outcome` values, as we don’t want to have page
specific things on the generic theme
- this was also the reason why charting was wrong in chonk because we
were always using the legacy colors, as `theme.outcome` wasn’t
overwritten in the chonk theme, so it was still referencing the old
colors.

For `chonk`, we are now simply creating a color palette without
hard-coded colors, as discussed with @Jesse-Box.

| before | after |
|--------|--------|
| ![Screenshot 2025-06-18 at 09 43
59](https://github.com/user-attachments/assets/66316110-0c04-416d-833c-0b2aaadefea4)
| ![Screenshot 2025-06-18 at 09 44
19](https://github.com/user-attachments/assets/4dd39824-ac65-4da7-9154-f67b4258731f)
|
| ![Screenshot 2025-06-18 at 09 44
06](https://github.com/user-attachments/assets/98999893-17aa-4e14-bc0b-1d40bc9e9e76)
| ![Screenshot 2025-06-18 at 09 44
23](https://github.com/user-attachments/assets/2b1945e5-8b9b-4308-931c-776fb2af3a60)
|

Note: I’ve additionally removed the hardcoded mapping for the
`reservedUsageChart`, as the outcome colors now no longer exist on the
theme. This _does_ impact the current chart in the legacy theme, too:

before:

| dark | light |
|--------|--------|
| ![Screenshot 2025-06-18 at 09 49
24](https://github.com/user-attachments/assets/6e552e49-9734-439b-9f59-070264cbe5fa)
| ![Screenshot 2025-06-18 at 09 49
28](https://github.com/user-attachments/assets/5a9a4c30-d48c-4c44-b36c-212428b498c5)
|

after:

| dark |  light |
|--------|--------|
| ![Screenshot 2025-06-18 at 09 50
37](https://github.com/user-attachments/assets/b56f16d3-b77a-4596-bf80-885a48314856)
| ![Screenshot 2025-06-18 at 09 50
44](https://github.com/user-attachments/assets/b015b453-89e9-4ac2-ae3c-ed3d579126f9)
|
| ![Screenshot 2025-06-18 at 09 50
55](https://github.com/user-attachments/assets/2f92f03b-56e3-41b8-b4e7-6beb23640cb4)
| ![Screenshot 2025-06-18 at 09 50
50](https://github.com/user-attachments/assets/74958a3f-1bf7-4f7c-b5c5-0edcdaa1a098)
|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants