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

Update colors for charts with dynamic values #3374

Closed
evwilkin opened this issue Jan 23, 2023 · 1 comment
Closed

Update colors for charts with dynamic values #3374

evwilkin opened this issue Jan 23, 2023 · 1 comment

Comments

@evwilkin
Copy link
Member

evwilkin commented Jan 23, 2023

Per comment in #3361, we can update the colors for charts page to avoid so many hard-coded values as mentioned below:

FWIW, another way to get the values on this page would be to import the react token into the page - the token stores the token name (eg, --pf-chart-color-black-100), value (#f0f0f0), and the full var for use in a CSS style (var(--pf-chart-color-black-100), but you wouldn't use that here).

Then if the value ever changes in the CSS, this page will automatically reflect the new value. You would just import the tokens for each chart color at the top of the file, then instead of typing the var name and value manually, just reference the token_name.name for the var and token_name.value for the hex value.

The only difference I see in the output is that the hex values from the CSS are lower case, but if they need to be upper case, you can use .toUpperCase() on the values, like chart_color_blue_100.value.toUpperCase(), for example.

@github-project-automation github-project-automation bot moved this to Assigned but not started in PatternFly Issues Jan 23, 2023
@edonehoo edonehoo added the Groom label Sep 12, 2024
@kmcfaul kmcfaul removed the Feature label Oct 25, 2024
@edonehoo edonehoo removed the Groom label Nov 1, 2024
@edonehoo edonehoo moved this from Not started to Needs triage in PatternFly Issues Nov 1, 2024
@edonehoo
Copy link
Collaborator

edonehoo commented Dec 10, 2024

Closing: it looks like values are no longer hard coded on this page. However, this page needs some post-v6 updates, so here's a follow-up issue: #4412

@github-project-automation github-project-automation bot moved this from Needs triage to Done in PatternFly Issues Dec 10, 2024
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

No branches or pull requests

4 participants