Skip to content

Semantic-tokens: Generation Scripts - #34159

Merged
Mitch-At-Work merged 22 commits into
microsoft:extended-tokensfrom
Mitch-At-Work:user/mifraser/semantic-token-scripts
Apr 11, 2025
Merged

Semantic-tokens: Generation Scripts#34159
Mitch-At-Work merged 22 commits into
microsoft:extended-tokensfrom
Mitch-At-Work:user/mifraser/semantic-token-scripts

Conversation

@Mitch-At-Work

Copy link
Copy Markdown
Contributor

Added:

  • tokenGen.ts - Generates the new semantic tokens from tokens.json
  • legacyTokens.ts - Generates fluent 2 fallbacks as a backwards compatible token source (with flat exporting)
  • fluentOverrides.ts (script manual overrides for backwards compatibility)
  • tokens.json (script data source, exported from Figma definitions)

These scripts and sources form the basis of all new semantic token definitions.

Waiting on final tokens.json definitions before stable release, but is now majority complete.

@github-actions

github-actions Bot commented Apr 2, 2025

Copy link
Copy Markdown

Pull request demo site: URL

@Mitch-At-Work
Mitch-At-Work force-pushed the user/mifraser/semantic-token-scripts branch from 742cc6f to 42b2adf Compare April 3, 2025 21:58
@Mitch-At-Work
Mitch-At-Work requested a review from a team as a code owner April 3, 2025 21:58
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
@Mitch-At-Work

Copy link
Copy Markdown
Contributor Author

Removed the legacy tokens script, tokens do indeed get tree-shaken so no need to flat export: https://github.com/microsoft/fluentui/pull/34226/files

This does move the fluentui/tokens package into our deps now as it is required.

Comment thread packages/semantic-tokens/utils/removeLastDelimiter.test.ts Outdated
Comment thread packages/semantic-tokens/utils/removeLastDelimiter.test.ts
Comment thread packages/semantic-tokens/utils/escapeInlineToken.test.ts
Comment thread packages/semantic-tokens/utils/dedupeShadowTokens.ts Outdated
Comment thread packages/semantic-tokens/utils/chopLastCamelCasePart.test.ts
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/utils/dedupeShadowTokens.test.ts
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/scripts/tokenGen.ts Outdated
Comment thread packages/semantic-tokens/utils/cleanFstTokenName.test.ts
Comment thread packages/semantic-tokens/utils/cleanFstTokenName.ts
@Mitch-At-Work
Mitch-At-Work merged commit d5f5d20 into microsoft:extended-tokens Apr 11, 2025
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