Skip to content

[low-pri] Studio: curated inspector for joined-report blocks (generic SchemaForm today) #1966

Description

@os-zhuang

Summary

Found dogfooding report design in Studio. Authoring the blocks of a joined report uses the raw generic SchemaForm repeater, so it lacks the curated affordances the top-level report inspector (ReportDefaultInspector) has. Functional, but clunky.

Priority: Lowjoined is the least-used report type, and authoring is functional (you can build + save; the editor preview now renders them after #1965). This is friction, not a blocker.

Symptoms (all one root cause)

Per joined block, the inspector shows generic fields because blocks are array items rendered by the repeater without curated widgets/layout:

  • Dataset is a free-text input (no ref:dataset dropdown) — the author must type the exact dataset name.
  • Rows / Columns / Values are free-text tag inputs — no dataset-aware measure/dimension pickers (no catalog, no validation against the dataset's semantic layer).
  • The entire ChartConfigSchema is rendered inline for each block's optional chart (Title/Subtitle, X/Y axis, Series table, Colors, Height, Annotations, Tooltips/Zoom/Brush, Aria…) — dozens of fields that bury the block's data binding and make the form very long.
  • * "required" markers appear on the optional chart's xAxis/yAxis/type even though the whole chart is optional (markers come from the nested ReportChartSchema; leaving the chart empty is valid, so they mislead).

Root cause

joined blocks are a nested array edited via the blocks repeater, which renders each item from JoinedReportBlockSchema generically. The metadata-admin's curated inspectors operate per top-level metadata type (ReportDefaultInspector), not per nested array item — so blocks don't get the dataset dropdown / measure-dimension pickers / compact chart.

Suggested approach

Follow the dashboard-widget precedent (scoped inspector): let a joined block emit a selection and register a scoped BlockInspector (via registerMetadataInspector) that edits the selected block with curated controls — reusing the already-exported DatasetNamesEditor (measures/dimensions) and the ref:dataset dropdown from the top-level report inspector. This generalizes to other repeater-based authoring too.

Cheaper partial alternatives (lower value, with caveats):

  • Give the block dataset a dropdown — needs repeater-item widget hints.
  • Collapse the block's chart composite by default / suppress * on an optional composite — touches generic SchemaForm rendering (affects all optional composites), so weigh carefully.

Context

  • Found alongside the joined-preview fix fix(studio): preview joined reports in the report editor (was "design blind") #1965 (the editor now renders joined reports instead of the "bind a dataset" empty state).
  • Reference files: packages/app-shell/src/views/metadata-admin/inspectors/ReportDefaultInspector.tsx (curated top-level — the model to mirror), the blocks repeater path, and @objectstack/spec JoinedReportBlockSchema / ReportChartSchema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions