Skip to content

feat(geolocation): split get() into onSuccess/onError callbacks#24270

Merged
Artur- merged 7 commits into
mainfrom
geo-get-split
May 8, 2026
Merged

feat(geolocation): split get() into onSuccess/onError callbacks#24270
Artur- merged 7 commits into
mainfrom
geo-get-split

Conversation

@Artur-
Copy link
Copy Markdown
Member

@Artur- Artur- commented May 6, 2026

Geolocation.get() now takes a (onSuccess, onError) pair, mirroring GeolocationTracker.addPositionListener and the W3C getCurrentPosition(success, error) signature. The optional GeolocationOptions argument moves to the trailing position so that additional parameters can be added at the end without rearranging the common case.

GeolocationOutcome is retained as the SPI sum-type returned by GeolocationClient#get; only the public facade changes shape.

Geolocation.get() now takes a (onSuccess, onError) pair, mirroring
GeolocationTracker.addPositionListener and the W3C
getCurrentPosition(success, error) signature. The optional
GeolocationOptions argument moves to the trailing position so that
additional parameters can be added at the end without rearranging the
common case.

GeolocationOutcome is retained as the SPI sum-type returned by
GeolocationClient#get; only the public facade changes shape.
@github-actions github-actions Bot added the +1.0.0 label May 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Test Results

 1 404 files  ±0   1 404 suites  ±0   1h 20m 13s ⏱️ - 1m 6s
10 128 tests ±0  10 058 ✅ ±0  70 💤 ±0  0 ❌ ±0 
10 603 runs  ±0  10 524 ✅ ±0  79 💤 ±0  0 ❌ ±0 

Results for commit 11f8b5d. ± Comparison against base commit d9290f8.

♻️ This comment has been updated with latest results.

Comment thread flow-server/src/main/java/com/vaadin/flow/component/geolocation/Geolocation.java Outdated
- Use e.getUI() instead of UI.getCurrent() in javadoc and view examples
- Drop err.message() suggestion from GeolocationError javadoc; the
  browser wording is not standardised and shouldn't be shown as-is
- Rename `received` to `error` in GeolocationClientSeamTest after the
  callback split
@Artur- Artur- enabled auto-merge May 7, 2026 13:37
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@Artur- Artur- added this pull request to the merge queue May 8, 2026
Merged via the queue into main with commit c79219b May 8, 2026
31 checks passed
@Artur- Artur- deleted the geo-get-split branch May 8, 2026 07:12
@github-project-automation github-project-automation Bot moved this from 🔎Iteration reviews to Done in Vaadin Flow | Hilla | Kits ongoing work May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

3 participants