Skip to content

Set a property's Display Attributes in the Layout editor - #1913

Draft
alistair3149 wants to merge 1 commit into
alistair3149/shared-list-rowfrom
alistair3149/display-attributes
Draft

alistair3149 wants to merge 1 commit into
alistair3149/shared-list-rowfrom
alistair3149/display-attributes

Conversation

@alistair3149

@alistair3149 alistair3149 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Fixes #693

A shown property whose Property Type has Display Attributes, today a Number's precision, opens a pane of its own in the Layout editor, from its row's chevron or by clicking it in the preview. An empty field takes the Schema's setting, and an icon button resets an override. The property list splits into Shown and Hidden groups on the shared editor row, and dragging a property from one group to the other shows or hides it. Extensions give a Property Type a displayAttributesEditor, which emits the attributes it changes.

Builds on #1887: merge that first.

Human input

Goal and shape: set by @alistair3149 and designed with Claude on a canvas; Claude made the technical design within it.

  • Directions: take on Display Attributes and the layout of the Layout editor's property list; base the work on Mark errors on the Schema editor's rows, in one row shared with the Subject editor #1887.
  • Redirections: the list "should be flushed to the edge", on the shared row item component; the reset as "just an icon button" rather than a labelled one; the editor contract to emit a patch, as the Schema editor's attributes editors do; unsaved Display Attributes marked with the Subject editor's unsaved indicator, in place of a "Changed in this Layout" line; "Show all" without "properties", at the end of its heading; a compact pane heading, the back button an icon beside the property's name, without the Property Type, which tells the reader nothing to act on.
  • Questions that changed or tested a call: whether one list with a filter, as design tools' layer panels have, would work better; the two groups stay until users need a filter. Whether hidden properties should drag too, to show or hide them; they do, in this PR. Whether the groups' counts give the reader anything; Claude dropped them, as the rows under each heading show as much.
  • Choices: rows with the type's icon first, over the Schema editor's two-line row; a property's own pane for its Display Attributes, as the option that scales; a pane only for rows whose type has Display Attributes; extension types give their own fields; only shown properties open one; a click in the preview opens it; an empty field takes the Schema's setting; the Layout creator keeps its list without panes.
  • Alternatives @alistair3149 weighed: fields under the row, a panel under the list, a popover; one list with a Shown/Hidden filter or a search.

Outcome: design reviewed by @alistair3149 on canvas boards, one of them playable, and the built UI tried by @alistair3149 on the dev wiki; architecture and code not reviewed by a human. Left for you: the contract, the code.

Claude's calls

  • Not discussed with @alistair3149: an invalid precision shows an error but does not hold Save, which keeps the last valid value; each group is a listbox with arrow keys, and Alt+arrows move a shown row; the wheel guard moved into NeoNativeInput, so the Schema editor's number fields stop stepping under the wheel too; EditorListItem gains an always-visible end slot and an unselectable flag.
  • Considered by Claude, omitted: holding precision to whole numbers up to 100, which the Schema editor lacks too (above 100, toFixed throws), for a PR of its own.
  • Not verified: Firefox and Safari; widths below desktop; screen readers, where Chromium flattens the buttons inside the rows' options, as in the shared row's other lists.
  • Where your judgment helps: DisplayAttributesEditorContract.ts and the optional displayAttributesEditor, both alpha public API (ADR 24).

Release notes

In the Layout editor, set how a Layout shows a property, such as a number's precision.

Verification evidence
  • In the dev stack on Mark errors on the Schema editor's rows, in one row shared with the Subject editor #1887's tip 1b8807a: vitest 4104 tests (one-off node container), eslint, stylelint, vue-tsc and build pass; make ci 5212 PHPUnit tests (10 skipped) and PHPStan; make browser-test 13 passed.
  • Each new behaviour has a test seen failing first. Playwright on the dev wiki: opening, editing, resetting and going back; dragging between the groups, with the preview following; the keyboard; the chevron by click and tap; a reorder menu drawn over a chevron; the Layout creator; no page errors.
  • A same-session /pr-review: code-review at max, security-review (nothing exploitable), review-tests (66 mutants, gaps filled), an escalated design pass, correctness and complexity second opinions, simplify. Its 8 blockers were fixed before this commit.

AI-authored — Claude Code, Opus 5.5, on a Professional Wiki account; @alistair3149 set the goal and chose the design on a canvas (the rows, a pane per property and its heading, the groups, the icon reset, the unsaved mark, the patch contract), the technical design Claude's; design reviewed by @alistair3149 on the canvas and the UI tried by @alistair3149 on the dev wiki, code not reviewed by a human

@alistair3149 alistair3149 added the UX Improvement to User Experience label Nov 20, 2026
@alistair3149
alistair3149 force-pushed the alistair3149/display-attributes branch from 0496a08 to ed515a5 Compare November 20, 2026 22:22
A shown property whose Property Type has Display Attributes, today a Number's precision, opens a pane of its own in the Layout editor, from its row or by clicking it in the preview. An empty field takes the Schema's setting, and an icon button resets an override. The property list splits into Shown and Hidden groups on the shared editor row, and dragging a property from one group to the other shows or hides it. Extensions give a Property Type a `displayAttributesEditor`, which emits the attributes it changes. Number fields no longer step their value under the scroll wheel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alistair3149
alistair3149 force-pushed the alistair3149/display-attributes branch from ed515a5 to d6ba9da Compare November 20, 2026 22:33
@alistair3149

Copy link
Copy Markdown
Member Author
layout-editor-display-attributes.mp4

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

Labels

UX Improvement to User Experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant