Skip to content

refactor!: make the form widgets, FieldRow and FieldGroup final - #6761

Merged
gharlan merged 1 commit into
6.xfrom
final-form-widgets
Oct 20, 2026
Merged

gharlan merged 1 commit into
6.xfrom
final-form-widgets

Conversation

@gharlan

@gharlan gharlan commented Oct 20, 2026

Copy link
Copy Markdown
Member

Follow-up to #6754.

  • The widgets (Input, Textarea, SelectInput, ChoiceList, CheckboxInput, ArticleInput, ArticleListInput, MediaInput, MediaListInput), FieldRow and FieldGroup are final now. Their markup is customized by overriding their views via ViewResolver, which works for final classes as well; subclasses would turn every change of their properties and constructors into a breaking change.
  • Field::scalarToRaw() and Field::splitList() are final, they are helpers for field types, not meant to be overridden.
  • ArticleInput::labelTarget() returns string, as its id is required.

The field types themselves stay open for extension (Email and Url extend Text, addons may add their own variants).

Their markup is customized by overriding their views via ViewResolver,
which works for final classes as well; subclasses would turn every change
of their properties into a breaking change. The list helpers of Field are
final as well.
@gharlan gharlan added this to the REDAXO 6.0 milestone Oct 20, 2026
@gharlan
gharlan merged commit 71a5d5f into 6.x Oct 20, 2026
15 checks passed
@gharlan
gharlan deleted the final-form-widgets branch October 20, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants