feat(taxonomy): classify typography multiplier tokens (margin, line-height, cjk)#977
Merged
Merged
Conversation
…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 detectedLatest 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 |
Contributor
🎨 Token Changes ReportTokens Changed (0)Original Branch: This comment was automatically generated by the token diff tool. 🤖 |
Contributor
Run report for 83671c22Total time: 2m 7s | Comparison time: 5m 53s | Estimated savings: 3m 45s (63.9% faster)
Expanded report
Touched files |
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Classifies 9 deferred typography multiplier tokens with structured
nameobjects, 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(notcomponent) 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-pxline-height-font-size-Nscale-set tokens.Related Issue
Closes
spectrum-design-data-aev,spectrum-design-data-a61,spectrum-design-data-duh(beads). Supersedesspectrum-design-data-vqjandspectrum-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:
margin,margin-top,margin-bottom,line-height-multipliertoproperty-terms.jsonbody,detail,headingtostructures.jsonas typography-scale structuresmultiplier.jsonto the typographyDOMAIN_SCHEMASin the SDK (unblocksfamilyfield on CJK tokens, SPEC-042)domain-required-fields) to acceptscaleIndexandstructureas valid typography-domain identifiers for multiplier tokensHow Has This Been Tested?
moon run :test— all 18 tasks passcargo test -p design-data-core spec042 spec043— all tests pass (3 new SPEC-043 tests added)moon run tokens:verifyDesignDataSnapshot— snapshot clean, no new warningspnpm ava testintools/token-corpus-migrate— 93 tests pass (unit + integration tests updated)Types of changes
Checklist: