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 ff0d1f1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(console): split the app menu into 「设计布局」 (design mode) and 「编辑应用」 (Studio) (#36789)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8PanmkK2ui9up8s9dwHt89v)_Fixes#36758
Clause-②: yes (widening) — two new language-pack keys,
`topbar.designLayout` and `topbar.viewInStudio`, in every shipped locale
Metadata-protocol: none
## 维护者速读
-
管理员点开左上角应用名,下拉里原来的「编辑应用」拆成两行:「设计布局」进入页面上的设计模式(顶部横条也改叫「设计布局」),「编辑应用」直接打开本应用在
Studio 里的软件包;已安装的应用这一行显示「在 Studio 中查看」。
- 属于「设计模式」专题:原来「编辑应用」实际只能改菜单和页面布局,桌面上又没有任何地方能从正在用的应用进入 Studio。
- 只有能编辑元数据的管理员看得到这两行,各自沿用原来的显示条件;出错最多是入口文案或跳转位置不对,撤回这个 PR 即恢复原样。
- 无
## What changes
The sidebar's app-name menu (from 768 px up) had one row under the app
list, 「编辑应用」 / "Edit app", and it entered the design mode, which edits
only the app's layout (its menu, header pins, page arrangement). It now
has two rows, as ruled on the card (15:59Z 「编辑布局+编辑应用两行」, wording 「设计布局
编辑应用」):
- **「设计布局」 / "Design layout"** enters the design mode, on its existing
gate (`useEnterDesignMode`, unchanged). Icon: the design-mode bar's
pencil-ruler.
- **「编辑应用」 / "Edit app"** opens this app's package in Studio. Its target
and posture are `useAppStudioEntry`'s, the derivation the app switcher's
Studio row and the top bar's pencil already read, so the three cannot
disagree (an object page opens that object in the Data pillar, a
dashboard, page or report its design surface). An installed (read-only)
package's app reads **「在 Studio 中查看」 / "View in Studio"** behind an eye.
Its gate is the Studio entry's own (`useStudioEntryGate`: a workspace
admin holding `manage_metadata`, a package Studio lists; the console's
own apps get none). No new gate.
- The design-mode bar's title `designMode.title` becomes 「设计布局」 /
"Design layout" in every locale, and so do the strings that name the
mode: `designMode.leaveUnsaved`, `designMode.menu.newItemSavesAll`, the
report builder's `addsToMenu` (zh), `appMenuEmptyDescription`, and
Studio's two `engine.studio.data.appMenu.failed*` lines (en, zh).
- `ShellPageActions.tsx` imports `appStudioRoutePath` from
`utils/appRoute.js` instead of the `utils` barrel: the sidebar's suites
stub the barrel partially, and the menu now reads this hook.
- Docs: `content/docs/ui/actions.mdx` (the path to 「Header buttons」 now
goes through 「Design layout」) and the app-shell README's reverse-bridge
section.
Out of scope, per the card: dashboard and report editing (#36692, the
dashboard/report split) and record tabs in this mode (#36737, folding
record tabs into design mode).
## Why
The door's name promised the whole app and delivered the layout, and on
desktop no surface opened the running app in Studio (`AppSwitcher`'s
Studio row only draws where `AppHeader` does: phone, docs, design mode).
## Tests
- `SidebarAppMenu-36112.test.tsx`: both rows, their order in one group
with 「Add app」, the design-layout door turning the mode on, the Studio
row's target on an object route
(`/studio/com.acme.crm/data?surface=object:crm_lead`) and on a dashboard
route (`…/interfaces?surface=dashboard:pipeline`), the read-only
posture's 「View in Studio」 behind an eye, the Studio row drawn without a
design-mode shell, and the member / non-author / Setup controls. A words
block reads the built-in packs: zh-Hans `topbar.designLayout` =
`designMode.title` = 「设计布局」, `topbar.editApp` = 「编辑应用」,
`topbar.viewInStudio` = 「在 Studio 中查看」; every pack names the door as its
bar.
- `designMode-36362`, `DesignModeMenu-36363`,
`UnifiedSidebar.hiddenCollapse-35062`: the renamed bar title, leave
prompt and door.
- `de-quote-pairing-3876`: the de pack's paired-quote count 133 → 134
(the new „Layout gestalten“ span).
Local runs at `7274e5e9f` minus the changeset-only last commit (code
unchanged since):
<details><summary>Local readings</summary>
- `pnpm --dir ui exec vitest run
packages/app-shell/src/layout/__tests__/` → Test Files 158 passed (158),
Tests 1324 passed (1324)
- `pnpm --dir ui exec vitest run
packages/app-shell/src/layout/__tests__/designMode-36362.test.tsx
packages/app-shell/src/layout/__tests__/DesignModeMenu-36363.test.tsx
packages/app-shell/src/console/` → Test Files 300 passed (300), Tests
2529 passed (2529)
- `pnpm --dir ui exec vitest run packages/i18n/` → Test Files 107 passed
(107), Tests 2006 passed, 13 skipped
- `pnpm --filter @object-ui/app-shell type-check`, `pnpm --filter
@object-ui/i18n type-check` → exit 0
- `pnpm check:nul-bytes`, `check:doc-authoring`, `check:role-word`,
`check:closed-ceremony-text`, `check:published-readme-links`,
`check-empty-changeset`, `check-changeset-no-major` → exit 0
- `node scripts/pm/overlap-check.mjs` → VERDICT clean (origin/main and
#36525)
- The rest of the derived gate families (`dispatch-gates.mjs
--commands`) are left to this PR's CI.
</details>
## Acceptance notes
- **Deviation from the card body, accepted by the seat:** the card said
to rename `topbar.editApp` to a layout wording. That key also names the
top bar's Studio pencil (`AppHeader`), so renaming it would have
mislabelled Studio. Instead `topbar.editApp` keeps 「编辑应用」 and now names
the Studio entry everywhere; two keys were added, `topbar.designLayout`
(the door) and `topbar.viewInStudio` (the read-only Studio row). Hence
`Clause-②: yes (widening)`.
- The Studio row is drawn while the design mode is on, as the app
switcher's is; leaving for Studio with staged changes asks first through
the shell's unsaved-edits guard.
- Translations other than zh-Hans / zh-Hant / en were written for this
PR (ar, de, es, fr, ja, ko, pt-BR, ru) and have not been reviewed by a
native speaker.
## Verification
Browser, showcase stack (`objectstack dev --seed-admin --fresh`, console
on Vite), admin, 1440 × 900, zh-CN. Frames are attached to the card
thread from `/mnt/project-files/issue-36758/`:
1. Showcase (installed, read-only) app menu: 功能展示 · 系统设置 | 设计布局 · 在
Studio 中查看 · 添加应用.
2. 「在 Studio 中查看」 lands on
`/studio/com.example.showcase/interfaces?surface=page:showcase_capability_map`
(the page on screen).
3. 「设计布局」 turns the mode on; the bar reads 设计布局 · 取消 · 保存.
4. A self-built app (new in Studio, 客户回访 with one object) menu: 设计布局 ·
编辑应用 · 添加应用.
5. 「编辑应用」 lands on
`/studio/com.default.kehu-hui-fang/data?surface=object:kehu_hui_fang_hui_fang_jilu`.
Two-minute check: sign in as an admin, open any app built in Studio,
click the app name at the top of the sidebar, and choose 「编辑应用」: Studio
opens on that app's package.
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes. (lint left to CI)
- [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. (not touched)
- [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 by [Claude
Code](https://claude.ai/code/session_01JQwxbWTEmq1ogAGwhMbGtf)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01JQwxbWTEmq1ogAGwhMbGtf
<!-- signed: repo:objectstack#1 · os-warren ·
session_01JQwxbWTEmq1ogAGwhMbGtf -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
fix(console): the app-name menu offers 「Design layout」 for the design mode and 「Edit app」 for Studio
7
+
8
+
Clause-②: yes (widening)
9
+
Metadata-protocol: none
10
+
11
+
The app-name menu's 「Edit app」 entered the design mode, which edits only the app's layout (its menu, header pins and page arrangement), and no desktop surface opened the app itself in Studio. The menu now has two entries under the list of apps, in one group with 「Add app」:
12
+
13
+
- 「Design layout」 (zh 「设计布局」) turns the design mode on, on the same condition as before. The mode's bar now reads 「Design layout」 too, and so do the strings that name the mode (the leave prompt, the menu editor's notes).
14
+
- 「Edit app」 (zh 「编辑应用」) opens this app's package in Studio, on the app switcher's Studio target: an object page opens that object in the Data pillar, a dashboard, page or report its design surface. An installed (read-only) package's app reads 「View in Studio」 (zh 「在 Studio 中查看」) behind an eye instead, and opens Studio's browse-only posture. It is offered on the Studio entry's own condition: a workspace admin holding `manage_metadata`, on an app whose package Studio lists (the console's own Setup, Studio and Account apps get none).
15
+
16
+
Two locale keys are added in every built-in pack, `topbar.designLayout` and `topbar.viewInStudio`; `topbar.editApp` keeps its words and now names the Studio entry wherever it is drawn.
0 commit comments