Skip to content

docs: show that a browserless navigation location takes a query string - #6092

Closed
mshabarov wants to merge 1 commit into
mainfrom
docs/browserless-navigate-query-string
Closed

mshabarov wants to merge 1 commit into
mainfrom
docs/browserless-navigate-query-string

Conversation

@mshabarov

Copy link
Copy Markdown
Contributor

Summary

navigate("order/ORD-1?tab=history", OrderView.class) used to fail with Base path can not contain query separator=?, so a test could not reach a view through a location with query parameters. The mocked UI now parses the location the way Flow's UI.navigate does (vaadin/browserless-test#204), and the query parameters reach the view. Nothing on the Getting Started page said the location could carry them.

What changed

In articles/flow/testing/browserless/getting-started.adoc, under Navigating to Views: one badged sentence, a snippet, and a line saying that the map taken by navigate(Template.class, Map) holds route template parameters, which is the mistake the old wording invited.

Notes for the reviewer

  • The fix shipped in Browserless Test 1.2.0-rc1, which is what Vaadin 25.3 ships, hence the V25.3 badge.
  • A location that is only a fragment identifies no route, so the current view stays in place, and giving both a query string and a separate QueryParameters argument to UI.navigate now fails with a message naming the location. Neither case seemed worth a paragraph on a getting-started page; say the word if they belong here.

How to test

Documentation only, with an inline snippet that is not compiled. The behavior matches MockedUI.navigate and the navigation tests on vaadin/browserless-test main.

🤖 Generated with Claude Code

navigate("order/ORD-1?tab=history", OrderView.class) used to fail with
"Base path can not contain query separator=?". The mocked UI now parses
the location the way Flow does, so the query parameters reach the view.

Documents the supported form and says which navigate() argument carries
route template parameters instead.

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

Copy link
Copy Markdown
Contributor

This has also been documented here #6076 along with other changes.
Maybe better keep this PR and remove the duplication from 6076

----

The view reads those query parameters from the navigation event, as it does in a running application. The map that [methodname]`navigate(Template.class, Map)` takes holds route template parameters instead, so a query string belongs in the location string.

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.

A potential addition from #6076

A location consisting only of a fragment, such as "#details", identifies a place within the current page rather than a route, so it leaves the current view in place.

@Artur- Artur- closed this Sep 22, 2026
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.

3 participants