Repository navigation
Commit d6be99d
feat(console)!: one way to open a record from an object's list; navigation.mode deprecated there (#35910)
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgEV9LRY8FfTWS7J6T3MwsSL)_
Fixes #35854
repo:objectstack#5 · os-bill · session_01Utp6Cb8qTxAVaE2QKwquQU
Clause-②: yes (narrowing)
Metadata-protocol: semantic
## 维护者速读
- 控制台对象列表里,点记录名称进整页;鼠标移到这一行时名称旁出现「在侧边打开」小图标,点它才从右侧打开抽屉;抽屉改成离窗口边 8
像素的浮动卡片;手机上没有图标,点记录就进整页。
- 属于「记录详情页重做」专题,按维护者「废弃」的裁决,去掉「打开记录:抽屉 / 整页」这个设置和抽屉的全宽状态。
- 每个用对象列表的人都会碰到;旧元数据照常加载,设为「不打开」的列表仍然点不开;改动可以整体撤回。
- 无。
## What changes
One way to open a record from an object's list in the Console, per the
maintainer's ruling on #35854
(「鼠标滑到…行,右侧显示一个右侧打开的图标,点击才从右侧打开,否则都是进全屏打开。这样就不需要任何设置」, then 「废弃」 for
`navigation.mode`).
- **The name opens the full page.** A click on the record's name (grid,
gallery, kanban, calendar, gantt, phone cards) opens `…/record/<id>`. A
⌘/Ctrl or middle click still opens it in a new tab.
- **「在侧边打开」 opens the drawer.** An icon drawn inside the name cell after
the name, shown while the row is hovered or focused (opacity, so it
keeps its Tab stop and accessible name), opens the record in the side
drawer over the list (`?recordId=`). A coarse pointer gets no icon.
`ui/packages/app-shell/src/views/objectViewOpenAsPage.tsx#OpenInSidePanelButton`.
- **No setting.** The Display menu's 「打开记录:抽屉 / 整页」 section and the
browser-kept preference behind it (`recordOpenPreference.ts`) are
removed.
- **The drawer is a floating card**: inset 8 px from the window's top,
right and bottom, rounded and shadowed. Its in-place full-width state
(`maximizable`) is gone; ⤢ opens the full page. The page's 「收为抽屉」 hop is
gone with it.
- **Provenance.** A page the list opens keeps the list in
`location.state.from` (URL, view name, the loaded rows and now the
matched `total`), so ↑ ↓ walk the list and a reload keeps it.
- **`navigation.mode` is deprecated** (`@deprecated`, `[DEPRECATED]`
describe; ADR-0087 D3 semantic entry
`navigation-mode-record-open-deprecated`). The key stays and every value
parses. On an object's list `drawer`, `page` and `new_window` change
nothing. **`none` keeps "rows open nothing"**, and the describe points
its author to `preventNavigation: true`. **`openNewTab: true` stays
live**: the name then opens the full page in a new tab, and the list
stays. The deprecation is scoped to an object's list (a list view, an
object's `listViews`): a page block that carries `navigation` (a list
block, the timeline, an embedded view) still honours `drawer`, `page`
and `new_window`, and the describe, the help text and the migration
entry say to keep the key there. The migration entry is not mechanically
convertible for that reason.
- The list view form's `navigation` help text follows the new describe
(`packages/spec/src/ui/view.form.ts`), and the metadata-form translation
bundles are regenerated from it. zh-CN, ja-JP and es-ES carry authored
text for the two changed leaves (`navigation.helpText`,
`navigation.mode.helpText`); the other locales keep the extractor's
English fill, as for other new leaves. The console's own zh-CN copy of
the view form
(`ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts`)
carries the same two leaves.
- **Toasts clear the floating drawer**
(`ui/packages/app-shell/src/chrome/ConsoleToaster.tsx`): the right-edge
drawer test accepts a dialog up to 16 px off the top, right and bottom
edges (it required exactly 0, so the card was missed and toasts fell
back to top centre, under it), and the clearance adds the card's right
and top insets.
**BREAKING** (`!` title, `Clause-②: yes (narrowing)`):
`NavigationOverlayProps.maximizable` (`@object-ui/components`) and
`ListViewProps.recordOpen` (`@object-ui/plugin-list`) are retired
runtime exports. The changeset carries the ADR-0087 `not-required
(runtime-export-retired …)` marker and a FROM → TO line for each;
`check:adr-0087-registration` passes.
Size: 3,189 changed lines, over the 3,000 line, so this lands through
the maintainer. Past the first 2,989 are the CI fixes, the zh-CN copy
and the review items (`openNewTab`, the changeset's migration lines, the
page-block scoping of the deprecation and the breaking declaration);
nothing was trimmed to fit.
Not here, by design:
- The two-row record header (#35853) follows as its own PR on this
branch once this one merges, to keep each under 3,000 changed lines.
That PR covers #35840.
- Governed follow-up: #35870 (ADR-0050 note and the `skills/**` mentions
of `navigation.mode`).
- #35875: the bare `/data` page (`ObjectDataPage`) still opens the
drawer on a row click; carded, not fixed here.
- #35915: the 7-locale `navigation` hint retranslation (see Found on the
way).
- #35936: the Studio kanban inspector still offers the deprecated
record-open choice; carded, not fixed here.
## Found on the way
- `ui/e2e/toast-under-modal.spec.ts` in the `Mobile Chrome` Playwright
project (not the one CI runs, `--project=chromium`): "390 phone drawer"
reads `beside`, not `below header`. That project's 980 px layout
viewport puts the sheet at the `sm` width, so the toaster sees room
beside it. Not fixed here.
- The `navigation` hint in the ar, de, fr, ko, pt-BR, ru and zh-Hant
metadata-form bundles is a translator's text of the old English ("drawer
by default"). These leaves are legacy-trusted, so nothing marks them
stale. Not changed here; carded as #35915.
## Why
The list had two ways to open a record, chosen by a per-reader setting
and by `navigation.mode`, and readers could not predict which one a
click would take. The ruling replaces both with one rule that needs no
setting.
## Tests
Added:
-
`ui/packages/app-shell/src/views/ObjectView.recordOpenPath-35854.test.tsx`:
name → page, icon → drawer, provenance and `total`, `openNewTab: true`
opens the page in a new tab, `none` and `preventNavigation` open
nothing.
- `ui/e2e/live/record-open-path-35854.spec.ts` (live lane): at 1280 px,
name → page; the position and view survive a reload; ↓ steps; the crumb
returns to the list. The hover icon goes from opacity 0 to 1 and opens a
card 8 px off three edges with no full-width toggle; ⤢ opens the page,
which still knows its list. A direct visit has no stepper. At 390 px
touch: no icon, and a tap opens the page, whose bar survives a reload.
Retired, because the behaviour they pinned is ruled out:
- `ObjectView.recordOpenPreference-26677.test.tsx`
- `ObjectView.recordOpenDisplay-26681.test.tsx`
- `ViewSettingsPopover.recordOpen-26681.test.tsx`
- `utils/recordOpenPreference.test.ts`
Migrated to the new rule. Each kept its subject, with "opens the drawer"
read as "opens the page" where the row opens:
- `ObjectView.recordDrawer-27545`, `.listOnlyRecordPage-33219`,
`.rowOpensNothing-33317`, `.cardFacesOpenNothing-33548`,
`.phoneRecordPage-27058`, `.listPageInUrl-30850`,
`.objectListTitle-27950`, `.recordCountFooter-10636`,
`.titleViewSwitcher-27594`, `.viewRefusal-12112`
- `RecordDetailView.paneOpenAsPage-27545`, `.topBar-27524`
- `recordDrawerStack-26679`, `recordPaneGroupScope-28461`
- `objectViewRecordNavigation.listRows-27524`, `.phonePush-29074`
- `navigation-overlay-drawer-27545`,
`navigation-overlay-field-escape-28156`, `record-top-bar-27524`
- `ViewSettingsPopover.optionsMenu-35551`
- `apps/console/src/__tests__/recordOpenFromEveryView-27057`: every view
now opens the record route. Its drawer-stack drill case is retired here;
that path is pinned in `recordDrawerStack-26679`.
- `packages/spec/src/ui/navigation-mode-retirement.test.ts`
Checklist items edited:
- `platform-core.url-overlay-contract` rev 6: steps[0] and fixtures say
the drawer opens from the hover icon, not the name.
<details><summary>Local runs (head before the push = this PR's
head)</summary>
- vitest, 502 files touching the open path or changed on main since the
base: `Test Files 502 passed (502)`, `Tests 6841 passed | 22 skipped`.
- `packages/spec` `src/ui`: `Test Files 183 passed`, `Tests 6554
passed`.
- live e2e `record-open-path-35854.spec.ts` against the workspace
backend + console dev: `4 passed`. One ablation run, with the hover icon
at opacity 100, sibling provenance dropped and the card inset removed,
turned 3 of 4 red (`Expected "0" Received "1"`, `Expected "2 / 14"`,
`Expected 8 Received 0`). The fourth, the direct visit, has no ablated
pin.
- After the CI fixes: `toast-under-modal.spec.ts --project=chromium`
13/13 (7 failed before, the same 7 as CI);
`packages/app-shell/src/chrome` vitest 28 files / 157 tests;
`@objectstack/platform-objects` `pnpm run test` 125 files / 2,094 tests
(8 failed before); `metadata-form-i18n` and the two `SchemaForm` tests
that read the zh-CN copy, 3 files / 46 tests.
- `dispatch-gates --ran`: 124 derived, 120 run, 4 NOT-MEASURED, all exit
3 prerequisites in this container (`check-plugin-teardown-shape` needs
an unshallow clone; `check:skill-examples` /
`check:dual-build-cjs-loads` / `check:type-check-debt` need a full
build). One exit 1: `pnpm --dir ui exec vitest run scripts/` was
OOM-killed in this container while reading a console build made on
another head. It touches nothing in this diff, so CI's run is the
verdict.
- `overlap-check`: main merges cleanly. #34223 conflicts in
`platform-core.json` at the same three hunks it already conflicts with
on main (its own item, not `url-overlay-contract`).
</details>
## Acceptance notes
- Read first, by risk:
`ui/packages/app-shell/src/views/objectViewRecordNavigation.ts` (the
open decision and provenance),
`ui/packages/app-shell/src/views/recordDrawerStack.tsx`
(`useRecordPageReturn`, the drawer frame),
`ui/packages/components/src/custom/navigation-overlay.tsx` (the floating
card, `maximizable` removed).
- Two-minute check: open any object list in the Console, hover a row,
and click the small panel icon after the name. The drawer opens as a
card that floats clear of the window edges. Click the name instead and
the full page opens.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Utp6Cbrs4FaLzn1HMmRDi1
<!-- signed: repo:objectstack#5 · os-bill ·
session_01Utp6Cb8qTxAVaE2QKwquQU -->
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1c4db09 commit d6be99d
81 files changed
Lines changed: 1201 additions & 1988 deletions
File tree
- .changeset
- content/docs
- references
- api
- data
- ui
- ui
- docs/qa/platform-checklist/areas
- packages
- platform-objects/src/apps/translations
- spec/src
- migrations/entries/semantic
- ui
- ui
- apps/console/src/__tests__
- e2e/live
- packages
- app-shell/src
- chrome
- utils
- views
- __tests__
- metadata-admin
- components/src
- __tests__
- custom
- i18n/src/locales
- plugin-list/src
- __tests__
- components
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1993 | 1993 | | |
1994 | 1994 | | |
1995 | 1995 | | |
1996 | | - | |
| 1996 | + | |
1997 | 1997 | | |
1998 | 1998 | | |
1999 | 1999 | | |
| |||
2045 | 2045 | | |
2046 | 2046 | | |
2047 | 2047 | | |
2048 | | - | |
| 2048 | + | |
2049 | 2049 | | |
2050 | 2050 | | |
2051 | 2051 | | |
| |||
2073 | 2073 | | |
2074 | 2074 | | |
2075 | 2075 | | |
2076 | | - | |
| 2076 | + | |
2077 | 2077 | | |
2078 | 2078 | | |
2079 | 2079 | | |
| |||
2125 | 2125 | | |
2126 | 2126 | | |
2127 | 2127 | | |
2128 | | - | |
| 2128 | + | |
2129 | 2129 | | |
2130 | 2130 | | |
2131 | 2131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| |||
0 commit comments