Conversation
|
Visual regression report✅ No changes.
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.
Description
Extends View v2 (and the shared
ThemeablePropValuesenums) so the style props accept the new shared design tokens in addition to the existing legacy values. All legacy values keep working, so this is purely additive for consumers.New values now accepted by View v2:
shadow—elevation1,elevation2,elevation3,elevation4(alongside legacyresting/above/topmost/none).borderWidth—sm,md,lg(alongside legacysmall/medium/large).borderRadius— the shared radius scalexs,sm,md,lg,xl,xxl,fullplus the card radiicard.sm/card.md/card.lgandcard.nestedContainer.sm/.md/.lg(alongside legacysmall/medium/large,circle,pill, and raw CSS lengths).borderColor— the shared stroke tokensstrongColor,visualSeparatorand the accent palette (accentAsh,accentAurora,accentBlue,accentGreen,accentGrey,accentHoney,accentOrange,accentPlum,accentRed,accentSea,accentSky,accentStone,accentViolet) — in addition to the legacy contextual colors and any valid CSS color string.Supporting changes:
packages/emotion— added the newelevation1–elevation4shadow values andsm/md/lgborder-width values toThemeablePropValues.Viewv1,ContextView,Popover,Expandable) — theshadowprop type is inlined to the legacy union ('resting' | 'above' | 'topmost' | 'none') so the v1 API stays unchanged and does not surface the new elevation values.View/v2/styles.ts— maps each new value to the correspondingsharedTokensentry.No breaking changes — existing prop values are preserved.
Test plan
pnpm run test:vitest ui-viewpasses.pnpm run dev), open the View page and verify the shadow, borderWidth, borderRadius, and borderColor examples render, including the newly addedelevation4,card.md,lgradius, and accent color examples.shadow="resting",borderWidth="small",borderRadius="medium",borderColor="primary") still render identically to before.View/ContextView/Popover/Expandablestill type-check and theirshadowprop only accepts the legacy values.pnpm run ts:check/ references check).INSTUI-4945