Repository navigation
spec(AST-138): React Native component set (draft) - #12580
imdreamrunner wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Outcome: this needs an engineering owner's spec decision, and the record needs changes.
spec:AST-138 is a new draft whose requirements (FR1–FR38, DEC-1–DEC-8) no current record states. Approval needs an engineering owner to approve or amend them by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The record needs these fixes either way:
- Compact and regular width are never defined, but
spec:AST-012FR9 fixes compact as a width belowmdor a height below 500 on every platform, never platform size classes, so FR3, FR4, FR21, FR23 and the table rows should cite FR9. - FR25 names the list of stops
snapPointsonBottomSheetbutsheetAllowedDetentson sheet routes, and calls the resting stopdetent, which gives snap points a second name thatarchitecture:public-component-apiINV2 rules out. - FR27, the Toast row and DEC-5 describe
useToast().showToast"as webuseToastdoes", but webuseToast()returns the show function itself and falls back to its own viewport when there is noLayerProvider. - The Core table lists an
ItemGlyphmember that webItemdoes not have, and FR9 givesCarousela page indicator that webCarousellacks, which goes against FR2's web-parity rule. - FR15's
hidesWhenScrollingandobscuresBackgroundare neitheris*norhas*booleans, which goes against FR12 and FR37. SplitViewis tiered Essential although FR6, FR9 and FR21 keep it out of the set, and FR1's export check fails on the 35 rows that the table itself marks as not exported.- The FR8/FR9 verification row asks for deprecation tests of released names, but FR9 exports none of those names and the package has no releases.
- FR8 cites
spec:AST-112FR5 to keep glass containers off the package root, but that claim puts the platform core's views on., and the amended core includes glass surfaces.
Two smaller points: the native-pieces column disagrees with "Who uses it" for BottomSheet, InlineSheet, DropdownMenu and ContextMenu, and Current-state impact describes spec:AST-125 OQ4 more narrowly than #12554 asks it.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the record depends on the foundation amendment and the platform group records, and cites the foundation's package, surface, result and evidence claims. Verified: it cites those four claims, and 11 of the group records it names are not on
mainyet. - Claim: the native-first surfaces spec's core-and-platform contracts, portability, platform props and native-first rules apply, and so does the native guidelines order. Verified against the current records.
- Claim: the package is new, so no deprecated aliases are declared. Verified for FR9. The FR8/FR9 verification row still asks for deprecation tests.
- Claim: the navigation-hosts draft shows an Android More list past five destinations. Verified in #12554.
- Claim: that draft's OQ4 is about who draws Android's bottom toolbar. Not accurate: OQ4 asks whether Android has one at all.
- Claim: every web family, the TopNav and Toolbar slot names, BottomSheet snap points, Lightbox, List
reorderableand Carousel paging were mapped. Verified, except thatuseToast's shape and Carousel's page indicator do not match the web. - Claim: tiers of 75, 12, 11 and 7, ten kit parts and ten out-or-folded names. Verified by counting the table.
- Claim: no current or draft record owns the component set, and no open pull request overlaps. Verified on
main. A search of open pull requests finds only the cited dependency records. - Claim: the writing rubric found no narration, no pull request references, no build status, and one-line rejected alternatives. Verified.
- Claim: knowledge validation, Prettier, whitespace and leak checks pass. Verified: knowledge validation and Prettier pass at this head, with no trailing whitespace and no internal residue.
- File
docs/specs/AST-138-react-native-components/spec.md: eight blocking findings and two non-blocking notes (above).
…rding, export checks
There was a problem hiding this comment.
Outcome: this needs an engineering owner's spec decision, and one more fix to the record.
spec:AST-138 is a new draft whose requirements (FR1–FR38, DEC-1–DEC-8) no current record states, so approval needs an engineering owner to approve or amend them, including the two stated exceptions (a sheet route's sheetAllowedDetents beside snapPoints, and FR37's verb-form booleans), by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The eight fixes from the earlier review are in place, and this one is needed either way:
- Miss: FR23 makes more than five Android tab destinations at compact width a development error that points to
TabsGroupand the sidebar, but FR20 flattens a group's screens into the bar at compact width and FR21 shows no sidebar there, so on a phone the advice cannot clear the error; name a remedy that works at compact width, or state how a group collapses to one bar destination there.
Smaller, non-blocking points: FR10 sends scrollProps to FR27 (Toast) instead of FR29/FR30, "Who uses it" and the native-pieces column still disagree on a few rows, FR25 makes "detent" mean only the current stop while component:BottomSheet uses it for any stop, spec:AST-012 FR9 limits compact to presentation choices while FR21 also uses it for the tab layout, and the description's note on spec:AST-125 OQ4 no longer matches the record.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record depends on the foundation amendment and the platform group records, and cites the foundation's package, surface, result and evidence claims. Verified: it cites those four claims, and 11 of the platform records it names are not on
mainyet. - Claim: the native-first surfaces spec's core-and-platform contracts, portability, platform props, naming and native-first rules apply, and so does the native guidelines order. Verified against the current records.
- Claim: the package is new, so no deprecated aliases are declared. Verified: every migration name is absent, and the verification row checks that.
- Claim: the navigation hosts draft shows an Android More list past five destinations. Carried from the earlier review's read; the record's sentence is unchanged.
- Claim: that draft's OQ4 is about who draws Android's bottom toolbar, and FR6 answers it either way. Not accurate: the record now says OQ4 asks whether Android has one at all, and that the other answer changes FR6's row.
- Claim: every web family, the TopNav and Toolbar slot names,
useToast, BottomSheet snap points, Lightbox, Listreorderable, Token and Carousel paging were mapped. Verified;useToastnow matches the web. - Claim: tiers of 75, 12, 11 and 7, ten kit parts and ten out-or-folded names. Verified by counting the table.
- Claim: compact and regular follow the theme's one compact definition, with no platform size classes. Verified.
- Claim: the header search's two verb-form booleans are the one naming exception the record states. Verified.
- Claim: no current or draft record owns the component set, and no open pull request overlaps. Verified on
main; the open pull request search is carried from the earlier review. - Claim: the writing rubric found no narration, no pull request references, no build status, and one-line rejected alternatives. Verified.
- Claim: knowledge validation, Prettier, whitespace and leak checks pass. Verified at this head.
- File
docs/specs/AST-138-react-native-components/spec.md: one blocking finding and five non-blocking notes (above).
There was a problem hiding this comment.
Outcome: this needs an engineering owner's spec decision, and one fix to the record.
spec:AST-138 is a new draft whose requirements (FR1–FR38, DEC-1–DEC-8) no current record states, so approval needs an engineering owner to approve or amend them, including the two stated exceptions (a sheet route's sheetAllowedDetents beside snapPoints, and FR37's verb-form booleans) and the reading of the tab bar, sidebar or rail as a presentation chosen by compact, by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The three fixes from the earlier review are in place, and this one is needed either way:
- The compact definition (lines 168–174) now says compact "chooses a presentation by platform size classes", which
spec:AST-012FR9 andspec:AST-082FR11 forbid, and it no longer defines regular width; restore "and regular ("regular width") is every screen that is not compact. No component in the set chooses a presentation by platform size classes."
Smaller, non-blocking points: Current-state impact misses two touch points (missed by the earlier review) with spec:AST-125 (its Android bar-to-rail switch at 600 dp, and its ScreenView, ScreenScroll and SearchField names), and FR21's detail column and the ViewThatFits migration line (this record's FR9) still use the width classes for layout, which spec:AST-012 FR9 keeps for presentations.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record depends on the foundation amendment and the platform group records, and cites the foundation's package, surface, result and evidence claims. Verified: it cites those four claims, and the platform records it names are in open pull requests.
- Claim: the native-first surfaces spec's core-and-platform contracts, portability, platform props, naming and native-first rules apply, and so does the native guidelines order. Verified, except that the compact sentence now contradicts the native-first rule's size-class sentence (the finding above).
- Claim: the package is new, so no deprecated aliases are declared. Verified: no name is deprecated, and the verification row checks that each migration name is absent.
- Claim: the navigation hosts draft shows an Android More list past five destinations, and its open question on an Android bottom toolbar and search bar decides one row here. Verified in that draft.
- Claim: every web family, the top navigation and toolbar slot names, the toast hook, bottom sheet snap points, the media viewer, list reordering, tokens and carousel paging were mapped. Verified against the web package: every family folder has a row except the one the record names as outside the set.
- Claim: no current or draft record owns the component set, and no open pull request overlaps. Verified on the main branch and in the open pull request list.
- Claim: tiers of 75, 12, 11 and 7, ten kit parts and ten out-or-folded names, and the listed native essentials. Verified by counting the table and reading the essentials table.
- Claim: the header, tab, sheet, toast, list, media viewer and share shapes are as described. Verified against the requirements.
- Claim: compact and regular follow the theme's one compact definition, with no platform size classes. False: the record now says compact chooses a presentation by platform size classes, and regular width is no longer defined.
- Claim: the header search's two verb-form booleans are the one naming exception. Verified.
- Claim: the table of native pieces has one row per piece and matches the component table's native pieces column. Verified row by row.
- Claim: two open questions remain, each with two options. Verified.
- Claim: the writing rubric found no narration, no pull request references, no build status, and one-line rejected alternatives. Verified.
- Claim: knowledge validation, Prettier, whitespace and leak checks pass. Verified at this head.
- File
docs/specs/AST-138-react-native-components/spec.md: one blocking finding and two non-blocking notes (above).
…op rule; AST-125 touch points
There was a problem hiding this comment.
Outcome: this needs an engineering owner's spec decision, and one fix to the record.
spec:AST-138 is a new draft whose requirements (FR1–FR38, DEC-1–DEC-8) no current record states, so approval needs an engineering owner to approve or amend them, including the two stated exceptions (a sheet route's sheetAllowedDetents beside snapPoints, and FR37's verb-form booleans), the reading of the tab form and the detail column as presentations chosen by compact, and FR2's list of web props with no React Native form, by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. The three fixes from the earlier review are in place, and this one is needed either way:
- FR2 says
CodeBlockreports a failed copy throughonCopyError(lines 190–191), while its gap list two bullets later saysonCopyErrorhas no React Native form (lines 196–198); keep one statement and change the other, and the CodeBlock note in the component table, to match.
A smaller, non-blocking point: FR2's gap says five types differ from the web's without saying how (lines 205–209), and for Carousel the parenthetical is web's own hasSnap type, so state what React Native accepts there, since FR1 and FR9 route useSnapPaging through it.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record depends on the foundation amendment and the platform group records, and cites the foundation's package, surface, result and evidence claims. Verified: it cites those four foundation claims, and the platform records it names are in open pull requests.
- Claim: the native-first surfaces spec's core-and-platform contracts, portability, platform props, naming and native-first rules apply, and so does the native guidelines order. Verified against those records on the main branch.
- Claim: the package is new, so no deprecated aliases are declared, and migration lines map each name that is not in the set. Verified: no name is deprecated, and the export check row checks that each migration name is absent.
- Claim: the navigation hosts draft shows an Android More list past five destinations, and its open question on an Android bottom toolbar and search bar decides one row here. Verified in that draft.
- Claim: every web family and the named web APIs were mapped. Verified: every web family folder has a row except the one the record names as outside the set; the swipe and snap paging hooks are routed through the families that use them.
- Claim: no current or draft record owns the component set, and no open pull request overlaps. Verified on the main branch and in the open pull request search.
- Claim: tiers of 75, 12, 11 and 7, ten kit parts and ten out-or-folded names, and the listed native essentials. Verified by counting the component table and reading the essentials table.
- Claim: the header, tab, sheet, toast, list, media viewer and share shapes are as described. Verified against the requirements and, where they follow the web, against the web package.
- Claim: compact and regular follow the theme's one compact definition, with no platform size classes. Verified.
- Claim: web-parity families take web's prop names, so the code block uses its line-start and copy-error props, the list reorders through its reorder prop, and rows take web's swipe prop and item key. Partly false: the record's own gap list says the copy-error prop has no React Native form (the finding above); the other names match the web package.
- Claim: the header search's two verb-form booleans are the one naming exception. Verified.
- Claim: the table of native pieces has one row per piece and matches the component table's native pieces column. Verified: both tables name the same native pieces.
- Claim: two open questions remain, each with two options. Verified.
- Claim: the writing rubric found no narration, no pull request references, no build status, and one-line rejected alternatives. Verified.
- Claim: knowledge validation, Prettier, whitespace and leak checks pass. Verified at this head.
- File
docs/specs/AST-138-react-native-components/spec.md: one blocking finding and one non-blocking note (above).
| - By that rule: `CodeBlock` numbers its lines from `startLineNumber` and | ||
| reports a failed copy through `onCopyError`; `List` reorders through | ||
| `reorderable` (FR29), and the set has no `ReorderableList`; `Item` and | ||
| `ListItem` take swipe actions through web's `swipe` prop, made by | ||
| `createSwipe({leading, trailing, swipeBehavior})`, with `ListItem`'s | ||
| `itemKey`, and offer no `swipeActions` or `swipeBehavior` prop. | ||
| - FR2 gap: these web props have no React Native form: Calendar's and the | ||
| date inputs' `calendar` (with `InternationalizationProvider`), | ||
| CheckboxList's `isOptional` and `isRequired`, CodeBlock's `onCopyError`, |
There was a problem hiding this comment.
FR2 says CodeBlock reports a failed copy through onCopyError (lines 190–191), and two bullets later lists CodeBlock's onCopyError among web props with no React Native form, which FR2's first bullet says the React Native contract does not offer. The component table's CodeBlock note sides with the first. Keep one: drop it from the gap list if React Native reports a failed copy through it, or drop it from this sentence and the table note and say what React Native does when a copy fails.
| the menu props of Typeahead, BaseTypeahead and Tokenizer; and these | ||
| types differ from the web's: Carousel's `hasSnap` (a boolean or a snap | ||
| paging configuration), LayoutPanel's and ResizeHandle's `resizable`, | ||
| FileInput's `statusVariant` default, the date inputs' `calendar` | ||
| presentation, and Layout's children slots. |
There was a problem hiding this comment.
Non-blocking: these five types "differ from the web's" without saying how. For Carousel, "a boolean or a snap paging configuration" is web's own hasSnap type, and FR1 (lines 166–167) and FR9's Pager line route useSnapPaging through it. State each React Native type and default (FileInput's statusVariant default too, beside FR2's "same … defaults" for a Core family).
|
Closing in favour of one record per component: each React Native component gets its own platform record beside the core record (docs/specs/components//.react-native.spec.md), reviewed on its own. |
Depends on #12563 (AST-112 as amended; this record cites
spec:AST-112FR1, FR5, FR6 and FR15 as amended by #12563) and on the group records it cites: #12557 (AST-123), #12562 (AST-124), #12554 (AST-125), #12556 (AST-126), #12555 (AST-127), #12558 (AST-128), #12552 (AST-129), #12553 (AST-130), #12551 (AST-131), #12565 (AST-132), #12569 (AST-134), #12572 (AST-135), #12570 (AST-137). Merge order: #12576 → #12563 → the group records → this record.Exact decision needed
The React Native component set: which Astryx component families
@astryxdesign/react-nativeships, how each relates to the web component of the same name, which components stay out of it (template kit, out or folded, each with a migration line), and the API shape of the cross-cutting components: the screen container and insets, the header (one options record plus composed parts), tabs (record plus parts, width classes, the one tab accessory), sheet stops, toasts, list scroll ownership, the media viewer, share, the keyboard dock and search. It also ranks the component areas.Existing authority searched
spec:AST-112(React Native foundation): parent record. This record fixes the library layer's component list (FR1) and what the.and./navigationentries export (FR5).spec:AST-082(native-first surfaces): FR3 (core contract plus platform contracts, platform-only components fail with the supported platforms named), FR4 (portable core), FR5/FR8 (platform props and names) and FR11 apply; no claim settles which families a native package ships.spec:AST-093(native component guidelines): its order (platform control, platform guidelines, theme) applies to the library's components.spec:AST-017(release compatibility): the package is new, so the record declares no deprecated aliases; migration lines map each name that is not in the set to its replacement.spec:AST-123tospec:AST-132,spec:AST-134,spec:AST-135,spec:AST-137. "Who uses it" maps each native piece to the components of this set. Two touch points are named in Current-state impact:spec:AST-125's Android More list past five destinations (FR23 here refuses more than five at compact width and names remedies that work there), andspec:AST-125/OQ4(whether Android has a bottom toolbar and a Material search bar at all; FR6's Material bottom app bar forHeaderToolbaris one of its options, and the other answer changes that row).packages/core/src, labTabBar(component:TabBar), webTopNavandToolbarslot names,useToast,BottomSheetsnap points,Lightbox,Listreorderable,Token,CarouselwithuseSnapPaging.AST-138,component set,react native components, the author's open PRs): no overlap.No current or draft record owns the component set or the header and tab API shape.
Decision
The record states the set's membership (FR1 to FR9), the screen container and inset hooks (FR10), the header (FR11 to FR19), tabs (FR20 to FR24), presentations (FR25 to FR28), lists and scroll ownership (FR29, FR30), system surfaces (FR31 to FR34), the keyboard dock and search (FR35, FR36), naming (FR37) and the area ranking (FR38), with the full family table (family, tier, web counterpart, native pieces used, notes).
Screen, the navigators,Headerand its parts, tab parts andBottomAccessory,TabBar,InlineSheet,ActionSheet,KeyboardAccessoryView,PasteButton,SearchField,useShare, the system form ofAlertDialog,Lightbox, and List's grouped style, edit and reorder.Chip→Token/ToggleButton,Pager→Carousel, charts out,ViewThatFitsout,WebContent→WebView,DragDropsplit, …), each with a migration line.HeaderTitle,HeaderLargeTitle,HeaderSubtitle,HeaderTitleMenu,HeaderBack,HeaderSearch,HeaderToolbar,HeaderCustomView, withBarButton,BarMenu,BarSpacer,BarStatusinstartContent/endContent). Static and dynamic placement merged part by part, a first-frame guarantee with its test, a lazy-screen fallback, a conflict rule, and the same parts rendered in place as a compact bar in sheets, inline sheets and columns.BarMenurows are typed to the system-menu subset.spec:AST-012/FR9(no platform size classes).HeaderSearch'shidesWhenScrollingandobscuresBackgroundare the one naming exception FR37 states.TabsItem,TabsGroup,BottomAccessorywith'expanded'/'inline'), width classes that fold the split view into the tab model, Android defaults, and the drawnTabBar's circle button namedaction.CodeBlockusesstartLineNumberandonCopyError,Listreorders throughreorderable(noReorderableList), andItem/ListItemtake web'sswipefromcreateSwipewithitemKey(noswipeActions).detent,defaultDetent,onDetentChange,sheetInitialDetent; a detent is the snap point the sheet rests at, never a second list; the route keeps the stack options'sheetAllowedDetentsname for its snap points);useToast()returns the show function, which returnsdismiss, as on the web;ChatMessageListtakesscrollProps;Lightboxis public and the zoom pager internal; List's recycler props are contract, with a development warning when they are ignored in page flow.Who uses it (in the record, one row per native piece, matching the component table's native pieces column):
AstryxStackHostspec:AST-125AstryxStackScreenspec:AST-125Screen, the stack and tab navigators,Headerand its parts,BarButtonAstryxHeaderSlotspec:AST-125Headerand its partsAstryxTabsHostspec:AST-125TabsItemAstryxTabScreenspec:AST-125TabsItemAstryxTabAccessoryspec:AST-125BottomAccessoryAstryxGlassViewspec:AST-123Headerand its parts,BottomAccessory,TabBar,KeyboardAccessoryView,SearchBar,FloatingHeaderAstryxGlassContainerViewspec:AST-123Headerand its parts,TabBar,BarButtonGroupAstryxScrollEdgeViewspec:AST-123Headerand its partsAstryxMaterialViewspec:AST-123IconButton,AlertDialog,BottomSheet,ContextMenu,Dialog,DropdownMenu,Popover,HoverCard,InlineSheetAstryxGestureOwnerViewspec:AST-124Calendar,Carousel,CodeBlock,Item,Slider,Switch,Toast,BottomSheet,Resizable,InlineSheetAstryxDragSnapspec:AST-124Toast,BottomSheet,InlineSheet,ActionSheetAstryxSwipeRowspec:AST-124CheckboxList,Item,List,RadioList,TreeListAstryxZoomPagerspec:AST-124LightboxAstryxPanZoomViewspec:AST-124LightboxAstryxDragItemspec:AST-124ListAstryxDropZonespec:AST-124ListAstryxNativeButtonspec:AST-126ButtonAstryxNativeSliderspec:AST-126SliderAstryxNativeTextFieldspec:AST-126TextInputAstryxSegmentedControlspec:AST-126SegmentedControlAstryxDatePickerspec:AST-126DateInput,DateRangeInput,DateTimeInput,TimeInputAstryxPasteControlspec:AST-126PasteButtonAstryxVectorViewspec:AST-127Icon,FileTypeArt,VectorAstryxVectorInfospec:AST-127VectorAstryxIconViewspec:AST-127IconAstryxSymbolViewspec:AST-127IconAstryxSystemMenuspec:AST-128FileInput,Selector,ContextMenu,DropdownMenu,MoreMenu,Headerand its parts,BarButtonAstryxActionSheetspec:AST-128FileInput,ActionSheetAstryxPresentationHostspec:AST-128DateInput,DateRangeInput,MultiSelector,Selector,Tokenizer,BottomSheet,ContextMenu,DropdownMenu,Popover,ComplexSelector,PowerSearch, sheet routesAstryxModalHostspec:AST-128BottomSheet, drawn sheet routesAstryxSafeAreaProviderspec:AST-129Chat,Layout,Screen,Headerand its parts,TabBar,InlineSheet,KeyboardAccessoryView,VideoView, the inset hooks (FR10)AstryxKeyboardDockspec:AST-129Chat,BottomSheet,CommandPalette,Screen,KeyboardAccessoryViewAstryxSelectableTextspec:AST-129MarkdownAstryxHapticsspec:AST-130Button,CheckboxInput,Item,SegmentedControl,Selector,Slider,Switch,TabList,Toast,ToggleButton,BottomSheet,ContextMenu,InlineSheetAstryxClipboardspec:AST-130Chat,CodeBlock,Timestamp,PasteButtonAstryxBackspec:AST-130Headerand its parts (HeaderSearch),Drawer,Popover,HoverCard,SearchFieldAstryxFilePickerspec:AST-130FileInputAstryxWebViewspec:AST-131WebViewAstryxWebViewInfospec:AST-131WebViewAstryxAudiospec:AST-132VideoViewAstryxVideoViewspec:AST-132VideoViewOpen questions (no decision; the rest of the record holds under either answer): OQ1, whether the default navigation chrome is the system renderer or drawn chrome; OQ2, whether drawn header and tab chrome is specified in this record or in a later record gated on a green parity table.
Rejected alternatives
Claim scope and non-goals
Claims: the set's membership and tiers, the native-essential components' iOS and Android answers, the migration lines, and the API shape of the cross-cutting components named above. Out of scope: the native contracts (their own records), each component's full contract (its own record), routing semantics and the router protocol, capability APIs with no component, glass, material and the icon pipeline, a floating action button on Android, and the template kit's own API.
Evidence and implementation relationship
The record states the target component set. It was checked against the web packages' component docs and records at the base commit and against the React Native platform drafts it names. No public evidence links.
Writing rubric results
FR2 gap:the web props and types that have no React Native form.Scope
Components: React Native component set (
@astryxdesign/react-nativelibrary layer): membership and tiers; Screen, navigators, Header and its parts, tab parts, BottomAccessory, TabBar, sheets, Toast, List, ChatMessageList, Lightbox, share, keyboard dock, searchValidation
pnpm check:knowledge(node scripts/check-knowledge.mjs): no error or warning for this record. In the checkout used (a minimal install), the run reports the same repository-wide findings with and without this record (identical output), none in this record; a deliberate fault in this record is reported, so the record is validated.--checkon the record: "All matched files use Prettier code style!"git diff --check origin/main: cleanTokenandTokenizercomponent names, unchangedpnpm specs:forwas not run: no full install in the checkout used.