Repository navigation
Conversation
An app that draws its own tab bar gets TabBar's behavior from useTabBar, as values and props: the selection, More, names, roving focus and the lens's state. TabBar renders through it, and an action beside the tabs is never a tab. DEC-1 waits for the spec owner.
The family line no longer names another component as built on its hook; the record cites spec:AST-107 DEC-1 and FR7 alone.
FR12: while the on-screen keyboard is up, TabBar is not drawn over or above it, and it returns when the keyboard goes down. It reads whether a keyboard is up through Core's internal keyboard entry. OQ1 asks whether the bar hides, as FR12 reads, or rides above the keys.
FR8 to FR12 wait for a human decision, and the record names their gaps: no useTabBar exists, and TabBar reads no keyboard state.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
As gesture hooks sit on factories, createTabBar gives the bar's behavior without React, useTabBar delegates to it, and TabBar is built on it, so INV21 and INV22 apply as written. FR12's basis says the bar shows above the keys once the page pans, and at once where the window resizes.
There was a problem hiding this comment.
This draft needs an engineering owner's decision before it can be approved, and two record fixes stand either way.
Owner decision: an engineering owner approves or rejects DEC-1 and the draft FR8–FR12, AR3 and PR2, which no current record states yet, and rules whether architecture:public-component-api INV21 also covers a component built entirely on a public hook (today it covers only a hook or component built entirely on a public factory). The owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking fixes:
- FR12 (
TabBar.spec.md:111) citesspec:AST-099FR3 for a Core internal keyboard entry that Core does not export and thatarchitecture:react-component-runtimeINV11 keeps out of Lab, so cite AST-099's amendment once it is current, or until then state the detection INV11 allows and drop the resizing-host clause and "useTabBarexposes it". - The Representative states row for a focused field (
TabBar.spec.md:129) allows "Hide or ride" although FR12 and its verification row fail a bar drawn above the keyboard, so align the row with FR12, or word FR12 as the outcome both options share and leave the choice to OQ1.
The review also lists four smaller, non-blocking points: FR8's option list against the concepts row, onLensMove's missing unit and direction, the build-status wording of the FR8–FR11 gap line, and citations of AST-107 DEC-1 and FR7 and of INV10 that claim more than those clauses state.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: the TabBar docs tell callers not to use it for actions. Verified (
TabBar.doc.mjs:163). - Claim: the knowledge check passes. Verified (exit 0 at this head).
- Claim: TabBar callers change nothing and the hook is additive. Verified: the FR1–FR7 rows are unchanged.
- Claim: TabBar reads no keyboard state today. Verified: there is no keyboard or visual-viewport read under
packages/lab/src/TabBar/. - Claim: the record keeps no pull request or issue references (R5). Verified.
- Claim: the record states no project status (R7). False: the FR8–FR11 gap line says the hook does not exist (
TabBar.spec.md:113). - Claim: no answered open question still lists its options (R6). Contestable: FR12 already reads as hide (
TabBar.spec.md:111), while OQ1 keeps both options. - Claim: the gesture-hooks record gives products values and props. Partly false: it gives values and one method each.
- Claim: Lab reads the keyboard through a shared value that is decided separately. True of the description, but the record cites the current keyboard requirement for it instead (
TabBar.spec.md:111). - Claims about bundle sizes and device captures: stated in the description only and not reproduced. They are not record content.
- File
docs/specs/components/TabBar/TabBar.spec.md: two blocking findings and four non-blocking points, listed above.
There was a problem hiding this comment.
This draft needs an engineering owner's decision before it can be approved, and four record fixes stand either way.
Owner decision: an engineering owner approves or rejects DEC-1 and the draft FR8–FR12, AR3 and PR2 in component:TabBar, which no current record states yet, including OQ1's hide-or-ride choice. The owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking fixes:
- FR12 (
TabBar.spec.md:113) reads the keyboard through a Core entry thatarchitecture:react-component-runtimeINV11 keeps out of Lab, detects it in a resizing host wherespec:AST-099FR2's height is 0, and under ride would export the height AST-099 FR3 forbids, so state the detection INV11 allows until the AST-099 amendment is current. - The states row at
TabBar.spec.md:131allows "Hide or ride (OQ1)" although FR12 forbids a bar drawn above the keyboard, so set it to "None" or word FR12 as what hide and ride share. createTabBarreturns only{update, destroy}(TabBar.spec.md:109) yet must report the lens state, the shown tabs and the tabs past the fourth (:89,:43,:175), so give it the state channel its hook returns.createTabBartakes nolabelsoption for the More and badged-tab names it sets (TabBar.spec.md:109,:146), whicharchitecture:internationalizationINV3a requires of a factory the record calls INV22's equivalent.
Non-blocking notes on citations, FR8's option list and a build-status gap line are in the review.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: AST-107 gives products values and props from a factory and its hook. Overstated: its DEC-1 says values and one method each, and DEC-2 and FR7 cover gesture and motion APIs.
- Claim: INV21 counts the factory, the hook and TabBar as one API. True as written once TabBar is built on the factory.
- Claim: INV22's non-React equivalent exists. False as specified: the factory returns none of the hook's state.
- Claim: TabBar's doc says not to use it for actions. True (
TabBar.doc.mjs:163). - Claim: the knowledge check passes. True: it exits 0 at this head.
- Claim: Prettier and the diff whitespace check are clean. The whitespace check is clean.
- Claim: writing rubric R7 finds no project status. False: line 115 states build status.
- Claim: writing rubric R5 finds no pull request or issue references. True.
- Claim: FR12's device findings. Stated in text with device, browser and result; accepted as stated.
- Claim: Option B's 67 B and the page sizes. Not verified; they decide nothing here.
- File:
docs/specs/components/TabBar/TabBar.spec.md: four blocking findings, three non-blocking notes.
createTabBar reports the hook's state through getState() and onStateChange, and takes labels for the names it sets. FR12 states the outcome and exposes whether a keyboard is up, never its height; OQ2 asks how Lab reads the keyboard. The focused-field state row allows no variation, and citations claim only what their clauses state.
|
Also in 2fc0303: the citations now give |
There was a problem hiding this comment.
This draft needs an engineering owner's decision before it can be approved, and one record fix stands either way.
Owner decision: an engineering owner approves or rejects DEC-1 and the draft FR8–FR12, AR3 and PR2 in component:TabBar, which no current record states yet, including OQ1's hide-or-ride choice. FR12 also needs a keyboard read where the window resizes for the keyboard, which spec:AST-099 FR1–FR2 and architecture:react-component-runtime INV11 do not give Lab today (OQ2), so FR12 stays on hold until those claims are updated on main or FR12 drops that host. The owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking fix:
- FR12 (
TabBar.spec.md:113) hascreateTabBaranduseTabBarexpose whether a keyboard is up, but FR8'sgetState()andonStateChangelist (:109), the concept rows (:89-90) and the verification rows leave that value out, so add it there and give it a test row.
The earlier fixes to the keyboard entry, the states row, the factory's state, labels and the gap line are all in; a non-blocking note on the empty architecture frontmatter list is in the review.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the factory and hook cover the shown tabs, the selection, choosing and reselecting, More, roles, names, roving focus and the lens's state. True (FR8, FR9).
- Claim: TabBar is built on the factory. True (FR10).
- Claim: the factory under the hook follows AST-107 DEC-2, so INV21 counts the three as one API and INV22's equivalent exists. True as written.
- Claim: both take TabBar's props, with items in place of children. Overstated: FR8 lists value, onChange, onReselect, moreValue and label, not the aria naming props.
- Claim: the hook returns the tab list's props, each tab's props and state, the tabs past the fourth and the lens's state. True, but FR12 adds a keyboard value that this list omits (the blocking fix).
- Claim: an action beside the tabs is never a tab. True (FR11).
- Claim: FR12's wording and the hide-or-ride question. True as quoted.
- Claim: Lab's keyboard read is proposed separately, and FR12 drops if it is declined. Consistent with OQ2.
- Claim: TabBar's doc says not to use it for actions. True.
- Claim: no other open pull request touches TabBar or its record. True apart from the keyboard probe page the description names.
- Claim: FR12's device findings. Stated in text with device, browser and result; accepted as stated.
- Claim: Option B's 67 B and the page sizes. Not verified; they decide nothing here.
- Claim: the writing rubric finds no issues. True at this head.
- Claim: the knowledge check passes, and Prettier and the whitespace check are clean. True.
- File:
docs/specs/components/TabBar/TabBar.spec.md: one blocking finding, one non-blocking note.
FR8's state and both concept rows carry whether a keyboard is up, as FR12 exposes it, and a unit-test row covers it. The record lists the architecture records it cites.
|
Also in bf7fe34: the |
There was a problem hiding this comment.
This draft needs an engineering owner's decision before it can be approved; the earlier fix for the keyboard value in the factory's state is in, and one record fix stands either way.
Owner decision: an engineering owner approves or rejects DEC-1 and the draft FR8–FR12, AR3 and PR2 in component:TabBar, which no current record states yet, including OQ1's hide-or-ride choice. FR12 also needs a keyboard read where the window resizes for the keyboard, which spec:AST-099 FR1–FR2 and architecture:react-component-runtime INV11 do not give Lab today (OQ2), so FR12 stays on hold until those claims are updated on main or FR12 drops that host. The owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Blocking fix:
- Miss: the compatibility lines (
TabBar.spec.md:49and:66) still say a bar of five tabs or fewer renders as before with its released default preserved, but FR12 hides every bar while the on-screen keyboard is up, so state that change in both.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the factory and hook hand a drawn bar the shown tabs, the selection, choosing and reselecting, More, roles, names, roving focus and the lens's state. True (FR8, FR9).
- Claim: TabBar is built on the factory. True (FR10).
- Claim: the factory under the hook follows the gesture hooks' shape, so the one-API rule counts the three as one and the non-React equivalent exists. True as written.
- Claim: both take FR8's options, and the factory also takes a state callback and labels. True (FR8).
- Claim: the hook returns the tab list's props, each tab's props and state, the tabs past the fourth, the lens's state and whether a keyboard is up. True (the hook's concept row).
- Claim: the factory sets the attributes itself and reports the same state. True (FR8, AR3).
- Claim: an action beside the tabs is never a tab. True (FR11).
- Claim: FR12's wording and the hide-or-ride question. True as quoted.
- Claim: how Lab reads the keyboard is proposed in a separate pull request, and FR12 drops if it is declined. Consistent with OQ2; that pull request proposes the read.
- Claim: the gesture-hook record rejects exporting gesture machinery, and a hook without a factory would miss the non-React rule. True.
- Claim: the keyboard record keeps the keyboard value internal and the runtime record keeps its measure unexported. True.
- Claim: the touch-presentation record and the keyboard record's first requirement decide neither part. Partly: that first requirement has a Lab component use the shared keyboard height, the conflict OQ2 records.
- Claim: TabBar's doc says not to use it for actions. True.
- Claim: no other open pull request touches TabBar or its record. True by search, apart from the probe page the description names.
- Claim: TabBar callers change nothing, and the change is additive. True for caller code and the API; FR12 still changes what every bar does while the keyboard is up (the blocking fix).
- Claim: FR12's device findings. Stated in text with device, browser and result; accepted as stated.
- Claim: Option B's cost and the page sizes. Not verified; they decide nothing here.
- Claim: this pull request changes records only. True.
- Claim: the writing rubric finds no issues. True at this head.
- Claim: the knowledge check passes, and Prettier and the whitespace check are clean. True.
- File:
docs/specs/components/TabBar/TabBar.spec.md: one blocking finding, one non-blocking note.
| | FR9 | `createTabBar` and `useTabBar` MUST hand out values and props only, never a gesture recognizer, an arena or an animator. The lens is state: `lifted` while a finger holds it over a tab, `dragging` while it moves across the tabs, `settling` as it comes to rest on the chosen tab, and `rest`, each with the index of the tab it is over. `onLensMove` reports the lens's center while it drags, in CSS pixels from the tab list's inline-start edge toward its inline end. | `spec:AST-107` DEC-1 | human decision | | ||
| | FR10 | `TabBar` MUST be built entirely on `createTabBar`, through `useTabBar`, so the component and a bar built on either choose, reselect, rove and move the lens alike. | DEC-1; `architecture:public-component-api` INV21 | human decision | | ||
| | FR11 | An action beside the tabs, such as a compose button, MUST NOT be a tab: it sits outside the tab list, has no `aria-selected`, is not in the arrow keys' order, and takes none of the five slots. `createTabBar` and `useTabBar` give it no props. | The WAI-ARIA tabs pattern: a tab list holds only tabs; `TabBar.doc.mjs`: "Don't use it for actions" | human decision | | ||
| | FR12 | While the on-screen keyboard is up, TabBar MUST NOT be drawn over or above it; it MUST return when the keyboard goes down. `createTabBar` and `useTabBar` expose whether a keyboard is up, never its height (`spec:AST-099` FR3). How Lab reads the keyboard is OQ2. | Device captures with a field focused: above the keys at once where the window resizes (`interactive-widget=resizes-content`); in iPhone Safari a sliver under its address bar, and the whole bar once a scroll completes the pan; in an iPhone Home Screen app behind the keyboard's accessory bar; in Android Chrome covered, and partly shown after a scroll | human decision | |
There was a problem hiding this comment.
Non-blocking (miss): spec:AST-099 FR1 and FR3 list "tab bar search" among the components that position from the keyboard height, so above the keys, while this row keeps TabBar from being drawn over or above the keyboard. TabBar has no search tab today, so nothing conflicts yet; when FR12 and OQ1 are ruled, consider saying whether a search tab is exempt.
There was a problem hiding this comment.
Noted for the ruling. TabBar renders no search tab today, so whether one is exempt can be stated when FR12 and OQ1 are ruled.
The compatibility lines say every bar hides while the on-screen keyboard is up (FR12), and keep the rest of the released default.
There was a problem hiding this comment.
This draft needs an engineering owner's decision before it can be approved; the compatibility-line fix from the last review is in, and no record fix remains.
Owner decision: an engineering owner approves or rejects DEC-1 and the draft FR8–FR12, AR3 and PR2 in component:TabBar, which no current record states yet, including OQ1's hide-or-ride choice. FR12 also needs a keyboard read where the window resizes for the keyboard, which spec:AST-099 FR1–FR2 and architecture:react-component-runtime INV11 do not give Lab today (OQ2), so it stays on hold until those claims are updated on main or FR12 drops that host. The owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
Claims and files checked
Review mode: full; reason: spec-record
- Claim: the factory and hook hand a drawn bar the shown tabs, the selection, choosing and reselecting, More, roles, names, roving focus and the lens's state, and the app draws every element and the lens. True (FR8, FR9).
- Claim: TabBar is built on the factory. True (FR10).
- Claim: the alternative is a tab-face render prop and an action slot on TabBar. True (DEC-1's rejected line).
- Claim: the factory under the hook follows the gesture hooks' shape, so the one-API rule counts the three as one and the non-React equivalent exists. True as written.
- Claim: an action beside the tabs is never a tab, under either option. True (FR11).
- Claim: FR12's wording and the hide-or-ride question. True as quoted (FR12, OQ1).
- Claim: hiding needs only whether a keyboard is up, and riding needs the height except where the window shrinks. True (OQ1).
- Claim: how Lab reads the keyboard is proposed in a separate pull request, and FR12 drops if that item is declined. Consistent with OQ2; that pull request proposes the read.
- Claim: the current TabBar record covers More, disabled tabs and the More label, not a drawn bar or an action. True.
- Claim: the gesture-hook record gives products values and one method each, never the machinery, and puts a factory under each hook. True.
- Claim: the keyboard record keeps the keyboard value internal and the runtime record keeps its measure unexported. True.
- Claim: the touch-presentation record and the keyboard record's first requirement decide neither part. True for hide or ride; that first requirement does bind how Lab detects the keyboard, which OQ2 records.
- Claim: TabBar's doc says not to use it for actions. True.
- Claim: no other open pull request touches TabBar or its record. True by search, apart from the probe page the description names.
- Claim: both take FR8's options, and the factory also takes a state callback and labels. True for the factory (FR8); the record does not say which of these the hook takes.
- Claim: the hook returns the tab list's props, each tab's props and state, the tabs past the fourth, the lens's state and whether a keyboard is up. True (the hook's concept row).
- Claim: the factory sets the attributes itself and reports the same state. True (FR8, AR3).
- Claim: the change is additive, except that every bar hides while the on-screen keyboard is up. True; both compatibility lines now say so.
- Claim: TabBar callers change nothing. True for caller code; FR12's change while the keyboard is up is stated.
- Claim: FR12's device findings. Stated in text with device, browser and result; accepted as stated.
- Claim: the slot option's cost and the page sizes. Not verified; they decide nothing here.
- Claim: this pull request changes records only. True.
- Claim: the writing rubric finds no issues. True at this head.
- Claim: the knowledge check passes, and Prettier and the whitespace check are clean. True.
- File:
docs/specs/components/TabBar/TabBar.spec.md: no blocking finding; one non-blocking note.
Exact decision needed
One decision for the spec owner: how an app that draws its own tab bar gets TabBar's behavior (DEC-1, FR8–FR12 and OQ1 in
component:TabBar). Three parts need an answer:createTabBaranduseTabBar(recommended). A factory that works without React, and a thin hook over it, hand a bar the app draws its behavior as values and props. They cover the shown tabs, the selection, choosing and reselecting, More, roles, names, roving focus and the lens's state. The app renders every element and draws the lens.TabBaris built on the factory.TabBar.renderTabdraws each tab's face, andactionplaces a control beside the tab list. The capsule, the lens's glass and its motion stayTabBar's.spec:AST-107DEC-1). An app's own look then reaches the bar's frame and lens, not only the tab faces.spec:AST-107DEC-2 gives gesture hooks. Soarchitecture:public-component-apiINV21 counts the three as one API, and INV22's non-React equivalent exists.spec:AST-099DEC-9), with a signal where the window resizes. It is decided apart.Existing authority searched
component:TabBar(draft) covers More, disabled tabs and the More label, not a bar the app draws or an action beside the tabs.spec:AST-107DEC-1 gives products values and one method each from gesture hooks, never the gesture machinery. DEC-2 puts a factory under each hook.architecture:public-component-apiINV18, INV19, INV21 and INV22;architecture:internationalizationINV3a;architecture:component-import-boundariesINV10.spec:AST-099FR3 keeps Core's keyboard value internal, andarchitecture:react-component-runtimeINV11 keeps its measure unexported; docs(AST-099): apps and Lab read one keyboard value #12008 proposes a read for Lab.spec:AST-094andspec:AST-099FR1 decide neither part.TabBar.doc.mjs: "Don't use it for actions".Decision
createTabBar(element, options) → {getState, update, destroy}attaches the behavior to a tab list the app renders, without React, anduseTabBar(options)is its thin hook. Both take FR8's options (value,onChange,onReselect,onLensMove,moreValue,labelanditems); the factory also takesonStateChangeandlabels. The hook returns the tab list's props, each shown tab's props and state, the tabs past the fourth, and the lens's state. It also returns whether a keyboard is up. The factory sets the attributes itself and reports the same state throughgetState()andonStateChange.TabBardoes. An action beside the tabs is never a tab. While the on-screen keyboard is up, the bar is not drawn over or above it (FR12, OQ1).TabBarcallers change nothing.spec:AST-107DEC-1 and DEC-2;architecture:public-component-apiINV21 and INV22;architecture:internationalizationINV3a;spec:AST-099FR3.Before, an app with its own look rebuilds the tab list, its keys and its names by hand:
After:
The caller decides only the look: each segment, the lens, and where the action sits.
Rejected alternatives
TabBar's. Its slots also add 67 B gzip to every page withTabBar, used or not.architecture:public-component-apiINV22 asks interaction utilities for a non-React equivalent.spec:AST-107DEC-1 rejects gesture machinery.Claim scope and non-goals
The record covers the factory and the hook (FR8–FR10), the action rule (FR11), the keyboard rule (FR12, OQ1), a drawn bar's names (AR3) and PR2. A drawn bar's look and motion, and theming, stay out.
Evidence and implementation relationship
pnpm size:pages' build options on main 4675361:TabBarand the form reference page's components is 137,267 B. B's unused slots add 67 B there, on every page withTabBar.createTabBaroruseTabBar. The restructuredTabBaris measured when it is built (PR2).interactive-widget=resizes-content: the window shrinks and the bar rides fully above the keys at once.?claim=1), keeps the bar covered in iPhone Safari and the Home Screen app. After a 90-point scroll it is still covered.Writing rubric results
Scope
Components: TabBar
Validation
pnpm check:knowledge: passes.git diff --check: clean.