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

feat(styles): tokenise radio buttons #3540

Closed
wants to merge 9 commits into from

Conversation

schaertim
Copy link
Contributor

The v2 design implementation is currently incomplete due to several factors:

  • Inconsistencies between the design specifications and the existing code structure.
  • Missing tokens in the current implementation.
  • Pending development decisions regarding the validation process.
    To address these issues and track progress, a new ticket ([component]: Radio Button (rework) #3537 ) has been created to document the necessary steps for full implementation.

@schaertim schaertim requested a review from a team as a code owner September 11, 2024 13:05
@schaertim schaertim linked an issue Sep 11, 2024 that may be closed by this pull request
4 tasks
Copy link

changeset-bot bot commented Sep 11, 2024

🦋 Changeset detected

Latest commit: 98afc4a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@swisspost/design-system-styles Patch
@swisspost/design-system-components-angular-workspace Patch
@swisspost/design-system-components Patch
@swisspost/design-system-documentation Patch
@swisspost/internet-header Patch
@swisspost/design-system-intranet-header-workspace Patch
@swisspost/design-system-nextjs-integration Patch
@swisspost/design-system-styles-primeng-workspace Patch
@swisspost/design-system-intranet-header Patch
@swisspost/design-system-styles-primeng Patch
@swisspost/design-system-components-react Patch
@swisspost/design-system-components-angular Patch
@swisspost/design-system-intranet-header-showcase Patch
@swisspost/design-system-tokens Patch
@swisspost/design-system-icons Patch
@swisspost/design-system-migrations Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Sep 11, 2024

Related Previews

@schaertim schaertim changed the title [component]: Radio button (feat): radio button Oct 1, 2024
@schaertim schaertim changed the title (feat): radio button feat(styles): radio button Oct 1, 2024
@schaertim schaertim changed the title feat(styles): radio button feat(radio-button): started implementing v2 design using tokens Oct 1, 2024
Copy link

@alizedebray alizedebray changed the title feat(radio-button): started implementing v2 design using tokens feat(styles): tokenise radio buttons Oct 25, 2024
'@swisspost/design-system-styles': patch
---

Started adapting the radio-button styles to match v2 design.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Started adapting the radio-button styles to match v2 design.
Aligned radio button styles with the new Post design.

Comment on lines +12 to +13
@use '../tokens/components' as components;
@use '../functions/tokens' as tokens;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary:

Suggested change
@use '../tokens/components' as components;
@use '../functions/tokens' as tokens;
@use '../tokens/components';
@use '../functions/tokens';

transition: color animation.$transition-base-timing;
color: tokens.get('radio-button-enabled-fg');
background-color: tokens.get('radio-button-enabled-bg');
transition: color #{animation.$transition-base-timing};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
transition: color #{animation.$transition-base-timing};
transition: color animation.$transition-base-timing;

height: tokens.get('radio-button-icon-ring');
width: tokens.get('radio-button-icon-ring');
border: tokens.get('radio-button-icon-border-width') solid
tokens.get('radio-button-enabled-stroke');
margin-top: 1px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this margin for? Can it be removed?
If not can you add a comment to explain it?

Comment on lines +118 to +119
// TODO: Use tokens
border: 3px solid transparent;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you contact @Vandapanda to create the missing tokens?

@@ -149,6 +167,9 @@
}
}

border: 0;
background-image: url('#{form-check.$form-check-input-disabled-background-url-light-lg}');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still correct or do we simply use a dashed border now?


.form-check {
display: flex;
flex-wrap: wrap;
row-gap: form-check.$form-check-row-gap;
margin-bottom: form-check.$form-check-margin-bottom;

@include utility-mx.focus-style() {
@include utility-mx.focus-style-custom() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the focus-style mixin here.

@alizedebray alizedebray added this to the PPNL Components milestone Oct 29, 2024
@schaertim schaertim removed a link to an issue Oct 29, 2024
4 tasks
@schaertim schaertim closed this Oct 29, 2024
@schaertim schaertim deleted the 3274-component-radio-button branch October 29, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants