Skip to content

Commit d6f2478

Browse files
committed
docs(plugin-detail): mark the page options the default page no longer reads
BuildPageOptions.highlightFields, .statusField and .stages are accepted by buildDefaultPageSchema and buildDefaultTabs but read only by buildDefaultHighlights now that the default page draws no strip and no stage bar. Say so in their JSDoc and the changeset, and drop the two dead pass-throughs into synthTabs. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgTcbvQNTSr6ij3TMW7
1 parent 0178c30 commit d6f2478

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

‎.changeset/35891-record-page-no-stage-bar.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The details body now draws every field its groups hold: the highlight fields and
1717
`buildDefaultHighlights` and both blocks are kept: an authored page, or a slotted page's `highlights` slot, still places a strip and a path where it wants them.
1818

1919
- `@object-ui/components`: `RecordHeaderState` gains an optional `stage` renderer (with the exported `RecordHeaderStageParts`), which the header calls with the stage tag it would draw. Without a host bar (a phone) the header now draws the stage tag in the row under the record's name, beside the state's tags; before, a phone showed no stage at all.
20-
- `@object-ui/plugin-detail`: exports `RecordStageMenu`, the menu a host hands the header as `RecordHeaderState.stage`; `useStageChange` takes `{ collectFields: true }` for the fields-a-stage-needs dialog (`record:path` keeps its plain confirmation).
20+
- `@object-ui/plugin-detail`: exports `RecordStageMenu`, the menu a host hands the header as `RecordHeaderState.stage`. Its fields-a-stage-needs dialog comes from the package-internal `useStageChange` (`record:path` keeps its plain confirmation).
21+
- `@object-ui/plugin-detail`: `BuildPageOptions.highlightFields`, `.statusField` and `.stages` are still accepted by `buildDefaultPageSchema` and `buildDefaultTabs` but no longer do anything there, since the default page draws no strip and no stage bar; `buildDefaultHighlights` still reads them. Retiring them is objectstack#35943.
2122
- `@object-ui/i18n`: four `detail.stageMenu*` strings in every locale.
2223
- `@objectstack/lint`: `field-group-shadowed` no longer counts the highlight strip as hiding fields from the detail body, since the default record page leaves them in their groups; a group whose only visible member is the record title still warns.

‎ui/packages/plugin-detail/src/synth/buildDefaultPageSchema.ts‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,22 @@ export interface ObjectDefFieldLike {
142142
}
143143

144144
export interface BuildPageOptions {
145-
/** Override the auto-derived highlight field list. */
145+
/**
146+
* ACCEPTED BUT NEVER READ by {@link buildDefaultPageSchema} and
147+
* {@link buildDefaultTabs} (objectstack#35891). The default page draws no
148+
* highlight strip and no stage bar, and the Details body keeps every
149+
* grouped field (objectstack#35849), so these three keys have nothing left
150+
* to override there. Only {@link buildDefaultHighlights} reads them, for a
151+
* page that places the strip itself.
152+
*
153+
* They stay declared because this interface ships in a published `.d.ts`,
154+
* as `ObjectDefLike.primaryField` does (objectui#7287); removing them is
155+
* objectstack#35943's change, not a rider here.
156+
*/
146157
highlightFields?: string[];
147-
/** Override the auto-derived statusField / stages. */
158+
/** Accepted but never read by the default page — see `highlightFields`. */
148159
statusField?: string;
160+
/** Accepted but never read by the default page — see `highlightFields`. */
149161
stages?: Array<{ value: any; label: string }>;
150162
/** Override the auto-derived section grouping. The heading rides `label` —
151163
* the one slot `@object-ui/types` declares (objectui#6190). */
@@ -1178,8 +1190,6 @@ export function buildDefaultPageSchema(
11781190
sections: options.sections,
11791191
related: options.related,
11801192
approvals: options.approvals,
1181-
highlightFields: options.highlightFields,
1182-
statusField: options.statusField,
11831193
hideAttachments: options.hideAttachments,
11841194
hideDiscussion: options.hideDiscussion,
11851195
timeline,
@@ -1197,8 +1207,6 @@ export function buildDefaultPageSchema(
11971207
sections: options.sections,
11981208
related: options.related,
11991209
approvals: options.approvals,
1200-
highlightFields: options.highlightFields,
1201-
statusField: options.statusField,
12021210
hideAttachments: options.hideAttachments,
12031211
hideDiscussion: options.hideDiscussion,
12041212
timeline,

0 commit comments

Comments
 (0)