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 592845b
Browse filesBrowse the repository at this point in the historyBrowse files
feat(studio): Restore package original moves onto the override mark, in a popover that names what it overrides and its version (#29842)
<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbPFUgboizUXWX8RQ7py6Pfk)_Fixes#29692
Clause-②: no
Metadata-protocol: none
## 维护者速读
- **改了什么**:Studio 里「覆盖
XX」标记变成按钮,点开小气泡:写明覆盖了哪个包、基于哪个版本,底部是「恢复包原版」,仍走原来的确认框。各条目 ⋯
菜单里的「恢复包原版」去掉,只剩这一个入口;「自定义」保留标题行主按钮位。
- **为什么改**:ADR-0146 D2 要求恢复入口放在点名定制的地方;原来要在 ⋯ 菜单里找,且标记本身不说明基于哪个版本。
- **风险与回滚**:只动 app-shell 前端;恢复请求与原来逐字节相同(先删草稿,再删行,都带 `package=`
配对包),无元数据、接口和 i18n 键变化。回滚即 revert 本 PR。
- **先看**:`StudioCustomizeControls.tsx`(`StudioOverrideChip`
气泡)、`StudioItemHeader.tsx`(折进 ⋯ 菜单后,恢复时关掉菜单)、`StudioDesignSurface.tsx` /
`StudioBundleItemEditor.tsx`(去掉菜单项、接上 `onRestore`)。
- **两分钟验证**:窗口 1024 px、右侧面板打开,在 Studio 打开一个已定制的视图:⋯ → 点「覆盖 …」→
气泡里有版本句和「恢复包原版」→ 弹出确认框,菜单已关。键盘:⋯ 上 Enter,再 Enter 打开气泡,焦点在「恢复包原版」。
- **需要你做的**:无,席位落地。
## What changes
- **The override mark is the door.** `StudioOverrideChip` ("Overrides
HotCRM") is now a popover trigger. The popover
(`studio-override-popover`) names the package it overrides and the
version it was taken from (the existing `overridesTitle` sentence, which
was the chip's tooltip), and holds **Restore package original**
(`studio-override-restore`). Restore goes through the existing
confirmation dialog, and confirming sends the same two deletes at the
pair as before: its draft, then its row. Without `onRestore` (a
declaration served while the item is not in the pair) the popover shows
the facts only.
- **Every type that draws the mark gets it:** Interfaces views,
dashboards and reports (the item header), an object leaf's list view,
flows (Automations), and the All-metadata form editor
(`StudioBundleItemEditor`). Customize keeps the header's primary slot;
Restore is never a header button of its own.
- **One door.** The ⋯-menu Restore entries (`studio-restore-original`)
come out of the Interfaces item menu, `FlowItemMoreMenu` (its `restore`
prop is gone) and the bundle editor's menu. Each host's `inPair` is
`declaration !== null`, so everywhere Restore was reachable the mark is
drawn and carries it.
- **Folded into the ⋯ menu** (#29693's header fold): the mark sits in
the one `studio-item-header-folded-chips` entry. Its popover is a child
of that menu item in React's tree, so pointer, click and key events
inside it stop at the popover. Otherwise a pointer moving over the
popover focused the menu item and closed the popover. Restore there
closes the ⋯ menu before the confirmation opens
(`useStudioFoldedMenuClose`), so no hidden menu is left behind the
dialog to take the next Enter.
- `content/docs/build-without-code.mdx`: the sentence that sent the
reader to the ⋯ menu now points at the mark.
- No new i18n keys and no changed en values.
## Tests
- `StudioCustomizeControls.customize-28562.test.tsx`: the chip's facts
are on the popover; Restore asks once and closes; a disabled Restore
asks nothing; without `onRestore` the popover is facts only.
- `StudioItemHeader.titleRowFold-12897.test.tsx`, new describe for the
folded mark: one press opens one popover and the menu stays, a second
press closes it; Enter on the folded entry opens it; Restore asks once
and closes both the popover and the menu; a pointer moving and pressing
inside the popover neither focuses the entry nor closes the popover.
- `InterfacesPillar.customize-28562.test.tsx`,
`AutomationsPillar.customizeFlow-28570.test.tsx`,
`StudioBundleItemEditor.customize-28569.test.tsx`: Restore is driven
from the mark and the existing `resets` assertions (same two requests at
the pair) still hold; the ⋯ menus carry no `studio-restore-original`;
the dialog's item label equals the rail row's label (Interfaces
"Pipeline", flow "Notify owner").
- `ui/e2e/live/studio-customize-journey.spec.ts`: the Restore step
presses the mark in the row, or in the folded ⋯ entry when the row has
folded, then the popover's Restore.
<details><summary>Readings</summary>
- At head 9403cae: the five touched test files plus `itemTools-28239`
and `oneSurface-28572`, 7 files, 112 tests passed.
- Ablation of the two folded-menu fixes, one at a time, restored to the
committed blob: dropping the popover's event stops reds the pointer pin
(1 failed, 20 passed); dropping the menu close reds the Restore pin (1
failed, 20 passed).
- app-shell `type-check` (src and tests) exit 0; `type-check:e2e` exit
0; eslint on the touched files 0 errors.
- `pnpm --dir ui exec vitest run scripts/`: 170 files passed, 2 skipped.
`check:type-check-debt` exit 0. `check-i18n-en-drift`: no en value
changed.
- Derived gates (`dispatch-gates --commands`): 67 derived, 67 run, all
exit 0; `--ran` reconciles 0 NOT-MEASURED. `check-sdui-manifest` exit 0.
- Merged `main` right before opening (14 incoming commits, none touching
these files; no parallel fix found).
</details>
## Acceptance notes
- Dialog label (任务清单 vs "Task List"): not reproducible on this tree. In
zh the view leaf's dialog says 「任务清单」, as its header and rail row do; in
en it says "Task List". The dashboard reads 「图表画廊」, the object leaf's
list view 「全部任务」, and the flow "Notify on Task Completed", matching its
zh rail row (the flow has no translation). Pinned in tests against the
rail label.
- At about 1024 px with the right panel open every header folds, so the
folded state was measured there and the row state at 1440 px with the
panel open (object leaf list view).
- The live journey spec passes with `--timeout=180000` (41.6 s); under
the default 30 s test timeout it runs out in the later "Add region__c"
step on a Vite dev Console, after Restore has passed.
## Verification
Live on the showcase app (`objectstack dev --seed-admin --fresh`) with
the Console on Vite, Chromium, right panel open, overrides drafted in
the pair for a view, a dashboard, a flow and an object's list view. For
each, by mouse and by keyboard, at 1024 px (folded) and 1440 px:
| Item | Header | Mouse | Keyboard |
|---|---|---|---|
| View (Task List) | folded at 1024 and 1440 | popover stays open under
the pointer, exactly one, menu stays under it; Restore opens the dialog
and the menu is gone | Enter on ⋯ focuses the folded entry, Enter opens
the popover with focus on Restore, Enter opens the dialog |
| Dashboard (Chart Gallery) | folded at 1024 and 1440 | same | same |
| Flow (Notify on Task Completed) | folded at 1024 and 1440 | same |
same |
| Object list view (All Tasks) | folded at 1024, row at 1440 | same |
same |
Screenshots (en and zh) are with the seat.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01QsR2jUNJci3hxdpiN6RFQ1
---------
Co-authored-by: Claude <noreply@anthropic.com>
feat(app-shell): Studio's override mark opens a popover that names the customization and offers Restore package original
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
In Studio, the mark on an item customized into the base's pair ("Overrides HotCRM") used to tell you nothing more, and you had to find "Restore package original" in the item's ⋯ menu. The mark is now a button. Pressing it opens a small popover that says which package the item overrides and which version of it the customization was taken from, with a "Restore package original" button. That button asks through the same confirmation dialog as before, and confirming sends the same two deletes at the pair: its draft, then its row. Customize keeps the header's primary slot, and Restore is never a header button of its own. The ⋯ menus of the Interfaces item, the flow and the All-metadata form editor no longer list Restore, so the mark is the one place to find it. On a narrow header, where the mark folds into the ⋯ menu, it opens the same popover there. Choosing the folded entry with the keyboard opens it too. The popover stays open while the pointer moves over it, and Restore there closes the ⋯ menu before the confirmation opens.
Copy file name to clipboardExpand all lines: content/docs/build-without-code.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
@@ -35,7 +35,7 @@ Two properties make Studio safe to hand to non-developers:
35
35
36
36
## Setup — where the platform is administered
37
37
38
-
The **System Settings** app covers platform administration: user management and invitations, permission assignment, datasources (including federated external databases), diagnostics and audit logs, and the **Marketplace** — template apps such as HotCRM install with one click and appear alongside your own apps. Setup holds no metadata editor: its metadata pages open Studio, and an installed app is customized there. Open the app in Studio and every change lands in its paired customization package (`hotcrm.custom` for HotCRM), created on your first change and exported and deployed like any package, while what shipped stays the vendor's. **Customize** on a view, dashboard, report or flow saves your version as an override of the shipped one, marked with the app it overrides, and **Restore package original** removes it. **Add field** on a shipped object adds your own field, named with a `__c` suffix, and a shipped field's label, description, help text, placeholder and option labels can be changed, nothing else. A shipped flow's switch turns it off for this deployment, and **New similar** copies a flow or a permission set under a new name; a flow's copy starts switched off.
38
+
The **System Settings** app covers platform administration: user management and invitations, permission assignment, datasources (including federated external databases), diagnostics and audit logs, and the **Marketplace** — template apps such as HotCRM install with one click and appear alongside your own apps. Setup holds no metadata editor: its metadata pages open Studio, and an installed app is customized there. Open the app in Studio and every change lands in its paired customization package (`hotcrm.custom` for HotCRM), created on your first change and exported and deployed like any package, while what shipped stays the vendor's. **Customize** on a view, dashboard, report or flow saves your version as an override of the shipped one, marked with the app it overrides. Press that mark to see which version it was taken from, and **Restore package original** there removes it. **Add field** on a shipped object adds your own field, named with a `__c` suffix, and a shipped field's label, description, help text, placeholder and option labels can be changed, nothing else. A shipped flow's switch turns it off for this deployment, and **New similar** copies a flow or a permission set under a new name; a flow's copy starts switched off.
0 commit comments