Skip to content

Split Property Definition attributes into constraints/displayAttributes#628

Closed
JeroenDeDauw wants to merge 1 commit into
masterfrom
split-property-definition-attributes
Closed

Split Property Definition attributes into constraints/displayAttributes#628
JeroenDeDauw wants to merge 1 commit into
masterfrom
split-property-definition-attributes

Conversation

@JeroenDeDauw
Copy link
Copy Markdown
Member

@JeroenDeDauw JeroenDeDauw commented Feb 22, 2026

I now think this is the wrong approach

First implementation step towards the proposed Views approach. Pending ADR acceptance.

Follows

Summary

  • The JSON serialization format for Property Definitions now nests type-specific attributes into
    constraints and displayAttributes objects, preparing for the Views feature where display
    attributes can be overridden per-View while constraints cannot.
  • Domain objects (PHP classes and TS interfaces) remain flat — the nesting is only at the
    serialization boundary, avoiding changes to internal consumers like renderers, validators,
    and editors.
  • Only NumberProperty currently has a display attribute (precision). Other types have only
    constraints.

Test plan

  • PHPUnit: 462 tests pass
  • PHPStan: 0 errors
  • TS tests: 584 tests pass
  • TS lint: 0 errors
  • TS build: successful

🤖 Generated with Claude Code

@JeroenDeDauw JeroenDeDauw marked this pull request as draft February 22, 2026 22:56
The JSON serialization format for Property Definitions now nests
type-specific attributes into `constraints` and `displayAttributes`
objects, preparing for the Views feature where display attributes
can be overridden per-View while constraints cannot.

Domain objects (PHP classes and TS interfaces) remain flat — the
nesting is only at the serialization boundary. This avoids breaking
internal consumers like renderers, validators, and editors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JeroenDeDauw JeroenDeDauw force-pushed the split-property-definition-attributes branch 2 times, most recently from e12dc0b to 7388a20 Compare February 22, 2026 23:50
@JeroenDeDauw JeroenDeDauw deleted the split-property-definition-attributes branch February 23, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant