Repository navigation
Commit 0c7e95a
fix(app-shell): Studio's rails mark a customization with a short word, no fill, instead of a filled plus that read as an add button (#30468)
domain:ui#5 · os-sales · session_01L6bhgXtD8kC2LpK5YoB2sK
<!-- claude-projects-attribution: {"github_login":"os-sales"} -->
_Requested by **Sales** · [project
thread](https://claude.ai/code/project/chan_01D5bWFY3rFzgJcytD5gD4Uu?thread=cmsg_01D5bWFY3rFzgJcytD5gD4UuGDAtpB63x28wJ1Y26PFgRx)_
Fixes #30070
Clause-②: yes (widening)
Metadata-protocol: none
## 维护者速读
- 改了什么:Studio
左栏里定制过的行,原来右侧是一个带底色的小方块图标(新增是绿底加号),现在改成一个彩色短词、没有底色:中文「定制」「新增」,英文「Custom」「Added」。鼠标悬停的提示和读屏名称不变,仍是完整说明(「已定制(CRM)」加定制包那句话)。
- 为什么改:绿底加号看起来像「添加」按钮,维护者点过一次没反应;裁决 6631229752 选
A:用文字、不要底色、保留提示、点击仍只是选中这一行。
- 风险与回滚:只改一个展示组件的紧凑分支和一个新词条(en/zh 各一行),不动数据和接口;英文比原来的 18px 图标宽约
22px(Custom 40px),行名会多截一点;回滚即还原本 PR。
-
先看:`ui/packages/app-shell/src/views/studio-design/CustomizationMark.tsx`
的 `if (compact)` 分支、`StudioDesignSurface.oneSurface-28572.test.tsx`
的「the rail mark never takes the row’s
name」用例、`ui/packages/i18n/src/namespaces/studio/en.ts` 的
`engine.customizationMark.customizedShort`。
- 两分钟验证:`pnpm --dir ui exec vitest run
packages/app-shell/src/views/studio-design/StudioDesignSurface.oneSurface-28572.test.tsx`,预期
27 个用例全绿。
- 需要你做的:无,席位落地。
## What changes
- **The compact mark.** `CustomizationMark`'s `compact` branch (every
pillar rail row through `RailCustomizationMark`, and the Interfaces
rail's navigation-override mark, which wraps it in its popover button)
no longer draws an 18×18 filled block with a lucide glyph. It prints one
short word in the kind's colour with no background: `customized` reads
the new `engine.customizationMark.customizedShort` (定制 / Custom),
`added` reads the existing `engine.customizationMark.added` (新增 /
Added). Its `role="img"`, accessible name (the full label, e.g.
已定制(HotCRM)) and tooltip (that label, then the sentence naming the pair)
are unchanged. It carries no handler: a click on it is a click on its
row.
- **The non-compact chip** (All metadata lists) is unchanged.
- **i18n (the widening).** One new `studio` namespace row in en and zh:
`engine.customizationMark.customizedShort`.
- **Comments.** `CustomizationMark.tsx` and `RailCustomizationMark` say
the mark is a word, no fill, and not a control.
- **Changeset.** `.changeset/30070-customization-mark-words.md`,
`@object-ui/app-shell` and `@object-ui/i18n` patch.
Branch: the harness-assigned `claude/project-thread-p3zei2`, not
`claude/issue-30070-*`; the card is #30070.
## Tests
`StudioDesignSurface.oneSurface-28572.test.tsx`'s rail-mark case (it
pinned `textContent ''`) now pins: the customized mark prints
`engine.customizationMark.customizedShort`, the added mark prints
`engine.customizationMark.added`, both keep the full label as accessible
name and tooltip head, neither holds an `svg`, and neither carries a
`bg-` class. Expectations are read from Studio's table, never retyped.
## Acceptance notes
- **The English word is `Custom`, not `Customized`.** The ruling names
the zh words only. Measured on the example CRM's automations rail (row
223 px wide): 定制 and 新增 are 22 px each (the glyph was 18 px), `Added` is
34 px, `Customized` was 61 px and cut the selected row to "Convert
Lea…", `Custom` is 40 px. The seat may prefer another word; it is one en
row.
- `InterfacesNavRail.tsx` was not edited (PR #30401 holds it). Its
`InterfacesNavOverrideMark` doc comment still says "the compact
customized glyph"; the comment is now stale wording only, behaviour
measured below. Left for whoever next touches that file.
- `KIND_CLASS` (the filled colours) now serves the non-compact chip
only; `customizationOf` has no compact caller and would print its full
label if one appeared.
## Verification
Gates and tests ran on `cabd8ba8`; the head adds an evidence commit and
its removal, the tree is byte-identical (`git diff cabd8ba HEAD` is
empty). Base `b6caa141`.
<details><summary>Live rig and screenshots (zh-CN and en-US, 1440
wide)</summary>
`examples/app-crm` `objectstack dev --seed-admin --fresh` on a private
port, the console via `vite` in `ui/apps/console` with
`DEV_PROXY_TARGET`, Chromium. `POST
/api/v1/packages/com.example.crm/ensure-customization` made
`com.example.crm.custom`; through that pair, an override of flow
`crm_convert_lead_wizard` and of app `crm_app` (navigation), and a new
flow `crm_custom_follow_up_reminder`, each saved as a draft and
published. Before = `CustomizationMark.tsx` restored to the base on the
running vite, then restored to `HEAD` (blob equal).
Measured marks (`data-testid="customization-mark"`): before, every mark
18 px wide with a filled background and an `svg`; after, background
transparent, no `svg`, widths 定制 22, 新增 22, Custom 40, Added 34.
Clicking the Interfaces heading mark still opens the override popover
with 恢复软件包原版; clicking the 新增 mark on a rail row selects that row
(`?surface=flow:crm_custom_follow_up_reminder`).
Before, automations, zh / en:


After, automations, zh / en:


Before / after, interfaces (navigation-override mark beside the
heading), zh / en:




After, the override popover still opens from the mark:

</details>
<details><summary>Tests, ablation, typecheck, lint</summary>
- Every test file that names the mark (`git grep` for
`customization-mark`, `CustomizationMark`, `customizationMark.`,
`RailCustomizationMark`, `if-nav-override-mark` under
`ui/**/*.test.ts*`: 9 files) plus
`packages/i18n/src/__tests__/studio-namespace.test.ts` and
`studio-namespace-lazy.test.tsx`: Test Files 11 passed (11), Tests 230
passed (230), lock VERDICT command-exit 0. A first run over all of
`studio-design/` and `metadata-admin/` (556 files) was stopped for time;
CI's Test UI runs the full set.
- Ablation 1 (`scripts/ablation-replace.mjs`, anchor x1 to x0): the
compact word replaced by `{null}`: 1 failed / 26 passed (`expected '' to
be 'Custom'`). Restored, blob equals HEAD, `git diff HEAD` empty.
- Ablation 2: the compact class list given the filled `KIND_CLASS` back:
1 failed / 26 passed (`not to match /(^|\s)bg-/`). Restored, blob equals
HEAD.
- `pnpm --filter @object-ui/i18n --filter @object-ui/app-shell
type-check` (both `tsc --noEmit` and `tsc -p tsconfig.test.json`): lock
VERDICT command-exit 0.
- `pnpm --dir ui run check:spec-symbols`: exit 0.
- eslint on the five changed source files: exit 0, warnings only on
lines this PR does not change.
- `pnpm check:new-line-citations` (ui): 0 new citations, exit 0.
</details>
<details><summary>Derived gates (35/35 exit 0)</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 35 families at `cabd8ba8`; every one
ran and exited 0. `--ran` reconciliation: 35 derived, 35 run, 0
NOT-MEASURED (a derived zero, every line carries an exit code). `pnpm
--dir ui exec vitest run scripts/`: 170 files passed, 2 skipped; 4985
tests passed, 2 skipped. CI runs the rest.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L6bhgXtD8kC2LpK5YoB2sK)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L6bhgXtD8kC2LpK5YoB2sK
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent a1d0b1e commit 0c7e95a
6 files changed
Lines changed: 39 additions & 21 deletions
File tree
- .changeset
- ui/packages
- app-shell/src/views/studio-design
- i18n/src/namespaces/studio
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
| 467 | + | |
| 468 | + | |
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
483 | 488 | | |
484 | 489 | | |
485 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3682 | 3682 | | |
3683 | 3683 | | |
3684 | 3684 | | |
| 3685 | + | |
3685 | 3686 | | |
3686 | 3687 | | |
3687 | 3688 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3257 | 3257 | | |
3258 | 3258 | | |
3259 | 3259 | | |
| 3260 | + | |
3260 | 3261 | | |
3261 | 3262 | | |
3262 | 3263 | | |
| |||
0 commit comments