Skip to content
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

[component]: Radio Button (rework) #3537

Closed
7 tasks
Tracked by #3628
schaertim opened this issue Sep 11, 2024 · 3 comments · Fixed by #3965
Closed
7 tasks
Tracked by #3628

[component]: Radio Button (rework) #3537

schaertim opened this issue Sep 11, 2024 · 3 comments · Fixed by #3965
Assignees
Labels
📦 styles Related to the @swisspost/design-system-styles package

Comments

@schaertim
Copy link
Contributor

schaertim commented Sep 11, 2024

Description

Background

This is a follow-up ticket for the v2 implementation of the radio-button which could not be completed due to several challenges encountered during the development process. This ticket aims to document these issues and provide a clear path forward for completing the implementation.

Current Issues

  1. Design-Code Inconsistencies: The figma implementation uses a padding to move the label text to the right beside the radio-button. This approach can not be used in code. Currently it is handled differently which means the padding token can not be utilized. To be able to tokenize the spacing between the button and the label, the structure of the design has to be adapted.
  2. Missing Tokens: Some values like the the border-radius of the focus outline (the radius of the form-check element) or the radio select do not have associated tokens. It's not clear if these should be added or use hardcoded values.
  3. Validation Implementation: The form-validation design has changed. Should the validation styles be implemented individually for each component (and thus use tokens) or should the existing form-validation file be adapted to fit the new design?
    needs: discussion There is at least one topic in the pattern descussion meeting about the issue

Tasks

  • Have discussion on validation implementation, make decision and document it
  • Review v2 design and code structure
  • Document inconsistencies and discuss with designers
  • Adapt design structure
  • Retokenize design and add missing tokens
  • Finish implementation

Design

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

Tokens

  • Tokens for this component are ready

Due to the issues described above, not all tokens were able to be used. Here is a list of all tokens not yet used:

  • post-radio-button-disabled-stroke
  • post-radio-button-signal-error
  • post-radio-button-gap-block-group
  • post-radio-button-gap-inline-error
  • post-radio-button-icon-padding-block-inner
  • post-radio-button-icon-padding-inline-inner
  • post-radio-button-padding-block-text
  • post-radio-button-padding-block-group
  • post-radio-button-padding-block-error
  • post-radio-button-padding-inline-text-start
@schaertim schaertim added the 📦 components Related to the @swisspost/design-system-components package label Sep 11, 2024
@oliverschuerch
Copy link
Contributor

Depends on #3540

@oliverschuerch oliverschuerch added needs: discussion There is at least one topic in the pattern descussion meeting about the issue needs: 💬 pattern discussion This issue will be discussed in the next Pattern Discussion meeting. labels Sep 18, 2024
@gfellerph gfellerph removed the needs: 💬 pattern discussion This issue will be discussed in the next Pattern Discussion meeting. label Sep 24, 2024
@gfellerph
Copy link
Member

@schaertim discuss with @Vandapanda in a smaller round

@schaertim
Copy link
Contributor Author

Decision: Implement a validation component containing all tokens concerning validation styling. Two variants should be distinguished through naming.

@gfellerph gfellerph removed the needs: discussion There is at least one topic in the pattern descussion meeting about the issue label Sep 25, 2024
@gfellerph gfellerph added this to the Design v2 milestone Sep 25, 2024
@gfellerph gfellerph moved this from 👀 Triage to 💻 Ready for development in Design System Production Board Sep 25, 2024
@schaertim schaertim self-assigned this Sep 26, 2024
@schaertim schaertim added 📦 styles Related to the @swisspost/design-system-styles package and removed 📦 components Related to the @swisspost/design-system-components package labels Sep 26, 2024
@gfellerph gfellerph modified the milestones: Design v2, Cargo Components Oct 1, 2024
@schaertim schaertim linked a pull request Oct 23, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 🤬 Dev in review to 🚀 Done in Design System Production Board Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 styles Related to the @swisspost/design-system-styles package
Projects
Status: 🚀 Done
3 participants