You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7de1bad
Browse filesBrowse the repository at this point in the historyBrowse files
fix(ui): state the real page:header mobileMaxVisible default in designer text (#35951)
Fixes#35840
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 在 Studio 设计器和组件文档里,页面头部「手机端最多显示的按钮数」的说明,现在写对了默认值(手机记录页底栏是 2,其他头部是
1,原来写成 1)。
- 为了让设计器说明、文档与已定稿的规格说明一致,避免设计者按错误默认值配置。
- 只改文字和注释,不改任何行为;出错也只是说明文字不准,可直接撤回。
- 要你做什么:无。
## What changes
Text only in
`ui/packages/components/src/renderers/layout/containers.tsx`:
- the designer input description of `mobileMaxVisible` (was "A positive
integer, defaulting to 1") now states the unset default: 2 in a record
page's bottom action bar on a phone (host Edit counted), 1 on any other
header;
- the `PageHeaderActionsProps` comments for `maxVisible` /
`mobileMaxVisible` (were "falls back to 3" / "falls back to 1");
- the inline/overflow comment ("default to 3 / 1").
Regenerated, not hand-edited, with `node
scripts/gen-sdui-manifest-node.mjs` and `node
scripts/gen-sdui-reference.mjs`: `sdui.manifest.json`,
`content/docs/ui/components/page.mdx`, and
`scripts/sdui-manifest.record.json` (the manifest generator re-records
its own sha256 there; one line, `sha256`). One changeset.
`types/ui-action.ts` and `action/auto-trigger.ts` are untouched (they
describe `action:bar`, fallback still 3 / 1).
Spec text matched (`packages/spec/src/ui/component.zod.ts` on main, from
#35660 / #35821):
- `maxVisible`: "Renderer default when unset: 1 in a record page's
one-row header bar, 3 on any other header."
- `mobileMaxVisible`: "Renderer default when unset: 2 in a record page's
bottom action bar on a phone, 1 on any other header."
Code agrees with the spec (read before writing): `containers.tsx`
`PHONE_ACTION_BAR_BUTTONS = 2` for `face: 'bar'` (Edit takes a slot
there), `?? 1` for other mobile headers, `defaultMaxVisible ?? 3` on
desktop with the record one-row header passing 1.
## Tests
No behavior change, so no test change. `pnpm check:sdui-reference` exit
0 (page.mdx matches the manifest, 106 components); `node
scripts/check-sdui-manifest.mjs` exit 0; `pnpm check:changeset-fixed`
exit 0; `node scripts/check-nul-bytes.mjs` exit 0.
## Acceptance notes
- Designer description, manifest and page.mdx agree with the spec
default; the generated-artefact freshness checks pass locally.
- `scripts/sdui-manifest.record.json` is outside the stated file surface
but is written by the same generator run (sha256 line only).
- Overlap check against #35938 (same file, other region): merges
cleanly.
## Verification
Read `page.mdx` row `mobileMaxVisible`: it now reads "...when unset it
is 2 in a record page's bottom action bar on a phone (counting the
host's Edit) and 1 on any other header...".
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgWdb2isyvQFrgHazQx
Co-authored-by: Claude <noreply@anthropic.com>
fix(ui): the designer and docs text for `page:header``mobileMaxVisible` states the real default
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The Max Inline Actions (mobile) input description, and the `page.mdx` reference generated from it, said the budget defaults to 1. Unset, it is 2 in a record page's bottom action bar on a phone (the host's Edit counts) and 1 on any other header. The description now says so, matching the spec text from #35660, and the stale 3 / 1 comments on the header actions row are corrected. Text only: no value, fallback or rendering changes.
Copy file name to clipboardExpand all lines: content/docs/ui/components/page.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ Namespace `page`.
56
56
|`recordChrome`|`boolean`|| Set false for the bare h1 header on non-record pages |
57
57
|`showCopyId`|`boolean`|| — |
58
58
|`maxVisible`|`number`|| How many header actions render as inline buttons on desktop before the rest fold into the overflow menu. A positive integer — the contract rejects 0 and fractional values. Two kinds of action are routed to the overflow menu regardless of this budget and never occupy an inline slot: an action whose locations declare record_more without record_header, and any action with component action:menu. The host's own buttons (the record page's Edit) take no slot and never fold. The first inline action, or the one declaring variant primary, is the one filled primary button; the others are outline buttons. An action declaring variant danger is never the primary: inline it is a destructive button, and in the overflow menu it is a red row below a separator. |
59
-
|`mobileMaxVisible`|`number`|| The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer, defaulting to 1; the desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged. |
59
+
|`mobileMaxVisible`|`number`|| The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer; when unset it is 2 in a record page's bottom action bar on a phone (counting the host's Edit) and 1 on any other header. The desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged. |
Copy file name to clipboardExpand all lines: sdui.manifest.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3544,7 +3544,7 @@
3544
3544
{
3545
3545
"name": "mobileMaxVisible",
3546
3546
"type": "number",
3547
-
"description": "The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer, defaulting to 1; the desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged."
3547
+
"description": "The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer; when unset it is 2 in a record page's bottom action bar on a phone (counting the host's Edit) and 1 on any other header. The desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged."
* live, in place of an `actions` list. Only the boolean `true` opts in.
1945
1945
*/
1946
1946
placedActions?: unknown;
1947
-
/** The inline-button budget on desktop, as `page:header`'s `maxVisible`; an out-of-contract value falls back to 3. */
1947
+
/** The inline-button budget on desktop, as `page:header`'s `maxVisible`; an out-of-contract value falls back to the unset default: 1 in a record page's one-row header (`defaultMaxVisible`), 3 on any other header. */
1948
1948
maxVisible?: unknown;
1949
-
/** The inline-button budget on mobile, as `page:header`'s `mobileMaxVisible`; an out-of-contract value falls back to 1. */
1949
+
/** The inline-button budget on mobile, as `page:header`'s `mobileMaxVisible`; an out-of-contract value falls back to the unset default: 2 in a record page's phone bottom bar (`face: 'bar'`, the host's Edit included), 1 on any other header. */
1950
1950
mobileMaxVisible?: unknown;
1951
1951
/** Drawn in place of the action row when no action survives the gates. */
// `description` stays the only authoring-time expression of it, and spec
3652
3654
// stays the sole judge of values.)
3653
3655
{name: 'maxVisible',type: 'number',description: 'How many header actions render as inline buttons on desktop before the rest fold into the overflow menu. A positive integer — the contract rejects 0 and fractional values. Two kinds of action are routed to the overflow menu regardless of this budget and never occupy an inline slot: an action whose locations declare record_more without record_header, and any action with component action:menu. The host\'s own buttons (the record page\'s Edit) take no slot and never fold. The first inline action, or the one declaring variant primary, is the one filled primary button; the others are outline buttons. An action declaring variant danger is never the primary: inline it is a destructive button, and in the overflow menu it is a red row below a separator.'},
3654
-
{name: 'mobileMaxVisible',type: 'number',description: 'The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer, defaulting to 1; the desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged.'},
3656
+
{name: 'mobileMaxVisible',type: 'number',description: 'The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer; when unset it is 2 in a record page\'s bottom action bar on a phone (counting the host\'s Edit) and 1 on any other header. The desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged.'},
0 commit comments