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

CSS Library: Generate a Figma token file #1957

Closed
2 tasks
jamigibbs opened this issue Jul 31, 2023 · 7 comments
Closed
2 tasks

CSS Library: Generate a Figma token file #1957

jamigibbs opened this issue Jul 31, 2023 · 7 comments
Assignees
Labels
DST-engineering Issues that require work from Design System Team engineers platform-design-system-team

Comments

@jamigibbs
Copy link
Contributor

jamigibbs commented Jul 31, 2023

Description

Reference discovery ticket: #1837

An NPM package exists that we could use for Figma: style-dictionary-to-figma. I connected this package and generated a tokens file with it as part of this discovery work but this will need to be verified that it's working as expected as part of the development ticket.

The Figma documentation says that you can import/use that file just by linking to its public source.

This design token validator might be useful too https://animaapp.github.io/design-token-validator-site/

Tasks

  • A token files has been created in the CSS Library that works with Figma

Acceptance Criteria

  • The token file has been tested for Figma and confirmed to work as expected.
@jamigibbs jamigibbs changed the title CSS Library: Generate the Figma token file CSS Library: Generate a Figma token file Jul 31, 2023
@caw310 caw310 added the DST-engineering Issues that require work from Design System Team engineers label Aug 10, 2023
@ataker ataker self-assigned this Aug 16, 2023
@ataker
Copy link
Contributor

ataker commented Aug 17, 2023

Here are the steps to add the color token to Figma:

  1. In Figma, open the top left Figma menu, then select Plugins, then Sync Design Tokens
    Sync Design Tokens Menu

  2. In the modal form, for the Tokens json file url enter the URL for our token file and for case type select the Kebab radio button. Click the Import Tokens button.

  3. The colors should populate under Local Styles in the right side menu.

@LillyBoot

Note to self: our token URL will need to be updated after the pull request is merged in. Edit: Token URL updated

@LillyBoot
Copy link

LillyBoot commented Aug 17, 2023

@ataker the design tokens were able to import with no issue! The only minor things I noticed were that some of the color names came in as an asterisk and they were not in groups (i.e. primary, secondary, gray). Not sure if that is something you could fix on your end. If not we can always change it manually in Figma
Screen Shot 2023-08-17 at 3 14 04 PM

@ataker
Copy link
Contributor

ataker commented Aug 17, 2023

@LillyBoot Updated so they have the name, and all the alternates are prefixed with the group they're in:

Screenshot 2023-08-17 at 4 12 42 PM

The base ones now end with a hyphen though, I don't think I can help that.

@LillyBoot
Copy link

@ataker thank you for fixing that! It looks much better.
Screen Shot 2023-08-17 at 4 22 06 PM

@humancompanion-usds any thoughts?

@humancompanion-usds
Copy link
Collaborator

Looks good. I'm still working through the colors in tokens. There are some I'd like to rename/move:

  • warning-message should become feedback-warning-background. It's MVP value is #fac922 but it will move to match the USWDS value of uswds-system-color-yellow-5 (#faf3d1) in the final v3 color set.
  • gibill-accent. I'm not sure this is still in use or if it's a hub color or what. Can we investigate? That will help me rename it.
  • orange. What in the world is this doing there?! It's such an odd call out. That too needs some investigation. Is it in use? Is it a hub color? What is it? That will help me rename it.

Otherwise the list looks complete to me in Figma.

@ataker
Copy link
Contributor

ataker commented Aug 25, 2023

This PR should address all three colors:

  • warning-message updated to feedback-warning-background
  • gibill-accent has been removed. This was a duplicate of gold-lightest only used in the GI Bill portion of vets-website (which I have a separate PR to update that to the more standard name)
  • orange has been removed. This was only used within storybook. Moved to a more appropriate location

@ataker
Copy link
Contributor

ataker commented Aug 29, 2023

We still need to remove warning-message, which will be handled in this ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DST-engineering Issues that require work from Design System Team engineers platform-design-system-team
Projects
None yet
Development

No branches or pull requests

5 participants