docs(readme): add section for configuring css - #12616
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughREADME.md documents PatternFly styling configuration with ChangesStyling documentation
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
README.md (1)
89-89: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winName the conflicting import explicitly.
Replace the broad
PatternFly HTML/CSS librarywording with@patternfly/patternfly/patternfly.css. This makes the duplicate stylesheet fix actionable and matches the PR objective.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` at line 89, Update the README wording to explicitly identify `@patternfly/patternfly/patternfly.css` instead of referring broadly to the PatternFly HTML/CSS library, while preserving the guidance about avoiding duplicate stylesheets when using PatternFly React.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 82-89: Move the “Configure PatternFly styling” section from the
repository-root README.md into packages/react-core/README.md, preserving its CSS
import guidance and warning about duplicate stylesheets. Remove the section from
the root README so the package-specific documentation is the single source.
- Around line 85-87: Update the JavaScript code fence around the PatternFly
stylesheet import in README.md to use the js language identifier, changing the
opening fence from ``` to ```js while preserving the import and closing fence.
---
Nitpick comments:
In `@README.md`:
- Line 89: Update the README wording to explicitly identify
`@patternfly/patternfly/patternfly.css` instead of referring broadly to the
PatternFly HTML/CSS library, while preserving the guidance about avoiding
duplicate stylesheets when using PatternFly React.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| #### Configure PatternFly styling | ||
| PatternFly uses the [`@patternfly/react-styles` package](https://www.npmjs.com/package/@patternfly/react-styles) as a translation layer to reference the styles contained in the PatternFly HTML/CSS library. When developing with Patternfly React, include the following import at the base level of your application to pull in PatternFly's styling: | ||
|
|
||
| ``` | ||
| import '@patternfly/react-core/dist/styles/base.css'; | ||
| ``` | ||
|
|
||
| Importing css directly from the PatternFly HTML/CSS library while using PatternFly React may result in duplicated stylesheets in the browser as PatternFly React already pulls in styles internally via `@patternfly/react-styles`. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Place the guidance in packages/react-core/README.md.
The PR objective requires this section in the react-core package README. The changed file is the repository-root README.md. Add or move the section to packages/react-core/README.md so users of @patternfly/react-core can find the required CSS setup instructions with the package documentation.
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 85-85: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` around lines 82 - 89, Move the “Configure PatternFly styling”
section from the repository-root README.md into packages/react-core/README.md,
preserving its CSS import guidance and warning about duplicate stylesheets.
Remove the section from the root README so the package-specific documentation is
the single source.
| ``` | ||
| import '@patternfly/react-core/dist/styles/base.css'; | ||
| ``` |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Specify the JavaScript code fence.
Use ```js instead of ` ````. This resolves markdownlint MD040 and enables correct renderer behavior.
Proposed fix
-```
+```js
import '`@patternfly/react-core/dist/styles/base.css`';🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 85-85: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` around lines 85 - 87, Update the JavaScript code fence around the
PatternFly stylesheet import in README.md to use the js language identifier,
changing the opening fence from ``` to ```js while preserving the import and
closing fence.
Source: Linters/SAST tools
Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com>
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #12567
Summary by CodeRabbit