Replies: 1 comment
-
|
Plus 1 on decomposing “naming conventions” into taxonomy vs vocabulary vs formatting. That framing is solid, and it matches the breakdown we’ve been using in Foundations & Data squad discussions (taxonomy order vs term vocabulary vs formatting style). Where I strongly disagree is the direction this takes in practice: it’s pulling component data (component + component anatomy + component prop axes) into token taxonomy. That’s the wrong layer of abstraction for foundational (global or semantic) tokens. Tokens ≠ component schemas (and we need to keep that boundary crisp)Our Foundations work is explicitly trying to move away from component-specific tokens because they grow exponentially, become unmanageable, and are hard to reason about (as evidenced in research and work being done in the Semantic Token & Taxonomy Refinement initiative). Concretely: the “component-like” aspects of tokens should be limited to:
As soon as we bake Anatomy belongs in component schemas, not token taxonomyI agree with the separation you’re trying to make (anatomy vs styling surfaces). But the conclusion should be:
If we need a structured place to store per-component anatomy terms, that’s great — but it should live alongside component schemas, not inside token classifications. Suggestion (to keep the good parts without collapsing layers)
This keeps the system “higher order” (shared semantics) instead of drifting back toward ground-level component modeling — which is exactly what the Foundations initiative is trying to avoid. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This RFC proposes decomposing "naming convention" into three distinct, independently malleable layers — Token Taxonomy, Token Term Vocabulary, and Formatting Style — and restructuring the spec's name object to align with this framework. It also proposes integrating component anatomy into the design data model and separating it from token styling surfaces, which are currently conflated in the registry.
This builds on:
Motivation
"Naming conventions" is too broad a term for use when discussing malleability across platform teams. A token name like
accent-background-color-hoverembeds multiple independent decisions:Each layer has a different malleability profile:
hover→highlightedfor iOS)Additionally, the current spec's name object has a single
propertyfield that conflates multiple concepts (component anatomy, styling surface, CSS property). This makes structured querying and validation difficult.Proposal
1. Restructured name object
The current name object fields:
Proposed name object aligned with a semantic/layout token taxonomy:
Semantic fields (advisory validation against registry):
propertycomponentstructuresubstructureanatomyobjectvariantstateorientationpositionsizedensityshapeDimension fields (strict validation against declared modes):
colorSchemescalesizecontrast2. Component anatomy vs. token objects
These are currently conflated in
anatomy-terms.json(24 terms) but serve different purposes:Component anatomy — the visible, named parts of a component as defined by designers. Appears in component specification diagrams. Should be declared per component in component schemas.
An audit of 65 S2 component docs found 133 unique anatomy terms across three tiers:
Token objects / styling surfaces — where a visual property is applied on a UI element. NOT anatomy. Only 4 of 65 components list "background" as anatomy; for most, background is a styling surface, not a visible named part.
Current
anatomy-terms.jsonterms likebackground,border,edge,visualbelong in a separatetoken-objects.jsonregistry.3. Three registries
anatomyobjectstructure,orientation,position,size,density,shapePlus existing registries for
component,variant,state(unchanged).4. Formatting as serialization
The name object is unordered structured data. Concept ordering, casing, and delimiters are serialization concerns owned by the output formatter.
Default serialization (legacy format):
Platform manifests can declare formatting rules:
conceptOrder— ordered list of fields for serializationcasing— kebab-case, camelCase, PascalCase, SCREAMING_SNAKE_CASEdelimiter— character(s) separating conceptsabbreviations— term → short form mappings5. Platform dimension autonomy
Platform manifests should be able to:
framework: [UIKit, SwiftUI])scale: [mobile]only, excluding desktop)hover→highlighted)Examples
Legacy:
accent-background-color-hover{ "name": { "variant": "accent", "object": "background", "property": "color", "state": "hover" } }Semantic/layout:
base-padding-vertical-small{ "name": { "structure": "base", "property": "padding", "orientation": "vertical", "size": "small" } }With anatomy:
slider-handle-width{ "name": { "component": "slider", "anatomy": "handle", "property": "width" } }Same token, different platform formatting:
Relationship to prior RFCs
taxonomy.mdto the spec document set.Open questions
Anatomy audit scope — The 133 terms from S2 docs have significant data quality issues (compound entries, inconsistent naming). How much cleanup should block the spec work vs. be done incrementally?
propertyfield migration — MakingpropertyREQUIRED but narrowing its semantics is a breaking change for existing cascade-format tokens. What migration path works for in-progress work?Taxonomy scoping — The 8 categories above are for semantic/layout tokens. What other token type taxonomies need to be defined (color, typography, motion)?
structurevscomponent— Nate's presentation draws a clear distinction (structures are reusable visual patterns; components are specific UI elements). In practice, where does the line fall? Is a "card" a structure or a component?Validation strictness — Should new taxonomy fields (
orientation,position,density,shape) start as advisory warnings or strict errors?Platform dimension restrictions — When iOS excludes
desktopmode, should tokens withscale: "desktop"become invisible to iOS tooling, or should they resolve to the default?Implementation phases
anatomy-terms.jsontaxonomy.mdBeta Was this translation helpful? Give feedback.
All reactions