-
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(FormField): add boldLabel prop for InputPromo #1495
Conversation
WalkthroughThe pull request introduces a new Changes
Assessment against linked issues
Possibly related PRs
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 (1)
packages/react-components/src/components/FormField/FormField.stories.tsx (1)
105-109
: Add description to clarify specialized use caseConsider adding a description to the story explaining that boldLabel is specifically designed for use with InputPromo.
export const BoldLabelWithPromoInput: StoryFn<FormFieldProps> = () => ( <FormFieldComponent labelText="Username" boldLabel> <ExampleInputPromo /> </FormFieldComponent> ); +BoldLabelWithPromoInput.parameters = { + docs: { + description: { + story: 'This example demonstrates the boldLabel prop, which is specifically designed for use with InputPromo components.', + }, + }, +};
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/react-components/src/components/FormField/FormField.stories.tsx
(3 hunks)packages/react-components/src/components/FormField/FormField.tsx
(3 hunks)
🔇 Additional comments (6)
packages/react-components/src/components/FormField/FormField.stories.tsx (3)
5-5
: LGTM: Import statement is properly organized
26-30
: LGTM: Good practice excluding specialized prop from general controls
38-40
: LGTM: Example component follows established patternspackages/react-components/src/components/FormField/FormField.tsx (3)
26-29
: LGTM: Well-documented prop with clear usage instructions
66-66
: LGTM: Appropriate default value maintaining compatibility
133-133
: Add test coverage for boldLabel functionalityConsider adding a test case to verify that the Text component receives the correct bold prop value based on boldLabel.
Would you like me to help create a test case for this functionality?
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 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 (1)
packages/react-components/src/components/FormField/FormField.module.scss (1)
20-20
: Good use of design system spacing variable!Using
var(--spacing-1)
improves consistency and maintainability.Consider updating other fixed pixel values in the file (e.g.,
4px
,5px
) to use spacing variables for better consistency.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/react-components/src/components/FormField/FormField.module.scss
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: chromatic-deployment
- GitHub Check: build
Resolves: #1447
Description
This pull request includes changes to the
FormField
component and its associated stories to introduce a newboldLabel
property to be used mainly for theInputPromo
component.Storybook
https://feature-1447--613a8e945a5665003a05113b.chromatic.com
Checklist
Obligatory:
Summary by CodeRabbit
New Features
boldLabel
prop to theFormField
component for bold label rendering.Bug Fixes
Documentation
boldLabel
control.