-
Notifications
You must be signed in to change notification settings - Fork 221
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
chore: Add FormFieldGroup component and density example #2865
chore: Add FormFieldGroup component and density example #2865
Conversation
Workday/canvas-kit Run #7776
Run Properties:
|
Project |
Workday/canvas-kit
|
Branch Review |
mc-ff-example
|
Run status |
Passed #7776
|
Run duration | 03m 21s |
Commit |
4c2dc6dc7b ℹ️: Merge a11e36dd1c7c556b2bc54acc69455290d4b14c6a into 442af058736ce712c0033c941e71...
|
Committer | Manuel Carrera |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
14
|
Pending |
16
|
Skipped |
0
|
Passing |
854
|
View all changes introduced in this branch ↗︎ |
UI Coverage
21.79%
|
|
---|---|
Untested elements |
1768
|
Tested elements |
490
|
Accessibility
99.21%
|
|
---|---|
Failed rules |
5 critical
5 serious
0 moderate
2 minor
|
Failed elements |
228
|
modules/preview-react/form-field/stories/examples/AllFields.tsx
Outdated
Show resolved
Hide resolved
modules/preview-react/form-field/stories/examples/GroupedInputs.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Josh <[email protected]>
@@ -24,7 +24,7 @@ const radioGroupStencil = createStencil({ | |||
borderRadius: system.shape.x1, | |||
gap: system.space.x2, | |||
padding: `${px2rem(10)} ${system.space.x3} ${system.space.x2}`, | |||
margin: `${calc.negate(system.space.x1)} ${calc.negate(system.space.x3)}`, |
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.
Instead of using margin, we're using gap for spacing
Note: Accepted build: https://www.chromatic.com/build?appId=5d854c26ba934e0020f5e98a&number=9419 on chromatic. The visual difference in height it due to the removal of |
borderRadius: system.shape.x1, | ||
gap: system.space.x2, | ||
padding: `${px2rem(10)} ${system.space.x3} ${system.space.x2}`, | ||
margin: `0 ${calc.negate(system.space.x3)}`, |
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.
removed margin bottom/top, we should accomplish this with gap
@@ -39,7 +39,7 @@ const Container = styled('div')<Pick<RadioGroupProps, 'error' | 'grow' | 'theme' | |||
boxSizing: 'border-box', | |||
borderRadius: borderRadius.m, | |||
padding: `${space.xxxs} ${space.xs}`, | |||
margin: `-${space.xxxs} -${space.xs}`, | |||
margin: `0 -${space.xs}`, |
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.
using gap for spacing
@@ -148,7 +145,7 @@ export const SelectCard = createSubcomponent('div')({ | |||
); | |||
}); | |||
|
|||
export interface SelectProps extends Themeable, ExtractProps<typeof Combobox> {} |
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.
removal of themable
Co-authored-by: Josh <[email protected]>
Summary
Fixes: #2805, #2806, #2820, #2807
Release Category
Components
Release Note
We've added a new
FormFieldGroup
component to use when grouping inputs like checkboxes and radio inputs that need to be associated to one another. Its API matches theFormField
API where you haveerror
prop as well asid
isRequired
andorienation
.orientation
has been added back touseFormFieldModel
to better support sub component styling.Styles have been cleaned up to use
gap
for proper spacing between labels, inputs and hint text.Added a new
FormField.Field
component to ensure proper alignment between label and inputs regardless of orientation and hint text. Ensure to wrap your inputs and hint text in this component.Checklist
ready for review
has been added to PRFor the Reviewer
Where Should the Reviewer Start?
Areas for Feedback? (optional)
Testing Manually
Screenshots or GIFs (if applicable)
Thank You Gif (optional)