feat(many): support current spacing tokens in the margin prop for v2 components#2587
Open
balzss wants to merge 1 commit into
Open
feat(many): support current spacing tokens in the margin prop for v2 components#2587balzss wants to merge 1 commit into
balzss wants to merge 1 commit into
Conversation
…components Surface the current (era-3) spacing tokens (general.*, gap.*, padding.card.* dot-paths) on the `margin` prop of v2 components. View v2 already resolved them at runtime, but the `Spacing` type and component docs only advertised the older token eras. - emotion: add CurrentSpacingValues dot-path literals to the Spacing union and mark the legacy (era-1) and phased-out (era-2) unions as @deprecated - v2 components: sync the margin JSDoc to point at the spacing guide and use a current-token example - docs: rewrite the Layout Spacing guide to lead with the current tokens and demote the older eras to a "Deprecated tokens" section; update View/Flex/Tag README examples - tests: cover era-3 dot-path resolution in calcSpacingFromShorthand and add View v2 integration tests; add regression-test examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Visual regression report
Baselines come from the |
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.

Summary
Makes the current (era-3) spacing tokens —
general.*,gap.*, andpadding.card.*dot-paths — first-class on themarginprop of v2 components. View v2 already resolved them at runtime, but theSpacingprop type and the component/guide docs only advertised the two older token eras, so the new tokens had no autocomplete, no validation, and weren't documented.What's included
CurrentSpacingValues(era-3 dot-path literals) to theSpacingunion; mark the era-1 (OldSpacingValues) and phased-out era-2 (NewSpacingValues) unions as@deprecated. Non-breaking — old tokens still resolve.marginJSDoc to the canonical wording (link to the spacing guide, current-token example) across the v2props.tsfiles.calcSpacingFromShorthand, View v2 integration tests (general.spaceMd→0.75rem), and regression-test page examples.Scope / decisions
paddingprop and v1/legacy components intentionally left out.Verification
pnpm run test:vitest emotion(78 pass) andui-view(16 pass)pnpm run ts:checkclean; eslint 0 errorsRemaining
regression-testCypress/Chromatic) not yet run — page examples added.(string & {})) and fail silently at runtime; a louder dev-mode warning could be added as a follow-up.