Skip to content

Commit 0b2118f

Browse files
feat(record-page): on a phone the bottom bar holds the object's own actions only; Edit moves into the top bar's More (#36478)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} --> _Requested by **Steedos** · [project thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbVF7sWPNE4HmjkgyaVxQYif)_ repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA Fixes #36151 Clause-②: yes (widening) Metadata-protocol: semantic Skills-docs: none — no published skill under `skills/` names `mobileMaxVisible`, the phone record page's bottom bar or its Edit button (searched); the authoring change is one budget's meaning, taught in the spec describe and `content/docs/ui/pages.mdx` here. ## 维护者速读 - 手机上打开记录页:底部按钮条只放这个对象自己的动作(最多两个,撑满一行);没有动作的对象不再出现底部条,内容一直到屏幕底部;「编辑」挪进右上角「更多」。电脑端不变。 - 手机记录页改版的一步:字段已能点一下直接改,底部那颗占位的「编辑」按钮不再需要,把底部留给真正的业务动作。 - 出错时,手机用户会找不到整页编辑的入口,或看到空白的底部条;把本次改动撤回即可恢复原样,不涉及数据。 - 无。 ## What changes On a phone (the console's record page, `phonePage`), per the card's five ruled items: 1. **Edit leaves the bottom bar.** The record's Edit is forced into the `⋯` on the phone (`component: 'action:menu'` on the host's `sys_edit`, always, not only when Edit is off). A field's value is edited by one tap on it (#36147, PR #36234); whole-record edit is ⋯ → Edit, which calls the same `onEdit` handler the bar's Edit called (inline edit state on an object without a form, the form route on one with a form). 2. **The bottom bar holds the object's own actions only**: the primary, then the next one, budget unchanged (`PHONE_ACTION_BAR_BUTTONS` = 2, or the authored `mobileMaxVisible`), filling the row (`flex-1`). The edit state keeps its Cancel and Save there. 3. **No action, no bar.** With nothing to draw the toolbar returns nothing and the host's bar hides itself (`:has(> [role=toolbar]:empty)` / no toolbar), so the body runs to the foot of the screen. 4. **Approval unchanged.** A record pending the reader's approval still draws [Approve][Reject][⋯] from `RecordHeaderStateContext`'s state group with its own `⋯`; the top bar draws no second `⋯` then (one `⋯` per screen). 5. **Everything else is in the top bar's `⋯`**, at the right end of `RecordTopBar` (its `frame` slot): actions past the budget, Refresh, Edit (on or off with its reason), Share, Delete. The favorites entry is not in it: since #36246 (PR #36456) the favorite star sits beside the record's name, on the phone too. Mechanism: - `PageHeaderPhoneFace` (the `PageHeaderPhoneContext` value, a host slot, never metadata) gains an optional `more: HTMLElement | null`. `PageHeaderActions` in its bar face portals the `⋯` there when a host hands it; a host that does not hand it keeps the `⋯` as the bar's last button, byte-for-byte as before (the legacy pins in `page-header-phone-bar-27058.test.tsx` are untouched and green). - `RecordDetailView` hands a `span[data-record-phone-more]` it mounts in the top bar's `frame`. - Desktop: no change (the `face: 'row'` path is not touched). Spec / docs: `page:header` `mobileMaxVisible` describe now says the phone bar holds the page's own actions and Edit is in the top bar's `⋯`; generated docs regenerated (`check:generated --fix`, `gen-sdui-manifest-node.mjs`, `gen-sdui-reference.mjs`), hand-written `content/docs/ui/pages.mdx` and the designer's config description updated to match. Semantic change: an unset budget now shows two page actions where it showed Edit + one, and an authored value counts the page's actions alone. Rulings carried (not reopened): the card's five items; the maintainer's 「可以,立卡」 on fig. 48; ruling 7066516044 item 2 (a single tap edits on the phone). Linked rules this card reverses, as the claim names: #34595 (the bottom bar starts with Edit), and the Edit-counted half of #35840 (two visible by default: still two, now both page actions). ## Tests Step 0 (owed before Edit leaves the bar): every field type the default record page draws editable was checked at 375 px with touch emulation on the live showcase Field Zoo record: one tap on the value opens its editor, and the edit saves (a PATCH carrying that field's key). **All pass; no type raised.** | Result | Types | |---|---| | one tap opens, saves | textarea, email, url, phone, markdown, number, currency, percent, date, datetime, time, boolean, toggle, select, multiselect, radio, checkboxes, tags, lookup, lookups (multiple), master_detail, tree, user, users, owner (current_user default), location, address, code, json, color, rating, slider, signature, qrcode, progress, the system Owner | | not drawn editable (same on desktop, `INLINE_EXCLUDED_FIELD_TYPES` / read-only by kind) | password, secret, html, richtext, formula, autonumber | | not drawn as a detail row | media, embedded and vector types | Pins updated where they pinned the reversed behaviour: - `RecordDetailView.phoneFace-27058.test.tsx` (the #34595 pins): the bar is [Convert Lead][Assign] with no `⋯`; the `⋯` is the top bar's last control and holds Edit and Share; a third action folds into the top `⋯` before Edit; one action fills the row; no action leaves an empty, hidden bar and ⋯ → Edit calls `onEdit`; the approval control and the Edit-off cases read the top `⋯`. - `RecordDetailView.favoritesEntry-12427.test.tsx` (#36246's pins, merged in with origin/main): the phone case now opens the top bar's `⋯` (the fixture object declares no action, so its bottom bar is drawn empty); the CONTROL is that menu's Edit and Share, and the assertion that the `⋯` holds no favorites entry is unchanged. Its mount helper waits for the top bar's `⋯` on that case instead of a toolbar. - `RecordDetailView.recordPageTiers-26678.test.tsx`: the phone branch reads the empty bottom bar and the top bar's `⋯`. - `page-header-phone-bar-27058.test.tsx`: new `the phone bar with the host's top-bar ⋯ slot` describe (two actions fill the row and the `⋯` sits in the slot; no page action draws an empty bar; slot not yet mounted draws no `⋯`). - `ui/e2e/record-flow-phone-targets.spec.ts`: the geometry fixture draws the top bar's More (`h-11 w-11`) and an actions-only bar; 6 passed locally. Ablations (one-shot, not kept; both restored, blob == HEAD verified by `scripts/ablation-replace.mjs`): - `RecordDetailView`: Edit forced into the `⋯` only when off (the old rule) ⇒ phoneFace suite 6 failed / 22 passed. - `PageHeaderActions`: top-bar slot ignored (`moreInTopBar = barFace && false`) ⇒ 13 failed / 29 passed across the two suites. Readings on head `a262ef3653` (origin/main merged in, carrying #36456; the spec reference regenerated on the merged tree; the favorites pin moved to the top `⋯`; the changeset's `⋯` list drops Favorites): `vitest --maxWorkers=1` on favoritesEntry-12427, phoneFace-27058, recordPageTiers-26678, page-header-phone-bar-27058 and headerMenuIcons-12529: Test Files 5 passed (5), Tests 65 passed (65), exit 0; `@object-ui/app-shell` `type-check` VERDICT command-exit 0; `pnpm --dir ui exec vitest run scripts/` 5127 passed, 2 skipped, exit 0; `dispatch-gates --ran` 125 derived, 123 exit 0, 2 NOT MEASURED (the same two exit-3 prerequisites below). The readings below were taken on code head `ec741d2c08`, before the merge: <details><summary>Unit suites, type-check, local gate subset</summary> - `vitest run --maxWorkers=1` phoneFace-27058 + recordPageTiers-26678 + page-header-phone-bar-27058 (under the verify lock): Test Files 3 passed (3), Tests 52 passed (52), exit 0. - `pnpm --dir ui exec vitest run scripts/` (a derived family): Test Files 172 passed, 2 skipped (174); Tests 5127 passed, 2 skipped; exit 0. - `@object-ui/components` and `@object-ui/app-shell` `type-check` (both `tsc --noEmit` and `tsconfig.test.json`, so the edited tests are in): VERDICT command-exit 0, after building the `@object-ui/app-shell^...` closure (a stale `@object-ui/types` dist had first reported a `DataTableSchema.onColumnHide` error outside this diff; rebuilt, gone). - Earlier on this branch, before the last test-only commit: RecordDetailView*, page-header*, record-top-bar* suites 133 files / 1144 tests, the one red being the tiers pin fixed in `ec741d2c08`; ESLint on the changed files 0 errors. - `dispatch-gates --ran`: 125 derived families accounted for, 123 run with exit 0, 2 NOT MEASURED (exit 3, PREREQUISITE NOT MET: `check:skill-examples` needs a built `@objectstack/client-react`, `check:dual-build-cjs-loads` needs studio, client-react and other dists outside this diff; both run in CI). - `@objectstack/spec` `check:generated` green after `--fix`; `check:sdui-reference` and `check-sdui-manifest` green. - Not run locally, CI-owned: `test:repo`, the repo-wide lint, the artifact-roster and wide families. </details> ## Acceptance notes - **The card's own example, the HotCRM lead, measured live at 375 px (zh-CN).** HotCRM at origin/main `689166c` ran from a sister worktree with its own setup (`objectstack dev`, published 18.6.0 server packages, fresh seeded DB), and this branch's Console vite was proxied to it. The record was a New lead (Noah Patel - Vertex Analytics), where 「确认线索」 (`qualify_lead`) is visible. - Before (origin/main renderer): the bar was [编辑][确认线索][⋯]; the ⋯ held 刷新 / 转化线索 / 安排跟进 / 记录通话 / 记录会议 / 安排会议 / 添加到收藏 / 分享 / 删除 (main before #36456). - After (this branch): the bar is [确认线索][转化线索], with no 编辑. The top bar's ⋯ holds 刷新 / 安排跟进 / 记录通话 / 记录会议 / 安排会议 / **编辑** / 添加到收藏 / 分享 / 删除, measured on `75f16a89de`, before #36456 landed. Since #36246 (PR #36456) 添加到收藏 has left the ⋯ for the star beside the record's name, so on the current head the top ⋯ holds the same list without it (pinned by `RecordDetailView.favoritesEntry-12427.test.tsx`'s phone case). - Why 转化线索 is in the bar too: ruled item 2 keeps the bar budget at its current rule, at most 2 (「最多 2 个,沿用现在的规则」). The slot 编辑 gave up goes to the lead's next action, `convert_lead`. The card's wording 「只有确认线索」 describes the old bar with 编辑 removed. To show 确认线索 alone, HotCRM sets `mobileMaxVisible: 1` on the lead page's `page:header` (an app-side authoring choice, not made here; raised to the seat in the report). - For non-zh readers, the showcase Task shows the same thing: the bar holds only the object's own actions ([Log Time][Archive]), there is no Edit, and the top ⋯ holds Edit. - Edit is in the top `⋯` on the phone in every state, including the record's edit state (where the bar is Cancel/Save). - A host button on the phone (the queue's Claim) still sits in the bar ahead of the page actions and counts toward the budget, as before. - Overlap: #36357 also regenerates `scripts/sdui-manifest.record.json` (a generated sha/date pair); whichever lands second regenerates it. Clean against #36438, #36392, #36351, #36343 and origin/main. - Out of scope, reported to the seat (not fixed here): in the lookup picker on a phone, an option's preview carries a record chip link; a tap on the chip navigates away mid-edit instead of selecting (Field Zoo, Master-Detail → Project, tap the "Account: Fabrikam" chip ⇒ the account page opens). ## Verification Read first (by risk): 1. `PageHeaderActions` in `ui/packages/components/src/renderers/layout/containers.tsx`: the `moreInTopBar` branch (the portal into the host slot and the early return that leaves the bar empty). 2. `RecordDetailView` in `ui/packages/app-shell/src/views/RecordDetailView.tsx`: `sys_edit`'s phone `component: 'action:menu'`, the top bar's `frame` slot and the bar's empty-hide class. 3. `PageHeaderPhoneFace` in `page-header-phone-context.ts`: the new optional `more`. Two-minute check: open a New HotCRM lead at 375 px ⇒ [确认线索][转化线索] at the foot, 编辑 in the top-right ⋯. Or open any record of an object with no actions of its own (showcase Account) at 375 px wide ⇒ no bottom bar, a `⋯` at the top bar's right end holding Refresh / Edit / Share / Delete, and the favorite star beside the record's name. A showcase Task ⇒ [Log Time][Archive] filling the bottom row. Screenshots at 375 (live showcase, evidence branch `claude/issue-36151-evidence`): | State | Before | After (light) | After (dark) | After, `⋯` open | |---|---|---|---|---| | No action (Account) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/before-no-primary-light.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-no-primary-light.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-no-primary-dark.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-no-primary-light-menu.png?raw=true) | | Actions (Task) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/before-primary-light.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-primary-light.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-primary-dark.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-primary-light-menu.png?raw=true) | | HotCRM lead (zh-CN) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/before-hotcrm-lead-light.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-hotcrm-lead-light.png?raw=true) | not taken | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-hotcrm-lead-light-menu.png?raw=true) | | Approval (Project) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/before-approval-light.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-approval-light.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-approval-dark.png?raw=true) | ![](https://github.com/objectstack-ai/objectstack/blob/claude/issue-36151-evidence/evidence/issue-36151/after-approval-light-menu.png?raw=true) | The screenshots were taken before #36456 landed, so the open `⋯` shots still show Add to favorites / 添加到收藏. Since #36246 that entry has left the `⋯` for the star beside the record's name. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QsR2jRaJbQ4vqdv4J5peqA <!-- signed: repo:objectstack#7 · zhuangjianguo · session_01QsR2jRaJbQ4vqdv4J5peqA --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
1 parent 2da2979 commit 0b2118f

15 files changed

Lines changed: 299 additions & 96 deletions
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@object-ui/components': minor
4+
'@object-ui/app-shell': minor
5+
---
6+
7+
feat(record-page): on a phone the record page's bottom bar holds the object's own actions only, and Edit moves into the More menu at the top bar's right end
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: semantic
11+
12+
On a phone the record page's bottom bar used to always draw Edit first, then the primary action and the `⋯`; an object with no action of its own got a full-width Edit and nothing else. A field's value is now edited by a tap on it, so on a phone:
13+
14+
- The bottom bar draws the object's actions only: the primary and the next one (the default budget of 2 is unchanged), filling the row. The record's edit state keeps its Cancel and Save there.
15+
- With no action to draw, no bottom bar is drawn and the page body runs to the foot of the screen.
16+
- The `⋯` moves to the right end of the top bar. It holds Edit (on or off, with the reason when it is off), the actions that did not fit, Refresh, Share and Delete. (Favorites is not in it: the favorite star sits beside the record's name.) Edit there does what the bar's Edit did.
17+
- A record pending the reader's approval is unchanged: the bar is the approval's decisions and its own `⋯`.
18+
- The desktop header is unchanged.
19+
20+
`page:header` `mobileMaxVisible` keeps its default of 2 in the phone bar, but Edit no longer takes one of those slots, so an unset budget now shows two of the page's actions where it showed one, and an authored value counts the page's actions alone. Host buttons still take bar slots ahead of the page's actions: the queue's Claim, and in the record's edit state its Cancel and Save. Its description in the spec, the designer and the docs says so.
21+
22+
Migrating: an author who wants the earlier number of page actions in the phone bar lowers `mobileMaxVisible` by one. An authored `1` that meant "Edit only" now shows the primary action; to keep the bar free of inline actions, mark the page's actions `component: 'action:menu'` so they fold into the `⋯`.
23+
24+
`@object-ui/components`: `PageHeaderPhoneFace` (the value of `PageHeaderPhoneContext`) gains an optional `more` slot. A host that hands it gets the `⋯` drawn there, and a bar with no button draws nothing; a host that does not keeps the `⋯` as the bar's last button, as before.

‎content/docs/references/ui/component.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma
15801580
| **showStar** | `never` | optional | [REMOVED] `page:header` property `showStar` was removed in @objectstack/spec 18 (ADR-0087 D2) — the console draws the record's star from the host's favorites toggle, never from metadata, so the key switched nothing. Delete the key, whether it was `true` or `false`; the page draws the same star without it. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. |
15811581
| **showCopyId** | `boolean` | optional (default: `true`) | Show the copy-record-id button beside the record title. Part of the record chrome — no effect when `recordChrome` is false. |
15821582
| **maxVisible** | `integer` | optional | How many header actions render as inline buttons before the rest fold into the overflow menu. Renderer default when unset: 3 on every header. In a record page's header bar the number, authored or not, is an upper bound: actions that do not fit the bar's width fold as well, so a narrow drawer shows fewer. |
1583-
| **mobileMaxVisible** | `integer` | optional | The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page's bottom action bar on a phone, where the host's Edit counts as one, 1 on any other header. |
1583+
| **mobileMaxVisible** | `integer` | optional | The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page's bottom action bar on a phone, 1 on any other header. The phone bar holds the page's own actions: the record's Edit is not one of them, it is in the overflow menu at the top bar's right end. |
15841584
| **aria** | `{ ariaLabel?: string \| Record<string, string>; ariaDescribedBy?: string; role?: string }` | optional | ARIA accessibility attributes |
15851585

15861586
### Nested Shape: `PageHeaderProps.aria`

‎content/docs/ui/components/page.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Namespace `page`.
5656
| `recordChrome` | `boolean` | | Set false for the bare h1 header on non-record pages |
5757
| `showCopyId` | `boolean` | | — |
5858
| `maxVisible` | `number` | | How many header actions render as inline buttons on desktop before the rest fold into the overflow menu. A positive integer, defaulting to 3 — the contract rejects 0 and fractional values. In a record page's header bar, actions that do not fit its width fold too, so a narrow drawer shows fewer. 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. The host's Edit is always an outline button: on a record with no header action of its own the row has no filled button. 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, or 2 in a record page's bottom action bar on a phone, where the host's Edit counts as one; 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, defaulting to 1, or 2 in a record page's bottom action bar on a phone, which holds the page's actions (the record's Edit is in the top bar's overflow menu there); the desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged. |
6060

6161
## `page:section` [#page-section]
6262

‎content/docs/ui/pages.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ unknown or retired key (`description`, `icon`, `breadcrumb`, `showStar`) is refu
396396
| `placedActions` | — | `true` asks for every action of the object placed at `record_header` / `record_more`, read live, in place of an `actions` list, so an action another package adds is drawn without editing the page. Refused beside an authored `actions` list: keep one. The platform's user, organization and approval request pages set it |
397397
| `recordChrome` | `true` | Draw the title as the record chip (object label, copy-id button, the record's picture when the object names an `imageField`); `false` keeps a bare heading |
398398
| `showCopyId` | `true` | The copy-record-id button in the chip |
399-
| `maxVisible` / `mobileMaxVisible` | 3 on every header (in a record page's header bar the number, authored or not, is an upper bound: actions that do not fit the bar's width fold as well) / 2 in a phone record page's bottom bar (the Edit button counts as one), 1 elsewhere | How many actions render inline before the rest fold into the `⋯` menu |
399+
| `maxVisible` / `mobileMaxVisible` | 3 on every header (in a record page's header bar the number, authored or not, is an upper bound: actions that do not fit the bar's width fold as well) / 2 in a phone record page's bottom bar (the page's own actions; Edit is in the top bar's `⋯` there), 1 elsewhere | How many actions render inline before the rest fold into the `⋯` menu |
400400
| `aria` | — | ARIA attributes (`ariaLabel`, `ariaDescribedBy`, …) for the `<header>` element |
401401

402402
A named action renders only if its `locations` include `record_header` (inline) or

‎packages/spec/src/ui/component.zod.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ export const PageHeaderProps = strictObject({
856856
'How many header actions render as inline buttons before the rest fold into the overflow menu. Renderer default when unset: 3 on every header. In a record page\'s header bar the number, authored or not, is an upper bound: actions that do not fit the bar\'s width fold as well, so a narrow drawer shows fewer.',
857857
),
858858
mobileMaxVisible: z.number().int().positive().optional().describe(
859-
'The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page\'s bottom action bar on a phone, where the host\'s Edit counts as one, 1 on any other header.',
859+
'The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page\'s bottom action bar on a phone, 1 on any other header. The phone bar holds the page\'s own actions: the record\'s Edit is not one of them, it is in the overflow menu at the top bar\'s right end.',
860860
),
861861
/** ARIA accessibility */
862862
aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),

‎scripts/sdui-manifest.record.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
],
1414
"source": "built-tree",
1515
"generator": "scripts/gen-sdui-manifest-node.mjs",
16-
"generatedAt": "2026-11-21",
17-
"sha256": "16ff838b7448ca0e59019fe61016e0c4d3ab9654239fc4beded2238b801ee2cf",
16+
"generatedAt": "2026-11-22",
17+
"sha256": "f3dbc8227184b481722038c25df8027ec0b7546957cda33d6d718fe643ff3bf3",
1818
"components": 106,
1919
"inTree": {
2020
"modulesRoot": "ui/apps/console",

‎sdui.manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3544,7 +3544,7 @@
35443544
{
35453545
"name": "mobileMaxVisible",
35463546
"type": "number",
3547-
"description": "The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer, defaulting to 1, or 2 in a record page's bottom action bar on a phone, where the host's Edit counts as one; 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, defaulting to 1, or 2 in a record page's bottom action bar on a phone, which holds the page's actions (the record's Edit is in the top bar's overflow menu there); the desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged."
35483548
}
35493549
]
35503550
},

‎ui/e2e/record-flow-phone-targets.spec.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@ const CLS = {
102102
composerRow: g('composer', /<div className=\{cn\('(flex flex-wrap items-center gap-0\.5[^']*)'/, ['flex-wrap']),
103103
composerButton: g('composer', /className="(h-11 w-11 sm:h-7 sm:w-7)"/, ['h-11', 'sm:h-7']),
104104
barButton: g('header', /barFace && '(h-11 min-w-0 flex-1)'/, ['h-11', 'flex-1']),
105-
barMore: g('header', /barFace \? '(h-11 w-11 shrink-0 px-0)'/, ['h-11', 'w-11']),
105+
// objectstack#36151 — the record page hands the `⋯` a slot at the top bar's
106+
// right end on a phone; the bar holds the page's actions alone.
107+
topMore: g('header', /moreInTopBar\s*\? '(h-11 w-11 shrink-0 px-0 [^']*)'/, ['h-11', 'w-11']),
106108
back: g('page', /const phoneBackClass =\s*'([^']+)'/, ['min-h-[44px]']),
107109
topBar: g('topBar', /'(flex min-h-11 sm:h-11 [^']*)'/, ['min-h-11', 'sm:h-11']),
108110
topBarButton: g('topBar', /const RECORD_TOP_BAR_BUTTON_CLASS =\s*'([^']+)'/, ['h-11', 'w-11', 'sm:h-7']),
@@ -122,7 +124,7 @@ const CLS = {
122124
})(),
123125
};
124126

