Skip to content
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

fix: Use a proper dark theme for the activity graph #8865

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

thomasheartman
Copy link
Contributor

@thomasheartman thomasheartman commented Nov 27, 2024

This PR adds a proper dark theme for the activity graph. We previously used the exact same theme for both light and dark modes.

Before:
image

After (different chart):
image

I'm also passing in the theme explicitly as the colorScheme property. Without that prop, the graph uses your system color scheme (according to the docs), which may not be the same as your Unleash theme color scheme.

A side effect of this, however, is that we're now getting small borders on the light theme dots. I haven't found a prop in the docs to control this, but I kinda like them.

Before:
image

After (different chart):
image

Copy link

vercel bot commented Nov 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2024 10:05am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Nov 27, 2024 10:05am

Copy link
Contributor

github-actions bot commented Nov 27, 2024

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Files

Copy link
Contributor

@sjaanus sjaanus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not like the borders, because it draws attention to the empty cells, while previously they faded into background and the dark dots had more focus.

Can we try to fix it one more time?

@thomasheartman
Copy link
Contributor Author

@sjaanus I mean, sure. We can reach into the svg and remove all the rect strokes. It feels kinda hacky, but there doesn't seem to be a different way around it (at least not that I can find in the docs, but please tell me I'm wrong).

That'd look like this for dark mode:
image

And this for light mode:
image

In reality, at current the stroke for light mode exists, but it is white and at .04 opacity. In other words, it's invisible in light mode. So if we just say the stroke's always invisible, then that should work fine.

Copy link
Contributor

@sjaanus sjaanus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now.

@thomasheartman thomasheartman merged commit 41fb95d into main Nov 27, 2024
11 checks passed
@thomasheartman thomasheartman deleted the 1-3161/adjust-activity-graph-colors branch November 27, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants