Add forms mode-selection and TestBench reliability guidance#5780
Merged
Conversation
Consolidate best-practice guidance that was previously only available in the agent skills into the documentation: - fields-and-binding: add a "Choosing a Mode" scenario table mapping common form situations (Save/Cancel, wizard, inline grid edit, settings, filter bar) to buffered vs write-through Binder mode. - components-binder-beans: recommend explicit forField().bind() over bindInstanceFields for non-trivial forms, and note string property names are best reserved for record FDOs. - reliable-tests: add "Keeping Tests Focused and Independent" (reserve e2e for critical journeys, push coverage down to browserless, keep tests independent) and "Waiting for Asynchronous Updates" (wait via waitForFirst()/waitUntil() rather than Thread.sleep()). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds best-practice guidance to three existing pages:
building-apps/forms-data/add-form/fields-and-binding.adoc— a "Choosing a Mode" scenario table mapping common form situations (Save/Cancel buttons, multi-step wizard, inline Grid editing, settings panel, filter bar) to buffered vs. write-throughBindermode.flow/binding-data/components-binder-beans.adoc— a TIP recommending explicitforField().bind()with method references overbindInstanceFields()for non-trivial forms, and noting that binding by string property name is best reserved for record FDOs.flow/testing/end-to-end/reliable-tests.adoc— two new sections: "Keeping Tests Focused and Independent" (reserve end-to-end tests for critical journeys, push coverage down to browserless tests, keep tests independent) and "Waiting for Asynchronous Updates" (wait viawaitForFirst()/waitUntil()rather thanThread.sleep()).Why
This guidance previously lived only in the Vaadin agent skills (
forms-and-validation,testbench-testing). Those skills were otherwise restatements of existing docs, so they're being retired; this content — decision tables and best-practice recommendations that a human reader wants too — belongs in the documentation. The docs already covered the underlying mechanics (Binder modes, validators/converters, page objects, the browserless-vs-e2e comparison); these additions fill the gaps in decision and do/don't guidance.Reviewer notes
[methodname]/[classname]/[guibutton]macros, cols-based tables, and{articles}xref syntax (verified against existing usage in the repo).vaadin-form-layoutskill now points readers at these doc guides.package-lock.jsonregeneration in the working tree was intentionally left out of this content PR.🤖 Generated with Claude Code