design-system icon indicating copy to clipboard operation
design-system copied to clipboard

[component]: Validation

Open schaertim opened this issue 1 year ago • 1 comments

It was decided that validation should be implemented separately and reused in all components requiring it. A dedicated token set has to be provided first.

### Tasks
- [ ] Add new token set for validation
- [ ] Implment validation styles (which should be reusable in all components requiring validation)

schaertim avatar Oct 03 '24 11:10 schaertim

@gfellerph add more information

gfellerph avatar Oct 04 '24 13:10 gfellerph

  • How should we handle the two different error message variants ?
  • How do we know which variant applies to which component ?

alizedebray avatar Oct 10 '24 11:10 alizedebray

Tokens: post-validation-valid-fg post-validation-invalid-fg

Variant 1: <p class="validation invalid icon">Error</p>

Variant 2: [type="checkbox"] ~ .validation { // Show icon }

Resolution:

  • Variant to be used is inferred by type of component used (variant 2)

gfellerph avatar Oct 10 '24 12:10 gfellerph

Tokens

post.validation.error #B200000 post.validation.success #107800 post.validation.font-size 14px post.validation.text.padding.block.text 6px post.validation.text.padding.inline.text 2px post.validation.list.gap.inline 8/6/4px post.validation.list.padding.block.text 1px post.validation.list.icon.size 24/22/20px post.validation.list.icon.padding 0/1/2px

myrta2302 avatar Oct 28 '24 16:10 myrta2302

Added this one to the pattern discussion as its connected to the other issue I got

Vandapanda avatar Oct 30 '24 15:10 Vandapanda

  • Will the rest of the input types be designed
  • Success and Error colors on Dark theme?

myrta2302 avatar Nov 01 '24 10:11 myrta2302

Let's concentrate on the components needed for PPNL:

  • Text input
  • Select
  • Textarea
  • Checkbox
  • Radio Button
  • Card Control (if it does not take to much time)

oliverschuerch avatar Nov 05 '24 12:11 oliverschuerch

Tokenised and implemented in some examples. Link for Input Link for Group

Vandapanda avatar Nov 06 '24 12:11 Vandapanda

@sandra-post ->Design Review: https://preview-3824--swisspost-design-system-next.netlify.app/

myrta2302 avatar Nov 15 '24 12:11 myrta2302

@myrta2302 Design Review feedback for Validation

  • Re: text input, text area, select - Validation message can not co-exist with assistive text of input component (this is maybe covered in the implementation of the components itself)
  • Re: checkbox, radio button - Icon for "Invalid": Wrong, IS: white "X", should be "Warning_16_2_0_OPTIC" (exclamation mark)
  • Re: card control - No design yet available, needs to be reviewed when design available
  • General: I did not review top and bottom spacings since dependencies to input component implementation. Needs to be checked as total (when component impelemntation done)

sandra-post avatar Nov 18 '24 11:11 sandra-post