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

[WNMGDS-2895] Update font and focus color design tokens in CMS.gov theme #3227

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

malloryiden
Copy link
Collaborator

@malloryiden malloryiden commented Sep 11, 2024

Summary

  • Changed all headers from Open Sans to Lexend
  • Changed body copy from Open Sans to Public Sans
  • Changed focus state color from Orchid to Copper
  • Changed bold (700) headers to semibold (600)

How to test

  1. Check Theme.cmsgov.json file for above changes
  2. Check other theme files for adding the "semibold" token

Checklist

  • Prefixed the PR title with the Jira ticket number as [WNMGDS-####] Title or [NO-TICKET] if this is unticketed work.
  • Selected appropriate Type (only one) label for this PR, if it is a breaking change, label should only be Type: Breaking
  • Selected appropriate Impacts, multiple can be selected.
  • Selected appropriate release milestone

@malloryiden malloryiden added Impacts: CMSgov Impacts the CMS.gov theme directly. Type: Changed Indicates a change to an existing element of the DS. labels Sep 11, 2024
@malloryiden malloryiden added this to the 12.0.0-beta.0 milestone Sep 11, 2024
packages/design-system-tokens/.env.example Outdated Show resolved Hide resolved
@@ -1149,6 +1149,16 @@
"codeSyntax": {}
}
}
},
"semibold": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

just a heads up that this could cause issues. semibold has no meaning on the web.

  1. some fonts don't have a semibold/600 value
  2. as far as markup is concerned, there's no "semibold" tag to use in CMS (content management systems) - we only have normal text tags (like <p>) and <strong>

I wonder if it makes sense to abstract the idea of bold vs not-bold for future theming? Will themes have a need for nuanced weights (probably not since non-retina screens won't be able to differentiate), so maybe having a token representing font weights as "normal" or "default" and "heavy" (or whatever standin word for your bolded type) could prevent the issues presented above?

What I mean is all themes would have a "normal" and "heavy" font weight token, but the value of those tokens could differ across themes. Mgov could have its "heavy" as 700 and CMS could have its heavy as 600 without the need to give all themes all weights.

Copy link
Collaborator Author

@malloryiden malloryiden Sep 12, 2024

Choose a reason for hiding this comment

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

Thanks for this! Digging this idea. Could you speak more on the use cases where this would introduce issues? I think variable fonts also can solve part of this (your point 1), but perhaps we'd still run into the CMS issue.

Could this introduce other issues in a case where a theme wants to use two "heavy" weights (like both 600 and 700)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

sure thing!

so first, we used to support bold, semibold and regular font weights (i think also thin at one point?) but we reduced them to the current selection to shrink our bundle size.

the variable "semibold" was recently deprecated from the DS (as of 3 weeks ago). but the value for it (600 weight) is still active in the system. you can see this on the mgov tokens

variable fonts could solve this problem, but are also large file sizes, so there's a tradeoff as far as asset downloads go. the same asset size issue exists when adding additional font weight files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great context, thank you! (Also lol for deprecating semibold and then introducing it again now).

@zarahzachz
Copy link
Collaborator

Oh! And since this is a font family change, I think this is considered a breaking change (major version)

@malloryiden malloryiden added the Type: Breaking This item causes a breaking change. label Sep 12, 2024
@malloryiden
Copy link
Collaborator Author

Oh! And since this is a font family change, I think this is considered a breaking change (major version)
Added, thank you!

packages/design-system-tokens/src/tokens/System.Value.json Outdated Show resolved Hide resolved
packages/design-system-tokens/src/tokens/System.Value.json Outdated Show resolved Hide resolved
@@ -1158,6 +1158,16 @@
"codeSyntax": {}
}
}
},
"semibold": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is what i'm talking about above - the "bold" token is mapped to the 600 weight, meaning there is no true bold/700 weight font in mgov

@@ -1149,6 +1149,16 @@
"codeSyntax": {}
}
}
},
"semibold": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

sure thing!

so first, we used to support bold, semibold and regular font weights (i think also thin at one point?) but we reduced them to the current selection to shrink our bundle size.

the variable "semibold" was recently deprecated from the DS (as of 3 weeks ago). but the value for it (600 weight) is still active in the system. you can see this on the mgov tokens

variable fonts could solve this problem, but are also large file sizes, so there's a tradeoff as far as asset downloads go. the same asset size issue exists when adding additional font weight files.

@jack-ryan-nava-pbc
Copy link
Collaborator

@malloryiden can you update the title of this PR to be WNMGDS-2895?

@malloryiden malloryiden changed the title [WNMGDS:2895] Update font and focus color design tokens in CMS.gov theme [WNMGDS-2895] Update font and focus color design tokens in CMS.gov theme Sep 18, 2024
@jack-ryan-nava-pbc
Copy link
Collaborator

The number of snapshots changed is absolutely massive. I'm wondering if it makes sense to make a few of these changes in broken up pull requests so we don't get a diff of 800+ files? What do you think @kim-cmsds @tamara-corbalt @malloryiden ?

Copy link
Collaborator

@jack-ryan-nava-pbc jack-ryan-nava-pbc left a comment

Choose a reason for hiding this comment

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

I'm approving! Nice work @malloryiden

I do think we should have a larger conversation around an acceptable number of files changed. 846 is a lot, and maybe we can come up with strategies for breaking up big pull requests (or pull requests with lots of visual changes) so we keep the size to something more manageable.

cc @kim-cmsds @tamara-corbalt I'm really curious about what you two think. Thanks!

@kim-cmsds
Copy link
Collaborator

I am curious about what would have happened if this work was split out into 4 separate PRs based on the bullet points that describe the changes made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impacts: CMSgov Impacts the CMS.gov theme directly. Type: Breaking This item causes a breaking change. Type: Changed Indicates a change to an existing element of the DS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants