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

[component]: Switch

Open Cian77 opened this issue 1 year ago • 4 comments

Description

Create a HTML/CSS component using the current markup that implements as many features as possible from the new Design. Remove any dependencies on bootstrap for this component. This is done for backwards compatibility reasons. The current structure will eventually be deprecated. These styles will give us the necessary time to come up with a solid input component strategy.

Open issues:

Design:

  • [x] New font
  • [ ] Spacing

Tokens:

  • [x] Text

Design

https://www.figma.com/design/JIT5AdGYqv6bDRpfBPV8XR/Foundations-%26-Components-Next-Level?node-id=21-178

Tokens

  • [ ] Tokens for this component are ready

Tasks

### 💻 Tasks
- [ ] Review Design (All states present? Possible to implement?)
- [ ] https://github.com/swisspost/design-system/issues/3496
- [ ] HTML/CSS implementation
- [ ] Remove all unused scss variables for this element
- [ ] Documentation in Storybook
- [ ] Visual regression tests
- [ ] Design review

Cian77 avatar Jul 16 '24 07:07 Cian77

Deleted Switch Group. In this component, we do not have an Error to show.

Cian77 avatar Aug 12 '24 13:08 Cian77

@schaertim please assign this ticket to me or @gfellerph, as soon as you have implemented the component (as far as possible). There are several tasks we need to do before we can finish this component:

  • [x] Update focus style structure in Figma, so the focus element has a padding (as it will be interaged on other form controls as well) which we can use as a outline-offset afterwards.
  • [ ] Reqest some focus outline tokens like stroke-width, stroke-color and stroke-dasharray.

oliverschuerch avatar Sep 17 '24 14:09 oliverschuerch

@schaertim Overworked the switch component so that it has a (sometimes invisible) border in every state. Implemented the new focus style, added tokens for Focus border and changed some token names for better understanding. Please let me know if you need something else

Vandapanda avatar Sep 25 '24 07:09 Vandapanda

@schaertim do you need anything from my side other than merging the newest tokens to main?

oliverschuerch avatar Oct 07 '24 09:10 oliverschuerch