Repository navigation
feat(studio): the publish panel names each change in words — properties by their form label, rules and groups by their label - #27885
Merged
Conversation
Claude-Session: https://claude.ai/code/session_01Utp6CZ5jdK8tmGe3uqdgUo Co-authored-by: Claude <noreply@anthropic.com>
…nd each rule by its label Claude-Session: https://claude.ai/code/session_01Utp6CZ5jdK8tmGe3uqdgUo Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZ5jdK8tmGe3uqdgUo Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe 席位核对ACCEPT · head
Generated by Claude Code |
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 Bill · project thread
维护者速读
+ sharingModel、+ config、+ validations),改为按该类型编辑表单上的字段名称显示(Sharing Model、Columns、Validations),验证规则和字段分组逐条按名称列出新增 / 修改 / 删除。ui/packages/app-shell/src/preview/DraftChangesPanel.tsx(computeChangeDetail的视图展开与列表条目),ui/packages/app-shell/src/preview/changeKeyLabels.ts(标签取自 spec 的METADATA_FORM_REGISTRY),新测试DraftChangesPanel.namedChanges-27835.test.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/preview/,预期 40 个文件全绿;或在 Studio 改一条验证规则后点发布,展开对象,看到「~ Validations」下列出该规则名称。Fixes #27835
Clause-②: no
Metadata-protocol: none
What changes
The Pending changes panel (
DraftChangesPanel) is the Studio publish summary too:StudioDesignSurfacerenders the same component in its confirm posture, so one change covers both surfaces the card names.preview/changeKeyLabels.ts, reads the item type's authoring form from the spec'sMETADATA_FORM_REGISTRY(the type-to-form map/meta/typesserves) and names a property the way the inspector'sSchemaFormrow does: the row's declaredlabel, else its prettified key (prettifyFieldName, the helper the Studio's held line already shares). The key follows as secondary text only when the label does not spell it,SchemaForm's machine-name rule. A property the form has no row for reads as its key, in monospace, as before. No key-to-label table lives in the panel. Changed field properties read through thefieldform the same way.diffListEntries(before, after, idKey). Flows keep calling it fornodesbyid(node rows unchanged). For every other type, a top-level list whose entries carry a distinctname(validation rules) orkey(field groups) gets its entries listed under the list's key row: added, changed (with what differs, by the list row's declared sub-row labels) and removed, each led by itslabel. A list of plain strings, or one with no such identity, stays one key row. The diff lands inEntryChangeDetail.entries, a Map keyed by the key as it appears inkeys;keysitself is unchanged in shape.draft.config, so aviewis compared insideconfig(config.columns), labelled from the view form. A non-view item still comparesconfigwhole.Tests
DraftChangesPanel.namedChanges-27835.test.tsx(12 tests): form labels for object, field, view-body and flow properties; a declared sub-row label; controls for a property, a type no form names; the rule added / changed / removed and the field group changed; controls for a string list and for a flow's other lists; a new view and a view edit compared insideconfig, with a non-view control; and the rendered drill-in for both.+ sharingModel→+ Sharing Model,~ label→~ Label,~ edges→~ Edges,· label→· Label,+ subject→+ Subject);protectionEnvelope's row reader now reads field and key rows by test id instead of the monospace class. Flow node row assertions are untouched and green.pnpm --dir ui exec vitest run packages/app-shell/src/preview/→ Test Files 40 passed (40), Tests 274 passed (274).pnpm --filter @object-ui/app-shell type-check→ exit 0.Ablations (each through scripts/ablation-replace.mjs, mutation proven on disk, restored to the HEAD blob)
formKeyLabelreturns no label (if (row || !row) return undefined;): 6 failed innamedChanges-27835+noChangeAndKeySplit-11807, restored.listEntryRowCount(list) < 0): 3 failed innamedChanges-27835, restored.config(type === 'NOT_view'): 3 failed innamedChanges-27835, restored.No build step: the panel tests import the source directly.
Acceptance notes
labelcounts as "a form label", the prettified key the inspector itself shows (most spec form rows declare none), and a property with no form row falls back to its key.translateSchemaFieldLabel, the dashboardmetadataFormsbundle) live in the metadata-admin string table, which this panel's eager graph must not import (the reason recorded oncomputeChangeDetail). A zh author therefore reads English property labels here, as on most inspector rows; noted, not filed.titleshows that title in the inspector (SchemaFormreads the JSON schema) but its prettified key here; this panel holds no JSON schema. Noted, not filed.@objectstack/spec/systemadds no new eager weight: every@objectstack/*module already rides the console'svendor-objectstackchunk (the measurement recorded in the panel's import comment).Verification
Local derived gates on head
b4396c78:node scripts/pm/dispatch-gates.mjs --commandsderived 34 families; all 34 ran with exit 0, and--ranreconciled "34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN".pnpm --dir ui run check:new-line-citations→ "0 new citation(s)". Every family CI runs is read from this PR's checks.Derived gates, exit codes captured before any pipe
🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CZ5jdK8tmGe3uqdgUo
Generated by Claude Code