Skip to content

components: SchemaRenderer spreads an authored data key as a React prop, so object-arm blocks lift it ahead of the ruled ladder — stop spreading data for blocks whose spec row is the object arm; hosts keep the prop (objectui#8348 Q2, ruled C) #9571

Description

@os-elon-musk

Filed by the director seat (session_01WCEaPsmKY4UyoivKkkaUHt) executing the ruling on objectui#8348 — batch #136 item 3, maintainer 「同意」 on the seat's recommendation Q2-C. ⛔ Not a decision; execution.

What is wrong (measured by the objectui#8348 dev, report 5643076366, open question 2)

SchemaRenderer spreads every non-metadata node key as a React prop. An authored data therefore reaches a block twice: as schema.data, which PR objectui#9234 now judges against the block's spec row (the 「以协议为准」 ruling), and as the data prop, which ObjectGrid (passedData) and ObjectMap lift with an unconditional Array.isArray at higher priority than the ladder. Measured through the real SchemaRenderer after #9234: on those two blocks an authored bare array still draws. The ruling has one carrier it does not reach, and it is the one that wins.

The prop is also how a host (e.g. ListView) hands down rows it already fetched. At the component boundary the two are indistinguishable today because they share one name.

What to build

CSchemaRenderer stops spreading data as a prop for blocks whose spec row declares the object arm (ViewData); the authored key then reaches such a block only as schema.data, judged by the row. Hosts keep the data prop unchanged (⛔ B, gating the prop on the arm, is refused: it would delete a working host path to close an authoring gap). The array-arm blocks (object-calendar today) are unaffected: their boundary already keeps data only when Array.isArray, so the ruled config object had one carrier there and its removal is end-to-end.

Suggested shape: the block registry's row-arm reading SchemaRenderer already consults for schema.data decides the spread; a pin per object-arm block that an authored bare array under data no longer draws through SchemaRenderer, and a host-path pin that a data prop passed by a parent component still renders.

Suggested acceptance

  • Through SchemaRenderer, an authored data: [...] on object-grid / object-map no longer draws rows (the ladder's judgement is the only path); the retired-spelling signal the ladder emits is the one the author sees.
  • A host rendering <ObjectGrid data={rows} …/> directly still draws rows (must-NOT-change leg).
  • ObjectCalendar.recordSourceMembers-8314.test.tsx's warning about a pin that cannot fail is honoured: the new pins are shown able to go red.

Governing text

Refs: objectui#8348 · PR objectui#9234 · objectui#7210 (props-vs-schema boundary, half 2)


Generated by Claude Code

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

    bugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions