Skip to content

feat(taxonomy): classify typography multiplier tokens (margin, line-height, cjk)#977

Merged
GarthDB merged 5 commits into
mainfrom
feat/classify-typography-multipliers
May 19, 2026
Merged

feat(taxonomy): classify typography multiplier tokens (margin, line-height, cjk)#977
GarthDB merged 5 commits into
mainfrom
feat/classify-typography-multipliers

Conversation

@GarthDB
Copy link
Copy Markdown
Member

@GarthDB GarthDB commented May 19, 2026

Description

Classifies 9 deferred typography multiplier tokens with structured name objects, reducing the SPEC-017 (string-name-tech-debt) warning count by 9.

Commit 1 — margin multipliers (f0fc0df2)

  • body-margin-multiplier{ structure: "body", property: "margin" }
  • detail-margin-{top,bottom}-multiplier{ structure: "detail", property: "margin-{top,bottom}" }
  • heading-margin-{top,bottom}-multiplier{ structure: "heading", property: "margin-{top,bottom}" }

Uses structure (not component) because body/heading/detail are typography scale patterns that recur across many components. Adds body, detail, heading to the structures registry.

Commit 2 — line-height and CJK line-height multipliers (f1e3365e)

  • line-height-{100,200}{ property: "line-height-multiplier", scaleIndex: N }
  • cjk-line-height-{100,200}{ property: "line-height-multiplier", family: "cjk", scaleIndex: N }

Uses property: "line-height-multiplier" (distinct from "line-height") to avoid SPEC-006 collision with the absolute-px line-height-font-size-N scale-set tokens.

Related Issue

Closes spectrum-design-data-aev, spectrum-design-data-a61, spectrum-design-data-duh (beads). Supersedes spectrum-design-data-vqj and spectrum-design-data-umt (RFC beads — decisions made inline).

Motivation and Context

These tokens were deferred from #969 (canonical-name migration) due to missing spec infrastructure. This PR resolves the blockers:

  • Adds margin, margin-top, margin-bottom, line-height-multiplier to property-terms.json
  • Adds body, detail, heading to structures.json as typography-scale structures
  • Adds multiplier.json to the typography DOMAIN_SCHEMAS in the SDK (unblocks family field on CJK tokens, SPEC-042)
  • Widens SPEC-043 (domain-required-fields) to accept scaleIndex and structure as valid typography-domain identifiers for multiplier tokens

How Has This Been Tested?

  • moon run :test — all 18 tasks pass
  • cargo test -p design-data-core spec042 spec043 — all tests pass (3 new SPEC-043 tests added)
  • moon run tokens:verifyDesignDataSnapshot — snapshot clean, no new warnings
  • pnpm ava test in tools/token-corpus-migrate — 93 tests pass (unit + integration tests updated)
  • Changeset linter clean for both changesets

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

GarthDB and others added 2 commits May 18, 2026 22:17
…erty name shape

Migrates the 5 active margin multiplier tokens deferred from #969.
Introduces body/detail/heading as typography-scale structures in the
design-system-registry so SPEC-009 vocabulary checks stay clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…okens

Uses property: "line-height-multiplier" to distinguish unitless ratio tokens
from absolute-px scale-set line-height tokens, resolving the SPEC-006 collision.
Adds multiplier.json to typography DOMAIN_SCHEMAS (unblocks family field on CJK
tokens) and widens SPEC-043 to accept scaleIndex/structure as valid
typography-domain identifiers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 19, 2026

🦋 Changeset detected

Latest commit: 83671c2

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

🎨 Token Changes Report

Tokens Changed (0)

Original Branch: main
New Branch: feat/classify-typography-multipliers


This comment was automatically generated by the token diff tool. 🤖

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

Run report for 83671c22

Total time: 2m 7s | Comparison time: 5m 53s | Estimated savings: 3m 45s (63.9% faster)

