grommet / hpe-design-system

HPE Design System
48 stars 23 forks source link

Refactor inputs build in figma #3685

Open SeamusLeonardHPE opened 8 months ago

SeamusLeonardHPE commented 8 months ago

Follow on to https://github.com/grommet/hpe-design-system/issues/3675

"Architecturally, to provide consistency and reduce maintenance, can we build a FormField component which wraps a child input. The FormField provides the label, description, info/error messages, and validation states. Then the various inputs are only worried about the input's internals and doesn't have to worry about it's outside elements. If we don' have an existing issue for this refactoring, please create one."

Explore alternative ways to atomically refactor the numerous "input" components. Input components only contain placeholder, value, state, focus, validation

Options for the 'input container'

1 - Create a parent "input container" that hosts "slots" for our various inputs Cautious of performance for this approach, also would we need to create instances for each input type?

2- Create 2 components to stack alongside the input components

Considerations How would these approaches impact using nested components inside "multiselect" "checkbox group" "radio group" How would this impact "form field" variants, should that even be a core part of individual inputs

SeamusLeonardHPE commented 7 months ago

Open issues

Bugs https://github.com/grommet/hpe-design-system/issues/3741 Accessibility https://github.com/grommet/hpe-design-system/issues/3622 Dateinput https://github.com/grommet/hpe-design-system/issues/3736 Dateinput https://github.com/grommet/hpe-design-system/issues/3145

Research & refactor existing inputs to use a more atomic approach to their build. This will ensure better consistency & maintainability.

These changes will likley create breaking changes for product design teams so we need to factors a release strategy that may include versioning, batch release or trickle rollout

Consideration for masked inputs also

Exploratory work here https://www.figma.com/file/8EqTWkAB2JhQhR5Aiub4ZW/%233685-Input-refactor-experiments?type=design&node-id=0%3A1&mode=design&t=qil4Ljx5Y3qFz486-1

SeamusLeonardHPE commented 7 months ago

List of previous archive tickets that this ticket will assume responsibility for #3145 #3526

SeamusLeonardHPE commented 6 months ago

Request from Betty re CheckBoxGroup https://hpe.slack.com/archives/GPPLUK6LR/p1710873718202879

SeamusLeonardHPE commented 4 months ago

Moved to backlog as refactor will be postponed until tokens can be used.

CillianHPE commented 3 months ago

@SeamusLeonardHPE

Just going to add the "Blocked" label for this as well, until tokens are available.