Skip to content

feat: design system tokens#172

Merged
johnthecat merged 2 commits into
release/0.8from
feat/design-system-tokens
May 26, 2026
Merged

feat: design system tokens#172
johnthecat merged 2 commits into
release/0.8from
feat/design-system-tokens

Conversation

@foxwoosh

Copy link
Copy Markdown

Summary

Rename the ColorToken and TypographyStyle SCALE codec strings in packages/host-api/src/protocol/v1/customRenderer.ts to match the new Polkadot design system token paths.

TypographyStyle

Old New
titleXL headline.large
headline title.medium.regular
bodyM body.large.regular
bodyS body.medium.regular
caption body.small.regular

ColorToken

Old New
textPrimary fg.primary
textSecondary fg.secondary
textTertiary fg.tertiary
backgroundPrimary bg.surface.main
backgroundSecondary bg.surface.container
backgroundTertiary bg.surface.nested
success fg.success
error fg.error
warning fg.warning

Wire compatibility

Variant order is preserved, so SCALE binary encoding (which is ordinal-positional) is unchanged — any payload encoded against the old strings decodes identically against the new ones.

What does change is the symbolic string surfaced at every typed boundary: the TypeScript literal-union types accepted by Text/Modifier/etc. now use the new names. Any product script that passed string literals like style="caption" or color="textPrimary" will fail to type-check and must be updated to the new identifiers.

@johnthecat johnthecat changed the base branch from main to release/0.8 May 26, 2026 15:57
@johnthecat johnthecat merged commit 9e60c2b into release/0.8 May 26, 2026
5 checks passed
@johnthecat johnthecat deleted the feat/design-system-tokens branch June 11, 2026 09:06
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.

2 participants