Skip to content

refactor!: emit form filler field value events per field#9593

Merged
tomivirkki merged 5 commits into
mainfrom
refactor-emit-form-filler-field-value-events-per-field
Jul 22, 2026
Merged

refactor!: emit form filler field value events per field#9593
tomivirkki merged 5 commits into
mainfrom
refactor-emit-form-filler-field-value-events-per-field

Conversation

@ugur-vaadin

Copy link
Copy Markdown
Contributor

Description

This PR

  • updates the listener name (addFieldValueChangedListener -> addFieldValueChangeListener)
  • adds the listener interface FieldValueChangeListener and event class FieldValueChangeEvent
  • updates the listener API to fire one FieldValueChangeEvent per changed field

Based on Form Filler DX test session findings.

Warning

Breaking change. addFieldValueChangedListener(SerializableConsumer<List<FieldValueChange>>) is replaced by addFieldValueChangeListener(FieldValueChangeListener). The listener now fires once per changed field with a FieldValueChangeEvent instead of once per turn with a List<FieldValueChange>. The FieldValueChange record is removed.

No related issue.

Type of change

  • Bugfix
  • Feature
  • Refactor

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/contributing/overview
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

tomivirkki and others added 2 commits July 21, 2026 16:07
… refactor-emit-form-filler-field-value-events-per-field

# Conflicts:
#	vaadin-ai-components-flow-parent/vaadin-ai-components-flow/src/main/java/com/vaadin/flow/component/ai/form/FieldValueChange.java
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tomivirkki
tomivirkki self-requested a review July 21, 2026 13:24
tomivirkki and others added 2 commits July 21, 2026 16:58
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A field added to the form during the turn produced a spurious
(null -> empty) change event and a null oldValue on real changes.
Also keep event values serializable and correct since tags to 25.3.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@tomivirkki
tomivirkki added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit b9ea8ce Jul 22, 2026
18 checks passed
@tomivirkki
tomivirkki deleted the refactor-emit-form-filler-field-value-events-per-field branch July 22, 2026 08:22
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.3.0-alpha6.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants