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

[Tokens] Update css-library to 0.16.0 to get feedback tokens #601

Merged
merged 7 commits into from
Dec 6, 2024

Conversation

narin
Copy link
Contributor

@narin narin commented Dec 5, 2024

Description of Change

Updated css-library to 0.16.0 to grab 6 color tokens we had them add:

Primitive

  • uswds-system-color-green-cool-vivid-30
  • uswds-system-color-gold-vivid-40

Semantic

  • vads-color-feedback-foregound-success-on-dark: uswds-system-color-green-cool-vivid-30
  • vads-color-feedback-foregound-warning-on-light: uswds-system-color-gold-vivid-40
  • vads-color-feedback-foregound-success-on-light: uswds-system-color-green-cool-vivid-50
  • vads-color-feedback-foregound-warning-on-dark: uswds-system-color-gold-vivid-30

Also, VADS web team added their own font tokens in one of the recent versions, some of which conflict with our font tokens. I've added a filter to ignore web font tokens since there is no crossover for fonts between web and mobile.

Testing Packages

  • 0.20.1-alpha.0

Screenshots/Video

Testing

  • Tested on iOS
  • Tested on Android
  • Tested on Web

PR Checklist

Code reviewer validation:

  • General
    • PR is linked to ticket(s)
    • PR has changelog label applied if it's to be included in the changelog
    • Acceptance criteria:
      • All satisfied or
      • Documented reason for not being performed or
      • Split to separate ticket and ticket is linked by relevant AC(s)
    • Above PR sections adequately filled out
    • If any breaking changes, in accordance with the pre-1.0.0 versioning guidelines: a CU ticket has been created for the VA Mobile App detailing necessary adjustments with the package version that will be published by this ticket
  • Code
    • Tests are included if appropriate (or split to separate ticket)
    • New functions have proper TSDoc annotations

Publish

If changes warrant a new version per the versioning guidelines and the PR is approved and ready to merge:

@narin narin requested a review from a team as a code owner December 5, 2024 05:15
narin added 2 commits December 4, 2024 21:16
…partment-of-veterans-affairs/va-mobile-library into feature/1417-narin-update-css-library
packages/tokens/build.js Outdated Show resolved Hide resolved
/** Remove VADS web font tokens */
StyleDictionary.registerFilter({
name: 'filter/fonts/mobile-fonts',
matcher: (token) => token.attributes.category !== 'vads-font',
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if there's another way without digging at all, but just noting it feels weird to have a general filter that needs to be applied to all files that didn't previously have a filter to get rid of the vads-fonts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There doesn't seem to be a way to apply filters to an entire platform or transform group, but style-dictionary 4.0 introduces preprocessors which might be able to clean this up. Created #604 to follow up on it after we update to 4.0.

packages/tokens/build.js Outdated Show resolved Hide resolved
Copy link
Contributor

@TimRoe TimRoe left a comment

Choose a reason for hiding this comment

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

Approving since nothing necessarily needs to change, but have some comments/suggestions.

Also noting it's not linked to a ticket (is it supposed to be just to the same ticket as VADS?).

@narin narin merged commit 8bcbe29 into main Dec 6, 2024
4 of 5 checks passed
@narin narin deleted the feature/1417-narin-update-css-library branch December 6, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants