Skip to content

Report Builder: per-brick width editing in the builder UI #598

Description

@nielsdrost7

Parent: #130 (Report Builder) · Hanging item from #608

Story
As a company admin, I want to set a brick's width (⅓, ½, ⅔, full) from the builder, so I can put two bricks side by side without editing JSON.

Current state (as of PR #608)
The data model fully supports widths: bands.json entries carry width (ReportBlockWidth enum), ReportRenderer lays them out on a 12-column grid, and MasonDocumentConverter round-trips the value through the mason editor inside the reserved _width config key. What's missing is any UI to change it — and one known edge: saving a brick's config slide-over rebuilds the config from the form fields, which drops _width and silently resets the brick to full width (mason's BrickAction owns that flow; see Modules/Core/Mason/MasonDocumentConverter::WIDTH_KEY).

Approach candidates (decide in implementation)

  1. Inject a shared width Select into every brick's configureBrickAction() schema via the ReportBrick base class — fixes the reset edge for free since _width becomes a real form field.
  2. A per-brick "width" action on the builder page (like move-to-band) operating on the mason state.

Acceptance criteria

  • Width is editable per brick instance in the builder (all four ReportBlockWidth values)
  • Saving a brick's config slide-over no longer resets its width
  • Width persists through save → reload → render (bands.json width field, not config)
  • PHPUnit: builder page test setting a width and asserting the persisted bands.json entry

Metadata

Metadata

Assignees

No one assigned

    Labels

    refinedRefined with SMART plan / test suggestions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions