Skip to content

feat: initial implementation - #2

Merged
scardanzan merged 1 commit into
masterfrom
update/addon-starter-24
Sep 7, 2026
Merged

feat: initial implementation#2
scardanzan merged 1 commit into
masterfrom
update/addon-starter-24

Conversation

@scardanzan

@scardanzan scardanzan commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added a configurable Easy Form component that generates fields from Java beans.
    • Supports validation, converters, custom components, labels, visibility, ordering, responsive layouts, buttons, and internationalization.
    • Added basic and customized form demonstrations.
    • Added Vaadin 25 compatibility.
  • Documentation

    • Expanded README and specifications with usage, customization, API, accessibility, and integration guidance.
  • Chores

    • Added structured bug-report and feature-request templates.
    • Updated build and release configuration.

@scardanzan
scardanzan requested a review from javier-godoy August 3, 2026 20:53
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated

@paodb paodb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other commets for review:

  • .vaadin/copilot/vaadin-copilot.properties should not be commited in my opinion. It belongs in .gitignore.
  • 3 files still say Copyright (C) 2023 (DemoView, EasyFormDemoView, and one more) while inceptionYear is 2026 and everything else says 2026. Should we stick to the original year this was started or to the current one?

Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java
Comment thread pom.xml Outdated
Comment thread pom.xml
@scardanzan

Copy link
Copy Markdown
Member Author

All finding are fixed, please review again @javier-godoy @paodb

@javier-godoy javier-godoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API design review

The shape is right for this kind of add-on: one entry point, a fluent per-field wrapper, sensible defaults, and escape hatches (getBinder(), getFormLayout(), getComponent()). Javadoc coverage is unusually good. The problems are concentrated in a few places, and two of them (the inline comments on getField(String) and setFieldOrder) are the kind that are painful to change after a 1.0 release.

Anchored findings are in the inline comments. The rest, which isn't tied to a particular line:

Gaps

  • No events. No status/validity listener, so there's no supported way to enable Save only when the form is valid or dirty — the single most common thing consumers want. Expose addStatusChangeListener / addValueChangeListener.
  • No extension points. The class isn't final but everything is private and the constructor does full discovery + binding, so a subclass can't influence label generation, property filtering, or component decoration. For a shared add-on, add protected createComponent(name, type) / createLabel(name) / includeProperty(PropertyDescriptor).
  • No i18n story. "Save"/"Cancel" are hardcoded and SharedUtil.camelCaseToHumanFriendly labels aren't overridable in bulk. A setLabelGenerator(...) plus the usual Vaadin setI18n(...) would cover it.
  • No collection accessor. getFieldNames() / getFields(), and a findField returning Optional alongside the throwing getField.
  • No nested properties. Binder supports "address.street"; discovery here is flat, so it just fails. Worth documenting even if not supported.
  • addButton has no removeButton, and the icon overload takes a single ButtonVariant where varargs is the Vaadin convention.
  • Consider HasStyle and HasEnabled (disabling the whole form is a real use case) alongside the current HasSize.

Smaller / naming

  • EasyForm uses void setters while EasyFormField is fluent — two vocabularies in one API. Pick one, or at least make the form-level configuration chainable too.
  • EasyForm.EasyFormField stutters. As a public type it'd read better as a top-level EasyFormField in the same package, or as EasyForm.Field.
  • getField returning a config wrapper rather than the component will surprise people; getField(name).getComponent() is the actual component. configureField(name) or field(name) would signal it better.

Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated

@javier-godoy javier-godoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javier-godoy javier-godoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noted two comments in pom.xml that have been flagged as "resolved" but couldn't find them applied in the latest commits.

https://github.com/FlowingCode/EasyFormAddon/pull/2/changes#r3760649019
https://github.com/FlowingCode/EasyFormAddon/pull/2/changes#r3737473057

Comment thread pom.xml Outdated
Comment thread pom.xml

@javier-godoy javier-godoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review of EasyForm.java at 14b1b5c. Each finding below was reproduced with a throwaway probe test against this commit (probes deleted; the 101-test suite is green). Two more findings from an earlier pass are already resolved here: the partial-mutation bug in the old hideFields/readOnlyFields (now setVisibleFields, which validates via requireKnownProperties before mutating), and setFieldOrder no longer rebinding every field.

Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java Outdated
Comment thread src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java
@scardanzan

Copy link
Copy Markdown
Member Author

All comments are addressed

@scardanzan
scardanzan marked this pull request as ready for review September 1, 2026 15:29
@javier-godoy
javier-godoy self-requested a review September 1, 2026 15:46

@javier-godoy javier-godoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Please squash WIPs.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 6a83e863-508b-4633-80a0-1975de933ff6

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: fb851f66-160c-43ea-b86a-2e50f7d0f1e9

📥 Commits

Reviewing files that changed from the base of the PR and between a9cd748 and a518a97.

📒 Files selected for processing (24)
  • .github/ISSUE_TEMPLATE/bug-report.yml
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/ISSUE_TEMPLATE/feature-request.yml
  • .github/workflows/maven.yml
  • .gitignore
  • .vaadin/copilot/vaadin-copilot.properties
  • README.md
  • SPECIFICATIONS.md
  • pom.xml
  • src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java
  • src/main/resources/META-INF/VAADIN/package.properties
  • src/test/java/com/flowingcode/vaadin/addons/DemoLayout.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/DemoView.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/EasyFormBasicDemo.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/EasyFormCustomizedDemo.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/EasyFormDemo.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/EasyFormDemoView.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/Person.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/it/AbstractViewTest.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/it/ViewIT.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/test/AllTypes.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/test/EasyFormTest.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/test/EasyFormTypesTest.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/test/SerializationTest.java
💤 Files with no reviewable changes (3)
  • src/test/java/com/flowingcode/vaadin/addons/easyform/EasyFormDemo.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/it/AbstractViewTest.java
  • src/test/java/com/flowingcode/vaadin/addons/easyform/it/ViewIT.java

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

Changes

EasyForm feature and project integration

Layer / File(s) Summary
EasyForm API and form lifecycle
src/main/java/com/flowingcode/vaadin/addons/easyform/EasyForm.java, src/main/resources/META-INF/VAADIN/package.properties
Added bean introspection, component factories, binding, validation, converters, field configuration, actions, layout controls, state handling, and extension hooks.
Form behavior validation
src/test/java/com/flowingcode/vaadin/addons/easyform/test/EasyFormTest.java, src/test/java/com/flowingcode/vaadin/addons/easyform/test/AllTypes.java
Added JUnit coverage for form discovery, configuration, lifecycle, validation, actions, state changes, extension points, and defensive contracts.
Type mapping and serialization coverage
src/test/java/com/flowingcode/vaadin/addons/easyform/test/EasyFormTypesTest.java, src/test/java/com/flowingcode/vaadin/addons/easyform/test/SerializationTest.java
Added coverage for supported types, primitive and enum handling, converters, inherited properties, and serialization of configured forms.
Demo views and usage examples
src/test/java/com/flowingcode/vaadin/addons/easyform/*.java, src/test/java/com/flowingcode/vaadin/addons/DemoLayout.java
Replaced the previous demo with basic and customized EasyForm routes using a validated Person model.
API and project documentation
README.md, SPECIFICATIONS.md
Documented the EasyForm API, customization, validation, layout, state handling, extension points, supported versions, and v1 non-goals.
Build, CI, and repository integration
pom.xml, .github/workflows/maven.yml, .gitignore, .vaadin/copilot/vaadin-copilot.properties
Updated Maven dependencies and profiles, added Vaadin 25 CI coverage, revised ignored paths, and updated Copilot runtime metadata.
Issue intake templates
.github/ISSUE_TEMPLATE/*
Added bug-report and feature-request forms and disabled blank issue creation.

Estimated code review effort: 5 (Critical) | ~120 minutes

Merge Risk: ⚪ Minimal · up to a518a

The change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@scardanzan
scardanzan force-pushed the update/addon-starter-24 branch from a518a97 to b4a81ba Compare September 7, 2026 15:02
@scardanzan
scardanzan merged commit 66814b8 into master Sep 7, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Pending release in Flowing Code Addons Sep 7, 2026
@javier-godoy
javier-godoy deleted the update/addon-starter-24 branch September 7, 2026 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending release

Development

Successfully merging this pull request may close these issues.

3 participants