-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Client diversity piechart update #15251
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
base: dev
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Deploy is failing, at first, I thought it was a lint error, so I fixed that with |
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.
@LifeofDan-EL left a comment about the issue we have.
On the other hand, there are a few files in this PR that shouldn't be modified/added/deleted like yarn.lock
, .env.example
, and some yarn related ones that are not necessary. Can help you clean them up once we have a working preview.
@@ -5,6 +5,27 @@ lang: en | |||
sidebarDepth: 2 | |||
--- | |||
|
|||
import { PieChart } from "@/components/PieChart" |
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.
This import is redundant now that we are injecting the component in the MdComponents file.
Also, next-mdx-remote
(the mdx compiler that we use) doesn't support imports or exports, so we need to do something different to pass the below data to the component.
I think the easiest would be to pass the data array inline like this:
<PieChart data={[ { name: "Geth", value: 43 }, ... ]} title="Execution Clients" />
To clarify more, you can't use variables like executionData
without exporting them in mdx. But since imports/exports are not supported, we can't use them either.
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.
Thanks @pettinarip for the clarification, it was an oversight pushing the yarn file. Thanks again.
9549a39
to
99615fa
Compare
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.
@LifeofDan-EL good job. The implementation looks good and is functional. Left a comment about the styles to try to align it with our current design system.
* Color palette for blue shades, ordered from deep blue (largest share) to light blue (smallest share). | ||
* Ensure your data is sorted from largest to smallest for this to work as intended. | ||
*/ | ||
const COLORS = [ |
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.
There are a few issues with these colors:
- there is not enough contrast in dark mode
- these are not part of our current color palette
This is the current colors that we have https://dev--63b7ea99632763723c7f4d6b.chromatic.com/?path=/story/design-system-colors--primitives
@konopkja what do you think?
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.
Yeah, I looked at the preview after deployment and I agree there isn't enough contrast. Let me use values from the colour palette.
.yarn/install-state.gz
Outdated
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.
This file is not needed
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.
Resolved.
.yarnrc.yml
Outdated
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.
This file is not needed
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.
Resolved.
lets use accent colors here |
here is the list of accent colors in our tw config |
The latest build currently has the accent colour and I tweaked the legend a bit. What's left is to work on the responsiveness. Once that is done, then I can update the content too, to reflect the new values. |
Description
This PR is to create a new piechart that changes depending on the values, which is to be used to update the client diversity part of the website.
#15099
Preview: https://deploy-preview-15251--ethereumorg.netlify.app/en/developers/docs/nodes-and-clients/client-diversity/