Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .changeset/35890-record-details-pinned.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
'@object-ui/plugin-detail': patch
'@object-ui/app-shell': patch
'@object-ui/i18n': patch
---

feat(console): on a wide full record page the details are pinned in a left column and the other tabs sit beside them; the right summary rail is retired

Clause-②: yes (widening)
Metadata-protocol: none

The synthesized record page (objectstack#35890, ruling on the card 7064066204):

- **Pinned details.** A full page whose content fits a 320 px details column, a 24 px gap and 400 px of tabs pins the record's details in a left column and draws the other tabs (related lists, Attachments, Approvals, 动态) beside them, opening on the first. The column is 400 px wide and narrows toward 320 px on a tight page; its edge is a separator the reader drags, or moves with ←/→ (Home/End for the ends). The dragged width is kept per object in the console's workspace preference store (`record.columns.details-width`, this browser). Each column scrolls on its own. A page with no other tab draws the details across the page with no tab row; a page whose details hold a related table among the fields (objectstack#35889) is not pinned and keeps its one-column tab row. Narrowing out of the pinned layout keeps the tab that was shown, writing it to the address with `replace`.
- **The right rail is retired** at every width, with its ⊟ switch and `⌘⇧,` shortcut and the `record.columns.related` preference (an old stored choice is no longer read). Its cards (approval, attachments, recent activity, other related) are the tabs they summarised. A list the reader hid still opens, from its item in 「更多」 or from an address that names it (`?related=`).
- **「详情」.** The first tab is named Details (详情) in every locale.
- **「审批中 · 当前步骤」.** For everyone but the approver, the header's in-approval tag names the step the request waits at, when it has one.
- **Drawer, split pane and phone** keep their one-column tab row and never pin. What reaches them: the rail is gone there too, and the first tab reads 「详情」 / Details. Authored pages are untouched.

`RecordPageColumns` gains the optional `fullPage`, `detailsWidth`, `onDetailsWidthChange` and `onShownTabChange` props, and `onEnlargeRelated` an optional `{ replace }`; `rightColumn` and `rail` are kept as deprecated props that do nothing. `@object-ui/plugin-detail` exports `RECORD_PAGE_DETAILS_WIDTH`, `RECORD_PAGE_PIN_MIN_WIDTH` and `recordPagePinsDetails`; `recordPageTierHasRightColumn` stays exported, answering as before, and is now `@deprecated` (no tier draws a right rail).

`@object-ui/i18n` widens: two new keys in every pack, `detail.approvalPendingStep` (`In approval · {{step}}`) and `detail.detailsColumnResize` (the separator's name), and `detail.recordTabOverview` changes its text from 概览 / Overview to 详情 / Details. Every key the rail read (`detail.relatedColumn`, `detail.relatedHiddenCount` and its plural forms, `detail.relatedShowHidden`, the six `detail.summary*` keys and `shortcuts.toggleRelated`) stay in every pack, unread, so a host that reads them keeps its text; retiring them is a separate change.
59 changes: 28 additions & 31 deletions content/docs/ui/pages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -180,41 +180,38 @@ replacement.
### The synthesized default

A record page needs no authoring. With no page assigned, the Console synthesizes one from
the object: a header, the record's **details**, and a right column of
panels: the related lists, then the attachments of an object with `enable: { files: true }`,
then **Approvals** when the record has approval requests, and **动态** (Activity) last. On a
narrow screen the same panels follow the details in one column, so **动态** ends the page. A
relationship whose child field declares `relatedList: 'primary'` is part of the record's body:
its list is a full-width table in the details, after the first field section, with no panel of
its own. **动态** is one stream: the discussion, the activity and, with
`enable: { trackHistory: true }`, the record's field changes; there is no separate History tab.
Its panel shows a one-line composer and the newest entries, and its header opens the whole
stream (`?related=timeline`), filtered by All / Activity / Discussion / Changes. A related
panel's header opens that list's whole table the same way (`?related=<object>.<field>`).
Each of those faces is also a tab: a row of tabs closes the record header, **Overview** first,
then one tab per related panel in the reader's order, then **动态** last, each with its count. The
row shows as many tabs as its width fits and folds the rest into a **+N** menu; the open tab
is always on the row, and **Overview** or Esc returns to the page.
the object: a header, the record's **details** (the **Details** tab), and one tab per related
list, then **Attachments** for an object with `enable: { files: true }`, **Approvals** when the
record has approval requests, and **动态** (Activity) last, each with its count. A relationship
whose child field declares `relatedList: 'primary'` is part of the record's body: its list is a
full-width table in the details, after the first field section, with no tab of its own. **动态**
(`?related=timeline`) holds the record's system entries: its activity and, with
`enable: { trackHistory: true }`, its field changes; there is no separate History tab. On the
desktop the record's comments are not in it but in the comment panel, opened from the
comments icon in the record header ([the record's comment panel](/docs/frontend/plugins/plugin-detail#the-records-comment-panel)); on a phone they are still
in **动态**, with its All / Activity / Discussion / Changes filter. A list's tab is that list's
whole table (`?related=<object>.<field>`). The tab row shows as many tabs as its width fits and folds the
rest into a **+N** menu; the open tab is always on the row. The related tabs are the reader's
to arrange: move one before or after its neighbour, hide one, and bring hidden ones back. The
arrangement is kept per user and object, never in the object's declaration.
Moving a child table into the record's body is therefore a one-word change on the
relationship field, not a page-authoring task, and `relatedList: false` leaves a child off the
page.

The Console lays the page out by the width of the surface it occupies (the full page, the split
pane or the drawer), never by the viewport, and by one rule. From 760 px the details sit beside
the right column, 320 px wide; from 1120 px the right column is 380 px and a details section
takes up to three field columns. Below 760 px (the split pane, a phone) the page is one column:
the details, then the right column's panels in their order. The **⊟** switch at the end of the
record header's actions (`⌘⇧,`) hides the right column for the reader, per object. The related
panels are the reader's to arrange, too: drag a panel's **⠿** handle (or **⌥↑** / **⌥↓** on it)
to reorder, hide a panel from its header, and bring hidden panels back from the column's last
line. The arrangement is kept per user and object, never in the object's declaration.

The related panels load in steps, and the details never wait for them. The page asks every
panel's count in one request set, sent beside the record read, and the panels show
placeholders until those counts land. A panel counted at 0 reads no rows, and two or more of
them fold into one line. A panel above 0 reads its first three rows once it scrolls into view,
asking only for the record's name field and one status or date field. In a drawer, the record
that **↑** / **↓** would show next has its related counts read ahead.
The Console lays the page out by the width of the surface it occupies, never by the viewport.
On a full page wide enough for a 320 px details column beside 400 px of tabs, the details are
pinned in a left column and the other tabs sit beside them, opening on the first: the column
is 400 px wide, narrows toward 320 px when the page is tight, and can be dragged (or moved with
←/→ on its edge); the width is kept per object, in the browser. A page without other tabs, or one
whose details hold a related table, draws the details across the page. Narrower full pages,
the drawer and a phone draw one column: the tab row, **Details** first, and the open tab
under it.

The related lists load in steps, and the details never wait for them. The page asks every
list's count in one request set, sent beside the record read, and draws each list's tab
before those counts land; a list counted at 0 reads no rows, and its tab is muted, with no
number. A list reads its rows when its tab opens. In a drawer, the record that **↑** / **↓**
would show next has its related counts read ahead.

### Slotted pages

Expand Down
Loading
Loading