Repository navigation
spec(Toast): React Native platform record - #12850
imdreamrunner wants to merge 6 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.
Approval waits on an engineering owner's decision on this draft record, and four findings need fixing either way.
An engineering owner records the decision on component:react-native/Toast (FR1–FR7, AR1–AR3 and DEC-1 to DEC-3, including the new backGesture prop and DEC-1's per-window region) by commenting /approve-spec followed by the full head commit SHA; the author may do so as an engineering owner. The record also builds on spec:AST-124 FR3/FR5, spec:AST-123 FR7 and spec:AST-112 FR16/FR19, which are not on main yet.
Blocking:
- AR1 announces a type word the card never shows and skips re-announcing a same-text overwrite, which contradicts
component:ToastFR8 and FR9 andspec:AST-086FR7, so announce the toast's text as core does. - FR3 and DEC-1 leave a toast raised by the screen behind an open dialog under that dialog, which contradicts the record's own Intent ("above whatever window is in front") and
component:ToastFR12, which the family section calls equivalent. - FR5, ORD2 and the FR5 verification row fire
onHideafter the card leaves, whilecomponent:ToastFR3 fires it at dismissal, so code shared with the web would runonHideat different moments. - Current-state impact describes a React Native
Toast(withisBackSwipeAllowedandsurfaceMaterial) that is not in the repository, so name the pull request that holds that implementation and merge after it, or drop the gap lines until it lands.
Smaller points include FR1 listing Toast's props and useToast's options as one set, the Review checks cell stating two rules the body does not, the frontmatter listing the draft spec:AST-112, and the family section swapping core's FR13 and FR14.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the record sits on the knowledge-check change and merges after it. Verified: the base branch is that pull request's head.
- Claim: it cites three open group records and an amendment and merges after them. Verified: none of those claims is on
main. - Claim: the core Toast record is current and covers no React Native rendering. Verified.
- Claim: the native-first, announcement-owner and
LayerProvidertoastsetting references say what the description says. Verified against the records andLayerContext.ts. - Claim: no other open pull request adds a Toast React Native record. Verified by a repository search.
- Claim: the decision bullets describe the record. Verified, except that core's move into the top modal is not equivalent to the per-window region (see FR3 above).
- Claim: each requirement was read against the current React Native implementation, and every difference is a gap line. Unverified: no React Native Toast exists in the repository.
- Claim: the pull request is specification only. Verified: one Markdown file.
- Claim: the writing rubric results R1–R7. Verified: no rejected lines, no pull request references, open questions read "None.", and "not yet released" appears only in the lifecycle field and readiness cell.
- Claim: the knowledge check passes with no finding in this record. Verified (exit 0).
- Claim: Prettier and the whitespace check are clean. Verified.
- Claim: public text holds no internal context. Verified.
- File
docs/specs/components/Toast/Toast.react-native.spec.md: the four blocking findings above and six smaller points.
…nnouncement; no unverifiable gap lines
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record; this head fixes the four earlier blocking findings, and no new one blocks.
An engineering owner records the decision on component:react-native/Toast (FR1–FR7, AR1–AR3 and DEC-1 to DEC-3) by commenting /approve-spec followed by the full head commit SHA; the author may do so as an engineering owner. The decision covers the new backGesture prop (its name under the public-API naming rule, what its unset value does, and its Android behaviour, which spec:AST-124 leaves open), DEC-1's per-window LayerProvider, and FR3's tab-bar clearance and no-provider case. The record also builds on spec:AST-124 FR3/FR5, spec:AST-123 FR7 and spec:AST-112 FR16/FR19, which are not on main yet, so it merges after them.
Smaller, non-blocking points: the Contract at a glance and FR1 give web's Toast the useToast options (uniqueID, collisionBehavior, onHide), which web's Toast does not take, and do not say which surface takes backGesture; FR2's unset value is auto in spec:AST-124 FR3; core FR15 (toast-close) and core FR4's horizontal-intent rule are not mapped; and the Review checks cell, the frontmatter's draft spec:AST-112 and DEC-3's snackbar sentence need small corrections.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record sits on the knowledge-check change and merges after it. Verified: the base branch is that pull request's head.
- Claim: it cites three open group records and an amendment and merges after them. Verified: those claims exist only in their open pull requests, not on
main. - Claim: the core Toast record is current and covers no React Native rendering. Verified.
- Claim: the native-first, announcement-owner and
LayerProvidertoastsetting references say what the description says. Verified against the records and the layer context source. - Claim: no other open pull request adds a Toast React Native record, and the TopNav and TabBar records exist. Verified by a repository search.
- Claim: React Native offers web's
ToastanduseToastwith web's props and meaning, plusbackGesture. Partly verified: FR1 attaches the show options toToast(non-blocking). - Claim: a toast shows in the front window's region and floats over an open dialog, as core does on the web. Verified (FR3, DEC-1, ORD1).
- Claim: the card is core's layout on the inverted surface and is drawn. Verified (FR4, DEC-3); the snackbar sentence needs a correction.
- Claim: timer, dismissal,
onHideat dismissal, swipe and motion follow core. Verified (FR5–FR7, ORD2). - Claim: one announcement per show with the card's words, again on each replacement, no focus taken, a button alternative. Verified (AR1–AR3).
- Claim: the record carries no gap lines. Verified.
- Claim: each requirement was read against the current React Native implementation. Unverified: that implementation is not in the repository.
- Claim: the pull request is specification only. Verified: one Markdown file.
- Claim: writing rubric results R1–R7. Verified: no rejected lines, no pull request references, open questions read "None.", and "not yet released" appears only in the lifecycle field and readiness cell.
- Claim: the knowledge check passes with no finding in this record. Verified.
- Claim: Prettier and the whitespace check are clean. Verified.
- Claim: public text holds no internal context. Verified.
- File
docs/specs/components/Toast/Toast.react-native.spec.md: no blocking finding; the non-blocking points above.
…show options listed apart
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record, and two findings need fixing either way.
An engineering owner records the decision on component:react-native/Toast (FR1–FR7, AR1–AR3 and DEC-1 to DEC-3) by commenting /approve-spec followed by the full head commit SHA; the author may do so as an engineering owner. The decision covers the new backGesture prop (its name under the public-API naming rule and its Android behaviour, which spec:AST-124 leaves open) and DEC-1's per-window regions with FR3's automatic bar clearance and in-place fallback, which depart from spec:AST-059 FR6's single root toast viewport; the record also merges after spec:AST-124, spec:AST-123 and the spec:AST-112 amendment, which it builds on and which are not on main yet.
Blocking:
- The gap lines (lines 105–133) describe
@astryxdesign/react-native, which is not in this repository, onmainor in an open pull request, so none of them can be checked: name the pull request that adds the package and merge after it, or drop the lines until it lands. - Miss: FR3 (line 99) adds
toast.insetto the bar clearance, while core Toast FR6 andspec:AST-059FR6 say a settoast.insetedge replaces the provider's inset, so a ported web app's toasts would sit higher on React Native; say that a set edge replaces the bar clearance, or record the additive rule as a decision.
Smaller, non-blocking points: the readiness cell lists none of the gap lines, FR6 leaves out core's horizontal-intent rule that its gap line relies on, core FR15 (toast-close) is not mapped, DEC-1 does not say whose toast setting and which maxVisible count apply per window, and the Review checks cell, the frontmatter's draft spec:AST-112 and DEC-3's snackbar sentence need small corrections.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record sits on the knowledge-check change and merges after it. Verified: the base branch is that pull request's head.
- Claim: it cites three open group records and an amendment and merges after them. Verified: those claims exist only in their open pull requests, not on
main. - Claim: the core Toast record is current and covers no React Native rendering. Verified.
- Claim: the native-first, announcement-owner, gesture, surface-paint and
LayerProvidertoastsetting references say what the description says. Verified against the records and the layer context source. - Claim: the record follows the open TopNav and TabBar React Native records, and no other open pull request adds a Toast React Native record. Verified by a repository search.
- Claim: React Native offers web's
useToastwith core's show options and web'sToastwith its own props, with web's meaning, and addsbackGestureto both. Verified (FR1, FR2). - Claim: a toast shows in the front window's region and floats over an open dialog, as core does on the web, and the region stacks as core's viewport does. Partly verified: FR3's additive toast inset departs from core (blocking).
- Claim: the card is core's layout on the inverted surface and is drawn because no platform control holds it. Verified (FR4, DEC-3); the snackbar sentence needs a correction.
- Claim: timer, dismissal,
onHideat dismissal, swipe and motion follow core. Verified (FR5–FR7, ORD2). - Claim: one announcement per show with the card's words, again on each replacement, no focus taken, a button alternative. Verified (AR1–AR3).
- Claim: each place where the implementing package differs is a gap line, and each requirement was read against that package. Unverified: the package is not in the repository (blocking).
- Claim: the layer, drag arbitration, native drag, surface paint and announcements stay with their owners. Verified (ownership lines).
- Claim: no rejected alternatives are recorded. Verified.
- Claim: the pull request is specification only. Verified: one Markdown file.
- Claim: writing rubric results R1–R7. Verified: no rejected lines, no pull request references, open questions read "None.", gap lines name their requirement, and "not yet released" appears only in the lifecycle field and readiness cell.
- Claim: the knowledge check passes with no finding in this record. Verified.
- Claim: Prettier and the whitespace check are clean. Verified.
- Claim: public text holds no internal context. Verified.
- File
docs/specs/components/Toast/Toast.react-native.spec.md: the two blocking findings and the non-blocking points above.
| The gap lines below describe `@astryxdesign/react-native`, the package that | ||
| implements this record. |
There was a problem hiding this comment.
These gap lines describe @astryxdesign/react-native, which is not in this repository at this head, on main or in any open pull request (packages/native is @astryxdesign/native), so none of the twelve lines can be checked. architecture:knowledge-contracts INV32 lets a gap line state what the system does today that a requirement forbids. Name the pull request that adds the package and merge after it, or drop the gap lines until it lands.
There was a problem hiding this comment.
The package's source is not in this repository, so there is no pull request to name. The gap lines record where today's implementation differs from this record, in the same form as the other React Native platform records, Avatar among them. The owner has decided this, so the gap lines stay.
…ontal intent does not dismiss; readiness lists the gaps
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record, and two findings need fixing either way.
An engineering owner records the decision on component:react-native/Toast (FR1–FR7, AV1, ORD1–ORD3, PR1, AR1–AR3 and DEC-1 to DEC-3) by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The decision has to settle the new backGesture prop (its name under the <thing>Behavior rule, its default, and its Android behaviour, which the gesture record leaves open), DEC-1's region per window against the layer-inset record's single root toast viewport, and FR3's automatic bar clearance and in-place fallback against that record's once-declared bar inset and no-provider rule.
- The gap lines (lines 105–133) and the readiness cell's gap list (line 34) describe
@astryxdesign/react-native, which is not in this repository or in any open pull request, so none of them can be checked: name the pull request that adds the package and merge after it, or drop them until it lands. - Miss: FR1 (line 97) lists web
Toast's props withoutisExiting, which web's exportedToastPropsand theToastdocs carry, so a web caller that rendersToastwith it does not port: add it to FR1's list with web's meaning, or say why it stays on the web.
This head fixes the additive toast.inset, the missing horizontal-intent rule and the readiness gap list, and an inline note asks how FR3's automatic bar clearance combines with a LayerProvider inset.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record is stacked on the knowledge-check change (#12592) and merges after it. Verified: the base branch is that pull request's head, which adds the
react-nativerecord language. - Claim: the record also cites the open gesture (#12562), surface (#12557) and foundation-amendment (#12563) records and merges after them. Verified: all three are open drafts, and FR1, FR2, FR4, FR6 and FR7 cite them.
- Claim: core Toast is current and has no React Native rendering. Verified in the core Toast record.
- Claim: the native-first, announcement and native-guideline records are current with the clauses listed. Verified in each record.
- Claim:
LayerProvider'stoastsetting takesposition,maxVisibleandinset. Verified: the provider passes all three to the toast viewport. - Claim: React Native records for TopNav (#12685) and TabBar (#12686) are open, and no other open pull request adds a Toast React Native record. Verified.
- Claim: React Native offers web's
useToastwith core's options and web'sToastwith its own props. Partly false: the show options match, but the record'sToastlist leaves outisExiting. - Claim: no React Native implementation exists in this repository. Verified: no package under
packages/is the React Native library. - Claim: each place where the implementing package differs is a gap line. Cannot be verified: the package is not in the repository.
- Claim: the rubric finds no narration, research, rejected alternatives, pull request references, open options or project status. Verified: the record keeps no rejected lines or pull request references, Open questions reads None, and "not yet released" appears only in the lifecycle field and the readiness cell.
- Claim: the knowledge check, Prettier and the whitespace check are clean. Verified at this head: the knowledge check reports no finding in this record, and Prettier and the whitespace check are clean.
- File
docs/specs/components/Toast/Toast.react-native.spec.md: the two blocking findings above; non-blocking notes on FR3's provider inset, core FR15, DEC-1's per-window settings,ToastViewportand DEC-3.
…he automatic clearance
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record; this head adds web's isExiting to FR1, and no blocking finding remains.
An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner); it covers FR1–FR7, AR1–AR3 and DEC-1 to DEC-3, and in particular:
backGestureonToastand theuseToastshow options:architecture:public-component-apiINV2/INV3 name a prop that chooses how a component responds to input<thing>Behavior, with a named default, andspec:AST-124OQ2 still leaves its Android behaviour open.- DEC-1's per-window toast regions, where
spec:AST-059FR6 keeps a nestedLayerProviderinert and the toast viewport the root provider's. - FR3's automatic tab-bar clearance and its in-place card without a
LayerProvider, wherespec:AST-059FR6 clears only a bar the app declares and renders a toast with no provider as under a default one. - FR1, FR2, FR4, FR6 and FR7 also rest on
spec:AST-124,spec:AST-123and thespec:AST-112amendment, which are still open.
The gap-line point is settled by your answer that @astryxdesign/react-native lives outside this repository. Non-blocking: the readiness cell (line 34) should also list isExiting among FR1's gaps, and core FR15 (toast-close) and ToastViewport are not yet mapped.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record is stacked on the knowledge-check change and merges after it and the open gesture, surface and foundation records. Verified: the base is that change's branch, and the record cites those three open records.
- Claim:
component:Toast,spec:AST-082,spec:AST-086andLayerProvider'stoastsetting are the existing authority. Verified against main. - Claim: React Native offers web's
useToastandToastwith web's meaning and addsbackGesture. Verified: FR1 now matches web'sToastprops and show options,isExitingincluded;backGesturewaits on the owner decision. - Claim: a toast shows in the front window's region, clear of the safe area and the app's bars. Verified as FR3 and DEC-1 state it; it departs from
spec:AST-059FR6 and waits on the owner decision. - Claim: the timer, dismissal paths,
onHide, swipe, motion and announcement follow core. Verified against core FR2–FR5, FR8 and FR9. - Claim: each difference from the implementing package is a gap line. Verified in form for FR1–FR7 and AR1; the package itself is outside this repository.
- Claim: no rejected alternatives are recorded, and Open questions reads "None". Verified.
- Claim: the knowledge check, Prettier and
git diff --checkpass. Verified at this head. - File:
docs/specs/components/Toast/Toast.react-native.spec.md: non-blocking notes only (readiness list, FR15,ToastViewport, DEC-1's per-window settings, DEC-3's snackbar wording).
| | Behavior | A toast is a card drawn from the theme in the toast region of the front window, at the edge `position` names, newest nearest that edge, clear of the safe area and the app's bars, so it floats over an open dialog (DEC-1). It auto-hides after `autoHideDuration` (info yes, error no), pausing while it is touched or read, and dismisses by its button, a swipe toward its edge, or code. It is announced once when it shows and never takes focus. | | ||
| | End-user impact | A person gets brief notices that never block the screen, hears each one once with VoiceOver or TalkBack, swipes one away toward its edge, or presses its dismiss button. | | ||
| | Builder impact | Web code that raises toasts with `useToast` or renders `Toast` ports unchanged; a `LayerProvider` at the app's root holds the region. An app with a tab bar or a floating bar gets its toasts above it. | | ||
| | Compatibility/readiness | Not yet released; additive. Draft. Requirement gaps: FR1 (`useToast`, `renderContent`), FR2 (`isBackSwipeAllowed`), FR3 (centred positions, nearest region), FR4 (paint, width), FR5 (timer, `onHide`), FR6 (swipe rule), FR7 (entrance and collapse), AR1 (type word, overwrite). | |
There was a problem hiding this comment.
Non-blocking: this cell lists FR1's gaps as useToast and renderContent, but the FR1 gap line this head rewrote (line 111) also names isExiting; add it so the projection matches the body.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on this draft record, and one description fix is needed either way.
An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may, as an engineering owner); it covers FR1–FR7, AR1–AR3 and DEC-1 to DEC-3, and in particular:
backGestureonToastand theuseToastshow options:architecture:public-component-apiINV2/INV3 name a prop that chooses how a component responds to input<thing>Behavior, with a named default (for examplebackGestureBehaviorwith'auto'as its default), andspec:AST-124OQ2 still leaves its Android behaviour open.- DEC-1's per-window toast regions, where
spec:AST-059FR6 keeps a nestedLayerProviderinert and the toast viewport the root provider's. - FR3's automatic tab-bar clearance and its in-place card without a
LayerProvider, wherespec:AST-059FR6 clears only a bar the app declares and renders a toast with no provider as under a default one. - FR2, FR4 and FR6 also rest on the open
spec:AST-124andspec:AST-123drafts, and FR1 and FR7 onspec:AST-112FR10 and FR19, whichmainholds in a draft record.
Blocking, needs fixing either way:
- The description's merge-order paragraph says the record cites the
spec:AST-112amendment for FR16, but this head cites FR10 instead (lines 36 and 97) and that amendment has already merged, so please update that sentence.
Non-blocking: the readiness cell (line 34) should also list isExiting among FR1's gaps, and core FR15 (toast-close) and ToastViewport are not yet mapped.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the record is stacked on the knowledge-check change and merges after it. Verified: the base is that change's branch.
- Claim: the record also cites the open gesture and surface records and the foundation amendment for FR16 and FR19, and merges after them. False in part: the gesture and surface records are still open drafts, but the foundation amendment has merged, and this head cites the foundation record's FR10 and FR19, not FR16 (lines 36, 97, 103).
- Claim: core Toast, the native-first and announcement records and
LayerProvider'stoastsetting are the existing authority. Verified against main. - Claim: no other open pull request adds a Toast React Native record. Verified by a repository search.
- Claim: React Native offers web's
useToastandToastwith web's meaning and addsbackGesture. Verified as FR1 and FR2 state it;backGesturewaits on the owner decision. - Claim: a toast shows in the front window's region, clear of the safe area and the app's bars. Verified as FR3 and DEC-1 state it; it departs from
spec:AST-059FR6 and waits on the owner decision. - Claim: the card is core's layout on the theme's inverted surface and is drawn. Verified against core FR1 and the native-first record.
- Claim: the timer, dismissal paths,
onHide, swipe, motion and announcement follow core. Verified against core FR2–FR5, FR8 and FR9. - Claim: each difference from the implementing package is a gap line. Verified in form for FR1–FR7 and AR1; the package itself is outside this repository.
- Claim: no rejected alternatives are recorded, Open questions reads "None", and the writing rubric finds no narration or project status. Verified.
- Claim: web parity now cites the foundation record's FR10, which an open follow-up makes the home of the old FR16. Verified: lines 36 and 97 cite FR10, and that follow-up folds FR16 into FR10.
- Claim: the knowledge check, Prettier and
git diff --checkpass. Verified at this head. - File:
docs/specs/components/Toast/Toast.react-native.spec.md: non-blocking notes only (readiness list, FR15,ToastViewport, DEC-1's per-window settings, DEC-3's snackbar wording).
Stacked on #12592 (react-native records in the knowledge checks); merges after it.
Merge order: the record also cites the open group records
spec:AST-124(#12562, gestures and drag) andspec:AST-123(#12557, surfaces and glass), and the AST-112 amendment (#12563) for FR16 and FR19. It merges after those too.Exact decision needed
How React Native's
Toastimplementscomponent:Toast: which props and exports it offers, where a toast shows on each window, the card's look, the timer and the swipe on a phone, its motion, and how screen readers hear it.Existing authority searched
component:Toast(docs/specs/components/Toast/Toast.spec.md, current):useToast,ToastViewport, the card, timing, swipe, stacking, deduplication and the announcement; no React Native rendering.spec:AST-082(current): FR3–FR5 (core and platform contracts), FR7 (base props), FR11 (native-first; a custom control only where the platform has none that satisfies the contract) and DEC-2 (native-only visuals are theme configuration).spec:AST-086(current) FR1: one announcement owner per toast.spec:AST-124(open draft) FR3 and FR5: drag frames,backGestureand the native drag;spec:AST-123(open draft) FR7: the floating-surface paint.LayerProvider'stoastsetting (position,maxVisible,inset), which core already offers for the toast viewport.Decision
docs/specs/components/Toast/Toast.react-native.spec.md(component:react-native/Toast,platform_of: component:Toast):useToast(with core's show options) and web'sToast(with its own props), with web's meaning, and addsbackGestureto both, which says when a back gesture may take a drag on the card (FR1, FR2, DEC-2).LayerProvider, and a toast shows in the topmost open one, so it floats over an open dialog whichever screen raised it, as core's FR12 does on the web. The region stacks as core's viewport does, clear of the safe area and the app's bars (FR3, DEC-1).onHideat the dismissal and the swipe follow core on a phone; the card's drag runs on the UI thread where the native drag is present (FR5, FR6). Entrance and exit follow core's motion, with a fade under Reduce Motion (FR7).@astryxdesign/react-native, the package that implements the record, differs is a gap line under the requirements.Rejected alternatives
None recorded in the record.
Claim scope and non-goals
The record covers only what React Native adds to
component:Toastor does differently. The layer, drag arbitration, the native drag, the surface paint and announcements stay with their owners, which the record's ownership lines name.Evidence and implementation relationship
No React Native implementation exists in this repository. The record states the target behavior, and its verification map names the evidence for each requirement: unit tests of the package, Simulator and emulator captures, touch checks, and VoiceOver and TalkBack checks. Where the behavior does not meet the target, the record lists a requirement gap line (FR1–FR7, AR1).
Writing rubric results
Rejected:lines.FRn gapandARn gaplines; "not yet released" appears only in the template's lifecycle field and readiness cell.Scope
Components: Toast (React Native)
Validation
node scripts/check-knowledge.mjs: knowledge templates and records are aligned; no finding in this record.--checkclean on the record.git diff --check: clean.Follow-up: claims moved from
spec:AST-112Cites
spec:AST-112FR10 for web parity, where #13029 folds FR16.