Repository navigation
fix(studio): explain each control the field inspector locks in display-patch mode - #29081
Merged
Merged
Conversation
…y-patch mode Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVM5iRVAwVwYSkX5u7
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jVM5iRVAwVwYSkX5u7
This was referenced Nov 2, 2026
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T07:21ZHead-sha:
|
This was referenced Nov 2, 2026
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Fixes #28986
Clause-②: no
Metadata-protocol: none
维护者速读
.custom包定制)下,每个被锁住的控件(API 名、类型、必填/唯一、默认值、选项值与颜色、跟踪历史、三个条件规则编辑器、上移/下移、删除等)外面多了一层可 Tab 聚焦的包装:悬停或键盘聚焦时弹出提示,读屏通过 aria-describedby 读到顶部那句「此字段属于已安装的包:你只能修改它的……」。可编辑的标签、描述、帮助文本、占位符、选项标签不加包装、不带原因。ux-conventions.disabled-control-reason的回归行由 PASS 变 FAIL;这是 18.3.0 发版前的回归。ui/packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx的DisplayPatchLock与DisplayPatchReasonContext,然后同文件OptionsEditor里选项值与选项工具条的包装;测试ObjectFieldInspector.displayPatchReason-28986.test.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.displayPatchReason-28986.test.tsx,预期 1 个文件、16 个测试全绿。What changes
ObjectFieldInspectorgains a module-privateDisplayPatchLock. In display-patch mode (BaseFieldDisplayPatchContexton,readOnlyoff) it wraps a locked control, or one row of them, in arole="group"tab stop withdata-disabled-reason.aria-describedbyon that wrapper points at the existing whitelist sentence at the top of BASIC (field-base-patch-only, which now carries an id), and a Radix tooltip shows the same sentence on hover and on focus. This is the shapeDeclaredActionsBar(objectui#11811) and the read-only rail (objectui#12303) already use. In any other mode the lock renders its children unchanged.InspectorShelldraws the header and footer itself, so the inspector hands the reason through a context provided around the shell, and the options editor reads it from there too.StudioDesignSurface.tsx: a comment only, atfieldRailReadOnly, saying where the reason for a base field's locked controls now lives. The rail's read-only wrapper is unchanged.Tests
ObjectFieldInspector.displayPatchReason-28986.test.tsxmounts the real inspector under the display-patch context, over six fields (text, select with options, lookup, number, formula, currency):aria-disabledor Radixdata-disabled) sits in a[data-disabled-reason]wrapper withtabindex="0"whosearia-describedbyresolves to the whitelist sentence;DataPillar.baseObjectExtension-28575.test.tsx(the real Data pillar): therequiredcase now also asserts the Required box's wrapper is a tab stop described by the sentence, and that the Label input has no wrapper.Acceptance notes
ux-conventions.disabled-control-reasonre-measures it here.ddlLockedfrom an external binding) keep their own badge and are unchanged.Verification
New pin · 16/16, and 15 red against main's inspector
pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.displayPatchReason-28986.test.tsxunderos-verify-lock: Test Files 1 passed (1), Tests 16 passed (16).Reverse check at
97144b76:ObjectFieldInspector.tsxrestored fromorigin/main(ab085a04,DisplayPatchLockcount 0 on disk), the new file plusDataPillar.baseObjectExtension-28575.test.tsxrun: Tests 15 failed, 11 passed. The 14 display-patch cases and the 28575requiredcase failed; both CONTROL cases and the rest of 28575 passed. Restored withgit checkout HEAD --, blob hash back to4509f157,git diff HEADempty.Every test file naming the field inspector · 61 files
git grep -l -E "ObjectFieldInspector|field-base-patch|BaseFieldDisplayPatchContext|fieldRailReadOnly|data-field-inspector"over ui test files: 61 files in two locked batches at--maxWorkers=2. Test Files 31 passed, Tests 215 passed; Test Files 30 passed, Tests 400 passed. This is a declared narrowing; CI's Test UI runs the rest of app-shell.Type check and lint
turbo run type-check --filter=@object-ui/app-shell(65 tasks, includestsc -p tsconfig.test.json): exit 0.eslinton the three changed.tsxfiles: 0 errors, 15 warnings, all on lines that predate this diff (re-indentedanycasts in the rule editors, and two existing hook warnings).pnpm --dir ui run check:new-line-citations: 0 new citations.Derived gates
node scripts/pm/dispatch-gates.mjs --commandsderived 34 commands against merge baseab085a048at head97144b76. All 34 ran and exited 0, includingcheck-sdui-manifest.mjsand its--self-test,check:type-check-debt,check:nul-bytes,check:cross-package-test-inputs,check:test-source-aliasandpnpm --dir ui exec vitest run scripts/(Test Files 169 passed, 2 skipped; Tests 4900 passed, 2 skipped).dispatch-gates --ranreconciled 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.origin/mainmoved 9 commits since the base, none touching the three changed source files.Generated by Claude Code