-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat(UserGuide): replace elementStyles with elementClassName and add classname to the step #1593
Conversation
WalkthroughThe changes update the styling approach of the UserGuide components. The inline style property ( Changes
Possibly related PRs
Suggested labels
Suggested reviewers
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/react-components/src/components/UserGuide/UserGuide.module.scss (1)
51-51
: Floating Z-index Magic Number
The hardcoded value10001
guarantees the floating element appears above others. Consider introducing a SCSS variable for clarity and maintainability if this value needs to be reused or adjusted later.packages/react-components/src/components/UserGuide/UserGuide.mdx (1)
69-69
: Refine Styling Documentation Text
The sentence could be rephrased to avoid a split infinitive. Consider: "The component lets you style the highlighted element easily by passing a custom className."🧰 Tools
🪛 LanguageTool
[style] ~69-~69: Style-wise, it’s not ideal to insert an adverb (‘easily’) in the middle of an infinitive construction (‘to style’). Try moving the adverb to avoid split infinitives.
Context: ...ted element Component allows to easily style the highlighted element by passing a custom className. To do th...(SPLIT_INFINITIVE)
[style] ~69-~69: Consider a more expressive alternative.
Context: ...ement by passing a custom className. To do this, you need to provide the `UserGuid...(DO_ACHIEVE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/react-components/src/components/UserGuide/UserGuide.mdx
(3 hunks)packages/react-components/src/components/UserGuide/UserGuide.module.scss
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
packages/react-components/src/components/UserGuide/UserGuide.mdx
[style] ~69-~69: Style-wise, it’s not ideal to insert an adverb (‘easily’) in the middle of an infinitive construction (‘to style’). Try moving the adverb to avoid split infinitives.
Context: ...ted element Component allows to easily style the highlighted element by passing a custom className. To do th...
(SPLIT_INFINITIVE)
[style] ~69-~69: Consider a more expressive alternative.
Context: ...ement by passing a custom className. To do this, you need to provide the `UserGuid...
(DO_ACHIEVE)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: chromatic-deployment
🔇 Additional comments (5)
packages/react-components/src/components/UserGuide/UserGuide.module.scss (1)
29-29
: Overlay Z-index Update
Changing the overlay’s z-index to$stacking-context-level-modal
aligns it with modal stacking; ensure this fits overall stacking context expectations.packages/react-components/src/components/UserGuide/UserGuide.mdx (4)
42-42
: Prop Name Change Verified
TheelementClassName
prop now correctly replaces the old inline style prop. This update is in line with the intended design improvements.
74-74
: Consistent Code Snippet Styling
The code snippet now useselementClassName
as intended. Ensure all usage examples mirror this update across documentation.
90-91
: Quotation Mark Consistency in Example
The text forUserGuideStep
now uses straight quotes consistently. This improves readability and consistency in the documentation.
79-79
: Dynamic Class Management Explanation
The added note on state management for dynamic class names is clear. Verify that the language matches your design system terminology.
Resolves: # n/a
Description
The main updates involve:
elementStyles
prop withelementClassName
for better styling managementUserGuideStep
Storybook
https://feature-userguide-styles-fix--613a8e945a5665003a05113b.chromatic.com
Checklist
Obligatory:
Summary by CodeRabbit
New Features
UserGuideStep
component for additional styling customization.Style