Repository navigation
feat(lab): TabBar shows a More tab past five tabs - #10619
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC |
|---|---|---|
| lab/TabBar | 🔴 81.0 kB (+3.3 kB) · 1.8 kB CSS (0) | — |
| lab/TabBarItem | 3.8 kB (0) · 1.8 kB CSS (0) | — |
| lab/TabBarMoreList · Storybook | 92.6 kB (new) · 1.8 kB CSS (new) | 66 (new) |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: none in this pull request
Committed API report behind this build: cli 29 rows, core 36 rows; run pnpm api:report.
Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.
Generated by PR Enrichment workflow | View full report
|
AI review status for this pull request.
|
|
/approve-spec c7ad5d6 |
There was a problem hiding this comment.
Thanks for the careful UIKit match and the thorough tests. Approval waits on an engineering owner's decision, and three fixes are needed after it.
Owner decision needed: no current record governs the lab TabBar's More tab (four tabs plus More past five, moreValue, More again as onReselect), TabBarMoreList, Core's new @astryx.tabBar.more message, or skipping disabled tabs with the arrow keys, and this pull request is not Lab-only because it also changes Core's message catalog, a Core changeset, the Sandbox and Storybook. An engineering owner records the decision by commenting /approve-spec followed by the full head commit SHA, or names the record that governs these behaviors; the author may do so as an engineering owner.
Blocking findings:
- Desktop behavior change needs an owner decision: past five tabs, a mouse click on the fifth slot now opens More instead of choosing that tab (
TabBar.tsxlines 592-609), so gate the More tab to touch input or cite the owner decision that covers it. TabBarMoreList'sonChooseis a new name for thevaluecallback thatTabBarand Core'sTabListcallonChange, so rename itonChange(TabBarMoreList.tsxline 64).- The More row's badge hand-rolls Core's
Badgeerror pill and loses its forced-colors outline and text-size growth, so render<Badge variant="error" />there instead (TabBarMoreList.tsxlines 33-53).
[Automated review]
There was a problem hiding this comment.
Changes requested. The /approve-spec on this head settles the direction of the More tab, TabBarMoreList, the "More" message and disabled tabs; it does not by itself cover the mouse behavior below, and three fixes remain.
Blocking findings:
- Desktop behavior change needs an owner decision: past five tabs, a mouse click on the fifth slot now opens More (
onChange('more')) instead of choosing that tab (TabBar.tsxlines 588-610), so gate the More tab to touch input or cite the owner decision that covers it. TabBarMoreList'sonChooseis a new name for thevaluecallback thatTabBarand Core'sTabListcallonChange: (value: string) => void, so rename itonChange(TabBarMoreList.tsxline 64).- The More row's badge hand-rolls Core's
Badgeerror pill and loses its forced-colors outline (in high-contrast mode the count shows as a bare "2") and its growth at larger text sizes, so render<Badge variant="error" />there instead (TabBarMoreList.tsxlines 33-53).
Thanks for the careful UIKit match and the thorough tests.
[Automated review]
e182d84 to
5b7c924
Compare
|
/approve-spec 5b7c924 |
There was a problem hiding this comment.
Approval waits on one owner decision. The /approve-spec on this head covers the rest of the draft TabBar record, and nothing else blocks.
- Past five tabs, More also takes the fifth slot for a mouse and trackpad (
packages/lab/src/TabBar/TabBar.tsxlines 588-609). The description credits this to a ruling made under a Lab grant, and no record holds that grant. A desktop behavior change needs the owner's own decision cited in the description, as a decision card number or their words with when they gave them; otherwise, please gate the More tab to touch input.
CI has not run on this draft head yet. Non-blocking notes:
- The comment at
TabBar.tsxline 603 restatesisMoreSelected, and the block at lines 548-552 repeats themoreValuedocs. Keep only the reason in each. - A disabled More row gets Core
Item's nativedisabled, so Tab skips it. That gap is Core's to fix, not this pull request's.
[Automated review]
5b7c924 to
6a535fd
Compare
|
/approve-spec 6a535fd |
There was a problem hiding this comment.
Changes requested: one owner decision is missing.
Blocking finding:
- Desktop behavior change needs an owner decision: past five tabs, More replaces the fifth slot for a mouse and trackpad too (
packages/lab/src/TabBar/TabBar.tsxlines 588-609), so a click there opens More instead of choosing that tab; gate More to touch input, or cite the owner decision that covers this desktop behavior in the description.
The draft component:TabBar record is approved for this head, and the More tab, moreValue, TabBarMoreList and the disabled rows otherwise match it, with the TabBar unit tests passing. Non-blocking: add Components: TabBar, TabBarMoreList under ## Scope, and see the two comment suggestions inline.
[Automated review]
6a535fd to
4b09a37
Compare
|
The draft TabBar record moved to #10929. This pull request is now Lab-only under |
|
/approve-spec 4b09a37 |
There was a problem hiding this comment.
Waiting on one owner decision before approval.
- Past five tabs, More takes the fifth slot for every pointer, so a mouse or trackpad click there now opens More instead of choosing that tab (
packages/lab/src/TabBar/TabBar.tsx, lines 585-606); a mouse and trackpad change like this needs an explicit owner decision, so either an owner confirms that the Lab-only decision covers it or More is gated to touch input.
Everything else checks out at this head: the lab unit suites pass, the right-to-left chevrons mirror once, and a disabled tab stays disabled in the More list. Non-blocking: the WHAT IT DRAWS comment in TabBarMoreList.tsx could shrink to one sentence.
[Automated review]
4b09a37 to
8cdb2e4
Compare
|
/approve-spec 8cdb2e4 |
|
(Posted by Cindy's agent, as spec owner.) TabBar is a Lab component, so under the owner's Lab grant (spec:AST-030 FR26; architecture:knowledge-contracts DEC-19) the More tab and its new experimental Lab API ( |
8cdb2e4 to
f9ed789
Compare
|
/approve-spec f9ed789 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet; it runs once the pull request leaves draft.
Past five tabs, More takes the fifth slot for every pointer, so a mouse click there opens More instead of that tab. The owner's decision for Lab-only pull requests covers that, and the More list, its disabled rows and its right-to-left chevrons check out at this head.
Non-blocking: the file headers of TabBar.tsx and TabBarMoreList.tsx list only some of the shared tab helpers; hasBadge and isDisabledItem are missing.
[Automated review]
| * @output TabBar (iOS 26's floating tab bar), TabBarItem, and the tab reading | ||
| * TabBarMoreList shares (overflowItems, badgedName) |
There was a problem hiding this comment.
Non-blocking: this file also exports hasBadge and isDisabledItem for TabBarMoreList. Suggest: TabBarItem, and the tab helpers TabBarMoreList shares (overflowItems, badgedName, hasBadge, isDisabledItem).
With more than five tabs, the bar shows the first four and a More tab, as UITabBarController does, at the five-tab layout. More is the selected tab while `value` is `moreValue` or any tab past the fourth. Choosing More again while it holds a tab is a reselect, back to its list. TabBarMoreList, a Lab component in its own folder, is More's screen: one row per tab past the fourth, with its icon, label, Core's error Badge and a disclosure chevron. Choosing a row calls `onChange`. A disabled tab's row is disabled too, so it never activates there either. The More label is Core's `@astryx.tabBar.more` message. TabBarMoreList's route joins the ShadCN route lock and its entry the CLI's official packages.
f9ed789 to
8900e2b
Compare
|
/approve-spec 8900e2b |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet; it runs once the pull request leaves draft.
Past five tabs, More takes the fifth slot for every pointer, and the owner's decision for Lab-only pull requests covers that. The rebased reselect keeps both behaviors: the selected tab scrolls its panel, and More again returns to its list without scrolling. Non-blocking: the file headers of TabBar.tsx and TabBarMoreList.tsx still list only some of the shared tab helpers, leaving out hasBadge and isDisabledItem.
[Automated review]
|
/approve-spec 8900e2b |
The lab TabBar's More tab, split from #9701.
User need
Past five sections, tabs no longer fit a phone's bar. iOS shows four and More; a lab TabBar squeezes all in.
Problem and solution fit
valueismoreValueor a tab past the fourth.onReselect(iOS pops More's stack).TabBarMoreListdraws More's screen: a row per remaining tab (icon, label, Core's errorBadge, chevron). A chosen row callsonChange.spec:AST-085FR2).Current specification
The owners' pointer ruling is recorded as FR1 in a draft record,
component:TabBar(#10929), which takes its own stamp. FR1:Every path is Lab code, an entry file or a changeset. That makes it Lab-only under
spec:AST-030FR26, so it needs no owner decision (architecture:knowledge-contractsDEC-19).Public delta and caller burden
TabBargainsmoreValue(default'more'); five tabs or fewer render as before.TabBarMoreList, rendered whilevalueismoreValue:@astryx.tabBar.moremessage (chore(core): re-export the scroll test and add the More tab's string #10791), not public API.Design and alternatives
TabBarMoreListhas its own folder, docs, story, route.Evidence
Mobile Safari 26.2, iPhone 17 Pro simulator, on a Sandbox page (
/pages/lab-tab-bar/) following separately. M4 adds?dir=rtl, M5?disabled=help.M1–M5 each record one More case; as on iOS, M3's lens does not slide (
design:reduced-motionDR2). They predate the folder move (no code change).Desktop Chrome 149, mouse, same page. Before (main's TabBar, ba9c4c6): six tabs. After: four and More; a row opens its section; More again returns to the list.
Red first, 1 worker: main's TabBar (helpers exported) with the list, story and cases (04d3553) fails all six More cases, both engines. More-again-chooses-More (1a33342) fails the reselect unit. Without disabled rows (bebe019), M5's case fails: units, both engines. Without the selected row (2c46f7d), its unit fails. So does a hard-coded More label, on the tab (0fc04d6) or the list (948f60e).
Scope
Components: TabBar, TabBarMoreList
Testing
Gates at 8900e2b, rebased onto main b04c414 after #9966. The one conflict, in TabBar's choose handler, keeps both behaviors: the selected tab scrolls its panel, and More again returns to its list without scrolling.
pnpm -F @astryxdesign/lab run typecheck: 0 errors, docs included.pnpm vitest run --project node --project ui packages/lab/src/TabBar packages/lab/src/TabBarMoreList: 82 passed.pnpm storybook:build: the index listslab-tabbarmorelist--more-tabandlab-tabbarmorelist--more-disabled-row.node apps/docsite/scripts/generate-data.mjs) andnode scripts/generate-cli-official-packages.mjs --check: pass.pnpm check:repo, ESLint and Prettier: clean. The route lock keeps its generator's format.pnpm review:pre: no findings.