Skip to content

Conversation

@edonehoo
Copy link
Collaborator

@edonehoo edonehoo commented Dec 4, 2024

Closes #3682 and #4237

@patternfly-build
Copy link
Collaborator

patternfly-build commented Dec 4, 2024

@edonehoo edonehoo requested a review from mcoker December 4, 2024 18:29
Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Left some comments, but they're just nits - I think it's fine as it is, too 👍👍


The [PatternFly React charts package](https://www.npmjs.com/package/@patternfly/react-charts) uses default style values that align with our light theme. In order to support dark-themed charts, you must import the stylesheet that contains dark theme styles by adding the following line to the top of your file:

`import '@patternfly/patternfly/patternfly-charts.css';`
Copy link
Contributor

Choose a reason for hiding this comment

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

This LGTM but I'll say I'm not sure if we have standard verbiage for how to import an asset like that? Specifically these 2 points:

  • "adding the following line to the top of your file" - not sure if that's clear as to where it needs to go? I found this in the repo docs about how to add PF CSS to your react app - I'm assuming the charts CSS would be imported either in the same place or using similar language.
  • This implies users have the @patternfly/patternfly package installed, which isn't needed for a react app by default, so not sure if it's worth calling that out? If so it would be similar to the linked page above in the setup section with the npm install and yarn add commands.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

interesting points! I'll add a line for that first point similar to what you linked. For the second, wdyt about linking to https://www.patternfly.org/get-started/develop#develop-with-htmlcss?

edonehoo and others added 2 commits December 6, 2024 10:58
…resources/dark-theme-handbook.md

Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com>
Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

🤘🐸👍

@nicolethoen nicolethoen merged commit b2fcff3 into patternfly:main Dec 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update dark theme handbook with suggestions for swapping images between light/dark mode

4 participants