Skip to content

docs: explain what a browserless query can and cannot find - #6090

Open
mshabarov wants to merge 1 commit into
mainfrom
docs/browserless-find-limits
Open

mshabarov wants to merge 1 commit into
mainfrom
docs/browserless-find-limits

Conversation

@mshabarov

Copy link
Copy Markdown
Contributor

Summary

find() walks the server-side component tree, and two kinds of component are not in it when a test looks for them: a component that a renderer creates per item, and the content of an overlay that is closed. Both return an empty result rather than an error, so the failure reads as a missing component instead of an unrendered one. The Querying Components page did not mention either case, and the repository documented it only in its README (vaadin/browserless-test#219).

The same section records the fix in vaadin/browserless-test#203: a component set as a Grid column header, footer, or editor is now part of the tree, where a query used to fail with "no such component". It is reported once, even in a header cell that spans several columns.

What changed

In articles/flow/testing/browserless/component-query.adoc, a new Components a Query Cannot Find section with two subsections:

  • Components a Renderer Creates — why find(Checkbox.class) finds nothing for a component column, how GridTester.getCellComponent(...) renders the cell on request, the warning that every call attaches a new instance, the LitRenderer methods for columns that have no server-side component, and the V25.3 note about header, footer, and editor components.
  • Overlay Content — why a top-level query does not see a closed overlay's content, with a cross-reference to Testing Overlay Components, which already covers the tester-based approach.

Notes for the reviewer

  • The overlay page's Common Pitfalls section already says the same thing for context menus. The new section links to it rather than repeating the guidance, so the query page carries the general rule and the overlay page keeps the component-specific detail.
  • vaadin/browserless-test#203 shipped in 1.2.0-rc1, which is what Vaadin 25.3 ships, hence the V25.3 badge on that one sentence. The rest of the section describes behavior that has always been there.

How to test

Documentation only, with inline snippets that are not compiled. The behavior matches GridTester and ContextMenuTester on vaadin/browserless-test main, where tests pin both cases.

🤖 Generated with Claude Code

A query walks the server-side component tree, so it misses a component
that a renderer creates per item and the content of a closed overlay.
The page said nothing about either, and the empty result reads as a
missing component rather than an unrendered one.

Adds a section covering component columns, the GridTester methods that
reach those components, Lit renderer columns, and overlay content, and
records that Grid header, footer, and editor components are part of the
tree as of Vaadin 25.3.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mshabarov mshabarov added the target/v25.3 Automatically cherry-pick to the v25.3 branch label Sep 21, 2026
@mcollovati
mcollovati self-requested a review September 21, 2026 08:55
A query walks the server-side component tree. A component that another component renders per item, and the content of an overlay that is closed, are not in that tree, and a query returns an empty result for them instead of an error. The failure therefore reads as though the component was never created.


=== Components a Renderer Creates

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This paragraph should be revisited to be consistent with changes in vaadin/browserless-test#250 that should prevent renderer components to be created and attached again and again.

@github-actions

Copy link
Copy Markdown
Contributor

Preview Deployment

This PR has been deployed for preview.

URL: https://docs-preview-pr-6090.fly.dev

Changed pages

Added content is highlighted in green; removed content is marked in red on each page.

Built from de18f1a

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

Labels

target/v25.3 Automatically cherry-pick to the v25.3 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants