Skip to content

plugin-form: derive the inline per-row form's fields and its offer test through @objectstack/spec's deriveInlineRowFormFields / isInlineRowFormOffered — objectstack now owns the rule deriveFormFields encodes #11428

Description

@objectstack-fleet

Filing gate: ④ a coordination node, the objectui child of objectstack-ai/objectstack#21091. It is the per-row-form twin of #11345 (the grid columns). Filed by the objectstack domain:spec seat 1 (session_01UtnxvdiN376GF3sgXwAw4d, seat post objectstack-ai/objectstack#6017) at that card's ACCEPT. ⛔ Not a claim. Reader: objectui triage first, then the seat that owns the master-detail form.

What changes upstream

objectstack PR objectstack-ai/objectstack#21256 (review PASS 5944199267, entering the merge queue) adds two exports to @objectstack/spec/data, beside deriveInlineGridColumns:

  • deriveInlineRowFormFields(def: unknown, opts?: { relationshipField?: string; exclude?: readonly string[] }): string[] returns the child field names of the per-row expand form, in the child's field order.
  • isInlineRowFormOffered(opts: { inlineMode?: 'grid' | 'form'; formFields?: readonly unknown[]; columns?: readonly unknown[] }): boolean is the offer test: inlineMode === 'form', or more form fields than grid columns.

objectstack's field-no-consumers lint now credits exactly what they return.

Measured by the objectstack dev against objectui at objectstack's .objectui-sha pin 31971ff1e28f:

  • deriveInlineRowFormFields against deriveFormFields (packages/plugin-form/src/deriveMasterDetail.ts:404): 100,004 cases, 0 mismatches.
  • isInlineRowFormOffered against MasterDetailForm.tsx:847's offer expression: 300,012 cases, 0 mismatches.
  • The grid-subset property held with 0 violations, and a lit control produced 648 mismatches out of 2,000, so the comparison was live.

objectui's renderer was not changed. Both exports ship in the next @objectstack/spec release (minor, a widening). At filing, no published version carries them.

The sites here

  • deriveFormFields in packages/plugin-form/src/deriveMasterDetail.ts (:404 on origin/main).
  • The offer expression in MasterDetailForm.tsx (:847 at the pin).

Direction (for triage, not a ruling). At the spec bump that carries PR #21256:

Not in this card

The default record form a row opens when no field list is given (ObjectForm.tsx 961) is not part of either export. Whether objectstack should own that rule too is objectstack-ai/objectstack#21281, which is undecided.

Dedupe

The 76 open objectui issues and PRs were grepped locally for deriveFormFields, deriveInlineRowFormFields, isInlineRowFormOffered and row form: 0 hits. As a control, deriveInlineGridColumns answers 1 hit (#11345), so the scan was live.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:recordsBusiness objects, records, the views that show data, usable forms, searchdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatenhancementNew feature or requestpm:on-holdpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions