docs: document CRUD customization API and editor behavior (#5894) (CP: v25.2) - #5896
Merged
Merged
Conversation
* docs: document CRUD customization API and editor behavior Addresses vaadin/agentic-dx-improvement#103, which reported that the Flow CRUD documentation under-documents the component's extension points, forcing readers to inspect the jar to make an adoption decision. - Document the CrudEditor interface as a public extension point, with a non-Binder editor example that validates itself and renders a top-of-form error summary. - Specify the Save button enablement rules, the role of setDirty(), and how to keep Save enabled at all times via getSaveButton().setEnabled(true). - Document the getSaveButton()/getCancelButton()/getDeleteButton()/ getNewButton() accessors, with an example of hiding Delete for datasets that archive rather than remove records. - Collect the programmatic editor controls (edit, setOpened, setEditorPosition, setEditOnClick) into one table. - Note that CRUD has no manual row reordering, and point at grid replacement. - Explain how CrudFilter maps sorting and filtering onto a lazy backend. - Surface the no-border variant and CrudVariant on the main page, and link to the styling page. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CvBbsmxH7A3F8WyMz2hfZZ * docs: use the CRUD product name in the styling page title Vaadin.ProductName flagged "= Crud Styling". The sibling styling pages all spell out the component name in their titles, as does the CRUD index page. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CvBbsmxH7A3F8WyMz2hfZZ * docs: fix CRUD anchors and drop a stray render attribute - Add explicit [#save-button-state] and [#editor-button-access] anchors. The [badge-flow]#Flow# suffix leaks into the generated heading ids ("save-button-state-flow"), so the two cross-references pointed at anchors that don't exist. Verified in a browser: the page now has no broken in-page links. - Include PersonCrudEditor.java without `render`. It isn't a Component, so there's nothing to render; the convention for a supporting class is a plain listing, as in articles/flow/binding-data/index.adoc. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CvBbsmxH7A3F8WyMz2hfZZ * docs: address review feedback on the CRUD page - Remove the Styling section; it duplicated styling.adoc. - Drop frontend/demo/component/crud/crud-imports.ts and point the two Flow-only examples at the existing crud-editor-content.ts instead. It already imports crud, email-field, form-layout, and text-field, so no new file is needed. - Frame hiding the Delete Button as a workaround rather than a technique, and warn against setVisible(false), which CRUD undoes when the editor opens for an existing item. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CvBbsmxH7A3F8WyMz2hfZZ --------- Co-authored-by: Claude Opus 5 (1M context) <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.
No description provided.