125-
/** The record page, transcribed: the back link, the tabs, a section field with its pencil, a related card, the inline save bar and the bottom action bar. */
127+
/** The record page, transcribed: the back link and the top bar's `⋯`, the tabs, a section field with its pencil, a related card, the inline save bar and the bottom action bar. */
126128
const fixture = () => {
127129
const b = (cls: string, label: string, extra = '') =>
128130
`<button type="button" class="${CLS.buttonBase} px-3 ${cls}" data-t="${label}" ${extra}>${label.length > 2 ? label : '<svg width="16" height="16"></svg>'}</button>`;
@@ -133,6 +135,7 @@ const fixture = () => {
133135
<div class="flex shrink-0 items-center gap-0.5"><span class="mr-1">3 / 21</span>
134136
<button type="button" class="${CLS.topBarButton}" data-t="next record"><svg width="14" height="14"></svg></button>
135137
<button type="button" class="${CLS.topBarButton}" data-t="previous record"><svg width="14" height="14"></svg></button>
138+
${b(CLS.topMore, 'TM')}
136139
</div>
137140
</div>
138141
<div class="px-4">
@@ -174,7 +177,7 @@ const fixture = () => {
174177
</div>
175178
</div>
176179
<div class="shrink-0 border-t px-4 pt-3 pb-3"><div class="flex items-center gap-2">
177-
${b(`gap-2 ${CLS.barButton}`, 'Edit')}${b(`gap-2 ${CLS.barButton}`, 'Convert Lead')}${b(CLS.barMore, 'MA')}
180+
${b(`gap-2 ${CLS.barButton}`, 'Convert Lead')}${b(`gap-2 ${CLS.barButton}`, 'Assign')}
178181
</div></div>
179182
</div>`;
180183
};

‎ui/packages/app-shell/src/views/RecordDetailView.favoritesEntry-12427.test.tsx‎

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const METADATA = {
101101
const STORE_KEY = 'objectui-favorites';
102102
const stored = (): FavoriteItem[] => JSON.parse(localStorage.getItem(STORE_KEY) ?? '[]');
103103

104-
async function mountRecordPage(opts: { embedded?: boolean } = {}) {
104+
async function mountRecordPage(opts: { embedded?: boolean; ready?: string } = {}) {
105105
const dataSource = {
106106
find: vi.fn(async () => ({ data: [] })),
107107
findOne: vi.fn(async () => ({ id: RECORD_ID, name: 'Intro call' })),
@@ -139,7 +139,9 @@ async function mountRecordPage(opts: { embedded?: boolean } = {}) {
139139
</I18nProvider>,
140140
);
141141
await waitFor(() => expect(dataSource.findOne).toHaveBeenCalled());
142-
await waitFor(() => expect(document.querySelector('[role="toolbar"]')).toBeTruthy());
142+
// The header's actions are drawn: its toolbar, or on a phone whose object
143+
// declares no action of its own, the top bar's ⋯ (objectstack#36151).
144+
await waitFor(() => expect(document.querySelector(opts.ready ?? '[role="toolbar"]')).toBeTruthy());
143145
}
144146

145147
/** The record header's favorite star, by either of its two names. */
@@ -156,8 +158,7 @@ function isFilled(star: HTMLElement): boolean {
156158
}
157159

158160
/** Opens the header's overflow and returns its entries' text. */
159-
async function openOverflow(): Promise<string[]> {
160-
const [trigger] = screen.getAllByRole('button', { name: 'More actions' });
161+
async function openOverflow(trigger: HTMLElement = screen.getAllByRole('button', { name: 'More actions' })[0]): Promise<string[]> {
161162
fireEvent.pointerDown(trigger, { button: 0, ctrlKey: false, pointerType: 'mouse' });
162163
await waitFor(() => expect(screen.getByRole('menu')).toBeInTheDocument());
163164
return screen.getAllByRole('menuitem').map((el) => (el.textContent ?? '').trim());
@@ -277,17 +278,25 @@ describe('record page: the favorite star beside the record name, none in the ⋯
277278
expect(items.filter((text) => /favorites$/.test(text))).toEqual([]);
278279
});
279280

280-
it('a phone draws the star beside the name, and its bottom bar\'s ⋯ holds no favorites entry', async () => {
281+
it('a phone draws the star beside the name, and the top bar\'s ⋯ holds no favorites entry', async () => {
281282
Object.defineProperty(window, 'innerWidth', { value: 390, configurable: true, writable: true });
282283
const measure = HTMLElement.prototype.getBoundingClientRect;
283284
vi.spyOn(HTMLElement.prototype, 'getBoundingClientRect').mockImplementation(function (this: HTMLElement) {
284285
if (!this.hasAttribute('data-record-page-root')) return measure.call(this);
285286
return { x: 0, y: 0, top: 0, left: 0, right: 390, bottom: 800, width: 390, height: 800, toJSON: () => ({}) } as DOMRect;
286287
});
287288
try {
288-
await mountRecordPage();
289-
// CONTROL: the phone face is drawn — its bottom bar holds the actions.
290-
await waitFor(() => expect(document.querySelector('[data-record-action-bar] [role="toolbar"]')).toBeTruthy());
289+
await mountRecordPage({ ready: '[data-record-phone-more] button[aria-label="More actions"]' });
290+
// CONTROL: the phone face is drawn. This object declares no action of
291+
// its own, so its bottom bar is drawn empty (and hidden), and the
292+
// record's ⋯ is the one at the top bar's right end (objectstack#36151).
293+
const topMore = await waitFor(() => {
294+
const trigger = document.querySelector<HTMLElement>('[data-record-phone-more] button[aria-label="More actions"]');
295+
expect(trigger).toBeTruthy();
296+
return trigger!;
297+
});
298+
expect(document.querySelector('[data-record-action-bar]')!.childElementCount).toBe(0);
299+
expect(screen.getAllByRole('button', { name: 'More actions' })).toEqual([topMore]);
291300
const star = await waitFor(() => {
292301
const [only, ...rest] = headerStars();
293302
expect(rest).toHaveLength(0);
@@ -299,8 +308,9 @@ describe('record page: the favorite star beside the record name, none in the ⋯
299308
fireEvent.click(star);
300309
await waitFor(() => expect(stored()).toHaveLength(1));
301310

302-
const items = await openOverflow();
303-
expect(items).toContain('Share');
311+
const items = await openOverflow(topMore);
312+
// CONTROL: the top ⋯ is open and holds the record's Edit and Share.
313+
expect(items).toEqual(expect.arrayContaining(['Edit', 'Share']));
304314
expect(items.filter((text) => /favorites$/.test(text))).toEqual([]);
305315
} finally {
306316
vi.restoreAllMocks();

0 commit comments

Comments
 (0)