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

Fixed bug in notice-background-color-default #17

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

lynnhao
Copy link
Contributor

@lynnhao lynnhao commented Dec 7, 2023

Description

Fixed bug in the light theme value for notice-background-color-default, from notice-color-800 to notice-color-600

Motivation and context

While updating the badge component in Figma, we noticed a bug where notice-background-color-default in S2 was entered incorrectly for light theme, and should instead match the value for S1

Related issue

N/A – no Jira ticket for this patch

Types of changes

  • Patch (bug fixes, typos, mistakes; non-breaking change which fixes an issue)
  • Minor (add a new token, changing a value; non-breaking change which adds functionality)
  • Major (deleting a token, changing token value type; fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • I updated the token in all applicable sets. This applies if updating, adding, or deleting a token that has data across different sets (for example, if the value differs across color themes.)

@lynnhao lynnhao self-assigned this Dec 7, 2023
@mrcjhicks
Copy link
Collaborator

TESTING spectrum2-colors

READING spectrum-tokens: /spectrum-tokens/packages/tokens/src/
READING tokens studio: /spectrum-tokens-studio-data/src/tokens-studio/spectrum2-colors/
TOKENS STUDIO DATA IS COLOR ONLY

WARNING - studio token uuid collision: (48f3445a-63d8-4477-a2f5-1fee6a022328)
spectrum2/alias/dark,Alias,background,semantic,notice,default
spectrum2/alias/light,Alias,background,semantic,notice,default
WARNING - STUDIO INCLUDES DEPRECATED TOKEN: floating-action-button-shadow-color [f843b1b7-4b2f-496e-a679-b0372e49d575]

TEST COMPLETE

@mrcjhicks
Copy link
Collaborator

WARNING - studio token uuid collision: (48f3445a-63d8-4477-a2f5-1fee6a022328)
spectrum2/alias/dark,Alias,background,semantic,notice,default
spectrum2/alias/light,Alias,background,semantic,notice,default

This warning is triggering because these two tokens have their constant-token-duplicate value set to true (their values are expected to be identical), but with this change their values are no longer the same so they need to be unique token entries in spectrum-tokens.

I'm not sure what we do with uuids in this situation, @GarthDB. Do we deprecate the existing token definition with the current uuid, and create new ones for the separate light/dark values? Or something else?

@mrcjhicks mrcjhicks requested a review from GarthDB December 7, 2023 22:51
@karstens
Copy link
Collaborator

karstens commented Dec 8, 2023

@GarthDB @mrcjhicks I think, we talked about using the uuid for light and generate new uuids for the other themes, in case these kind of changes happens. slack disc..
I would expect the test script to:

  • warn the other about the uuid collision (which it does nicely here, thanks @mrcjhicks),
  • update/generate the uuid for the dark token
  • update the constant-token-duplicate to false

After merge, the sync script would apply the changes to spectrum-tokens and split up the constant token there as well.
(note: have I mentioned, that I advocate to eliminate the constant tokens in spectrum-tokens completely? ;-))

@mrcjhicks
Copy link
Collaborator

@karstens Thanks for the clarification; I'll make the changes to the diff script to resolve this type of an issue using the workflow you described.

@mrcjhicks
Copy link
Collaborator

TESTING spectrum2-colors

READING spectrum-tokens: /spectrum-tokens/packages/tokens/src/
READING tokens studio: /spectrum-tokens-studio-data/src/tokens-studio/spectrum2-colors/
TOKENS STUDIO DATA IS COLOR ONLY

WARNING - STUDIO INCLUDES DEPRECATED TOKEN: floating-action-button-shadow-color [f843b1b7-4b2f-496e-a679-b0372e49d575]

STUDIO SYNC SUMMARY

UPDATED METADATA - SPECTRUM UUID: spectrum2/alias/dark.Alias.background.semantic.notice.default

SPECTRUM SYNC SUMMARY

NEW TOKENS: (1) notice-background-color-default/dark
MODIFIED TOKENS: (1) notice-background-color-default/light
CHANGED VALUES: (1) notice-background-color-default

TEST COMPLETE

@mrcjhicks mrcjhicks merged commit 96dde0c into main Dec 8, 2023
3 checks passed
@mrcjhicks
Copy link
Collaborator

mrcjhicks commented Dec 8, 2023

SYNCING spectrum2-colors

READING spectrum-tokens: /spectrum-tokens/packages/tokens/src/
READING tokens studio: /spectrum-tokens-studio-data/src/tokens-studio/spectrum2-colors/
TOKENS STUDIO DATA IS COLOR ONLY

WARNING - STUDIO INCLUDES DEPRECATED TOKEN: floating-action-button-shadow-color [f843b1b7-4b2f-496e-a679-b0372e49d575]

STUDIO SYNC SUMMARY

UPDATED METADATA - SPECTRUM UUID: spectrum2/alias/dark.Alias.background.semantic.notice.default

SPECTRUM SYNC SUMMARY

NEW TOKENS: (1) notice-background-color-default/dark
MODIFIED TOKENS: (1) notice-background-color-default/light
CHANGED VALUES: (1) notice-background-color-default

WROTE: /home/runner/work/spectrum-tokens-studio-data/spectrum-tokens-studio-data/spectrum-tokens-studio-data/src/tokens-studio/spectrum2-colors/spectrum2/alias/dark.json WROTE: /home/runner/work/spectrum-tokens-studio-data/spectrum-tokens-studio-data/spectrum-tokens-studio-data/src/tokens-studio/spectrum2-colors/spectrum2/alias/light.json WROTE: /home/runner/work/spectrum-tokens-studio-data/spectrum-tokens-studio-data/spectrum-tokens/packages/tokens/src/color-aliases.json

SYNC COMPLETE

Spectrum Tokens Pull Request
Tokens Studio Pull Request

@mrcjhicks mrcjhicks deleted the lynnhao/fix-notice-background-color-default branch December 8, 2023 21:28
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.

5 participants