Closed natalia-fitzgerald closed 1 year ago
Content updates:
Things to check:
@natalia-fitzgerald
Indicate which types we will include in the React component library.
Should each of these types be a separate story (demonstration of how to create it)? Or a separate component (a reusable implementation of this variant)? Or do we want to display them all in a single story similar to the way they are grouped in the CFPB DS?
Separate issue to change Story names to sentence case to other components.
@meissadia Below is a checklist of Design System checklist components. In the Design System they are grouped as types and then by states.
Type: Standard checkboxes States: Default, Focused, Selected, Hover, Disabled, Disabled selected
Type: Large target area checkboxes States: Default, Focused, Selected, Hover, Disabled
I'm not sure why the large target area checkbox in the Design System live code doesn't show a Disabled selected state. I think this is an error in the live text code block because I see code for it in the HTML. So I'm going to assume we should include it in our library. I added it to the list below.
I don't know where we should incorporate the checkbox with helper text or large target checkbox with helper text. Maybe we should create a Fieldset component instead (like what's in the Design System)? There's also something called a form group. There are a number of ways we can handle this so maybe we can use this component as an example and I can post the possible approaches we can take.
@meissadia In thinking about how we should organize and group content like checkboxes we should review/discuss the following specific examples. I will post more here as I review.
Guidelines: https://carbondesignsystem.com/components/checkbox/usage/ Storybook: https://react.carbondesignsystem.com/?path=/docs/components-checkbox--overview
Guidelines: https://design-system.service.gov.uk/components/checkboxes/ Storybook: https://govuk-react.github.io/govuk-react/?path=/story/checkbox--default
Guidelines: https://design.va.gov/components/form/checkbox Storybook: https://design.va.gov/storybook/?path=/docs/components-va-checkbox--default Storybook: https://design.va.gov/storybook/?path=/docs/components-va-checkbox-group--default
Guidelines: https://designsystem.digital.gov/components/checkbox/ Storybook: https://trussworks.github.io/react-uswds/?path=/story/components-checkbox--default-checkbox
Guidelines: https://cfpb.github.io/design-system/components/checkboxes Storybook: https://cfpb.github.io/design-stories/?path=/docs/components-checkbox--overview
I think I like the USWDS Checkbox best with the Carbon version a close runner-up, but maybe because they're most similar to our current implementation.
It makes sense to me to have the Checkbox w/ Helper text alongside the other Checkbox variations so that users looking for what is possible with the Checkbox component have a full overview, without having to visit multiple sections of the site.
We should also show the Checkbox usage in the Fieldset section as a demonstration of how to combine the Checkbox components into more common Form input patterns. We can also add links between the Fieldset/Checkbox pages to help users grasp the difference between the two.
@meissadia The USWDS Checkbox organization looks clear to me. I think it's fine to include the Checkbox with helper text in the Checkbox section. I am not aware of any actual use cases for that variation on our website but that's ok I guess.
It looks like the USWDS has a section called "Form components" and "Fieldsets" is a subsection of that. Would you want to organize things that way?
It looks like the USWDS has a section called "Form components" and "Fieldsets" is a subsection of that. Would you want to organize things that way?
@natalia-fitzgerald That works for me, plus it aligns with the way the CFPB DS organizes them: Components > Form Elements > Fieldsets
Sidenote: PR https://github.com/cfpb/design-system-react/pull/163 adds the Disabled selected
states mentioned above and fixes some styling issues with the focus/hover variants.
This component has been verified. I am closing this issue.
Checkbox
Tracking the design and development lifecycle of the checkbox component.
Related links:
Effort level: Large
(Levels: Small, Medium, Large, Extra Large)
Definition of ready
Checklist
Definition of ready questionnaire:
Identify the use case:
Identify the current state:
[X] The component already exist in the CFPB Design System
[ ] The component does not exist in the CFPB Design System but does exist on cf.gov
[ ] The component does not exist in the CFPB Design System or on cf.gov (but has an identified use case and is being tracked as part of the SBL or M2 work)
Indicate which types we will include in the React component library.
Types
[X] Standard checkboxes
[X] Large target area checkboxes
Definition of done
Component is fully functional
Accessibility checks have been completed
For existing components:
For new components:
Final sign off