refactor(emerald): extend v0 prop interfaces across the library - #802
Open
johnleider wants to merge 14 commits into
Open
refactor(emerald): extend v0 prop interfaces across the library#802johnleider wants to merge 14 commits into
johnleider wants to merge 14 commits into
Conversation
… ExpansionPanelGroup
…readcrumbs, Slider
…tarea, Checkbox, Switch
…s, TabsItem, List
…lect, SelectItem, Snackbar
…el, PaginationItem, SnackbarPortal, activators
…onents, PopoverContent
…nts, SnackbarQueue, TabsList
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.
The extends-sweep: 56 of Emerald's 74 hand-written
Em*Propsinterfaces now extend v0's exported prop types —Omit<XRootProps, 'as' | 'renderless'>for the 27 full mirrors (tracking v0), explicitPick<>key lists for the curated subsets (frozen surface), own-fields for DS-specific props. The 18 without a v0 counterpart (EmCalendar family, EmKanban, and the seven Atom-based presentational components) are unchanged.Consumer-facing fixes (the drift this closes)
ruleson EmTextField/EmTextarea accepts rule aliases and Standard Schema validators (inheritsInputRootProps['rules']).disabled/readonly/indeterminateaccept refs and getters (MaybeRefOrGetter) wherever v0 declares them — and the sevendata-disabled/data-readonlytruthy-test sites now resolve throughtoValue(), fixing styling that would have latched permanently on a ref input.EmTabsOrientation = TabsOrientation;EmSliderOrientation = NonNullable<SliderRootProps['orientation']>).Surface proof
Runtime prop surface diffed from the built bundle across all 90 components at every phase: identical — zero props added, removed, or renamed. The seven
toValuewraps are the only non-declaration lines in the 57-file diff. Emerald + dev-app typecheck, emerald build, lint, and the full non-browser suite (4869) all green.Notes for review
as/renderlessare deliberately excluded from every mirror: Emerald never forwards them, and inheriting them would have added lying props to 27 surfaces (the SFC compiler treats unresolved extends members as fallthrough attrs — discovered the hard way:Omit<X, keyof AtomProps>typechecks but breaks the build; literal key unions resolve).label?: InputRootProps['label']), keeping the drift pin.urgent, so every snackbar — includingvariant="error"— announces asrole="status"/polite. Follow-up issue filed.