Action Time Status Info
⬛️ SetupProto(0.51.4) 0.1ms Skipped
🟩 SyncWorkspace 7.2ms Passed
🟩 SyncProject(design-data-spec) 1.9s Passed
⬛️ SetupToolchain(node:20.17.0) 1.9s Skipped
🟩 SyncProject(sdk) 1.9s Passed
🟩 SyncProject(component-schemas) 0.4ms Passed
🟩 SyncProject(tokens) 0.4ms Passed
🟩 SyncProject(design-system-registry) 0.4ms Passed
🟩 SyncProject(viewer) 0.3ms Passed
🟩 SyncProject(markdown-generator) 0.2ms Passed
🟩 SyncProject(site) 0.3ms Passed
🟩 RunTask(site:copySpec) 1.4s Passed
🟩 InstallWorkspaceDeps(node:20.17.0) 15.4s Passed
🟩 InstallProjectDeps(node:20.17.0, sdk) 16.2s Passed
🟩 RunTask(site:generateToolsPage) 883.9ms Passed
🟩 RunTask(tokens:buildManifest) 255.4ms Passed
🟩 SetupToolchain(rust:1.85.0) 19.6s Passed
🟩 RunTask(design-system-registry:validate) 345ms Passed
🟩 RunTask(sdk:codegen) 275.4ms Passed
🟩 RunTask(design-system-registry:test) 1.8s Passed
And 18 more...
Expanded report
Action Time Status Info
🟩 RunTask(sdk:codegen-check) 170.4ms Passed
🟩 RunTask(component-schemas:test) 2.6s Passed
🟩 InstallWorkspaceDeps(rust:1.85.0, sdk) 764.7ms Passed
🟩 RunTask(sdk:lint) 40.2s Passed
🟩 RunTask(tokens:buildTokens) 1m 29s Passed
🟩 RunTask(tokens:build) 26.6ms Passed
🟩 RunTask(viewer:prepare) 279.7ms Passed
🟩 RunTask(viewer:export) 113ms Passed
🟩 RunTask(markdown-generator:generate) 560.9ms Passed
🟩 RunTask(site:copyContent) 98.1ms Passed
🟩 RunTask(site:build) 3.8s Passed
🟩 RunTask(site:export) 7.2ms Passed
🟩 RunTask(sdk:build) 1m 31s Passed
🟩 RunTask(tokens:verifyLegacyRoundtrip) 1.7s Passed
🟩 RunTask(tokens:verifyDesignDataSnapshot) 2.3s Passed
🟩 RunTask(tokens:validateDesignData) 2.6s Passed
🟩 RunTask(tokens:test) 5.4s Passed
🟩 RunTask(sdk:test) 1m 46s Passed
Touched files
.changeset/line-height-multiplier-names.md
.changeset/margin-multiplier-names.md
packages/design-system-registry/registry/property-terms.json
packages/design-system-registry/registry/structures.json
packages/token-names/names/typography.json
packages/tokens/schemas/token-types/multiplier.json
sdk/core/src/registry_data.rs
sdk/core/src/validate/rules/mod.rs
sdk/core/src/validate/rules/spec043.rs
tools/token-corpus-migrate/src/transform.js
tools/token-corpus-migrate/test/transform.test.js

GarthDB and others added 3 commits May 19, 2026 11:51
…gesets

Name objects belong in packages/token-names/names/, not inline in
packages/tokens/src/. Removes the name fields added to typography.json
and updates changesets to reflect the correct packages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…meForKey, fix changeset

- transform.js: fix JSDoc param comments (component → structure)
- transform.test.js: add direct unit tests for marginMultiplierNameForKey
  (body, detail-top, heading-bottom, unrecognized → null) and fix stale
  classifyToken test description
- margin-multiplier-names.md: add design-data-core (registry_data.rs changed)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ultipliers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@GarthDB GarthDB merged commit 526d2de into main May 19, 2026
6 checks passed
@GarthDB GarthDB deleted the feat/classify-typography-multipliers branch May 19, 2026 18:26
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.

1 participant