Skip to content

geolocation: Update use cases to the static Geolocation API#228

Merged
Artur- merged 1 commit into
mainfrom
update-geo-api
May 8, 2026
Merged

geolocation: Update use cases to the static Geolocation API#228
Artur- merged 1 commit into
mainfrom
update-geo-api

Conversation

@Artur-
Copy link
Copy Markdown
Member

@Artur- Artur- commented May 6, 2026

Track Flow's geolocation redesign (vaadin/flow#24279). Point flow.version at 25.2.geo-api-update-SNAPSHOT (vaadin.version stays on 25.2-SNAPSHOT because the snapshot is only published for flow-bom) and migrate every use case off the per-UI facade:

  • get(callback) -> Geolocation.getPosition(onSuccess, onError) with separate success/error consumers; the GeolocationOutcome switch goes away.
  • get(opts, callback) -> Geolocation.getPosition(onSuccess, onError, opts) with options as the trailing argument.
  • track(...) -> Geolocation.watchPosition(...); GeolocationTracker -> GeolocationWatcher; valueSignal() -> positionSignal(). UC2's local tracker/ensureTracker renamed accordingly.
  • availabilitySignal() -> Geolocation.availabilityHintSignal(ui), used in UC3 and UC4.

Track Flow's geolocation redesign (vaadin/flow#24279). Point flow.version
at 25.2.geo-api-update-SNAPSHOT (vaadin.version stays on 25.2-SNAPSHOT
because the snapshot is only published for flow-bom) and migrate every
use case off the per-UI facade:

- get(callback) -> Geolocation.getPosition(onSuccess, onError) with
  separate success/error consumers; the GeolocationOutcome switch goes
  away.
- get(opts, callback) -> Geolocation.getPosition(onSuccess, onError,
  opts) with options as the trailing argument.
- track(...) -> Geolocation.watchPosition(...); GeolocationTracker ->
  GeolocationWatcher; valueSignal() -> positionSignal(). UC2's local
  tracker/ensureTracker renamed accordingly.
- availabilitySignal() -> Geolocation.availabilityHintSignal(ui), used
  in UC3 and UC4.
@Artur- Artur- merged commit 63e5101 into main May 8, 2026
5 checks passed
@Artur- Artur- deleted the update-geo-api branch May 8, 2026 07:54
Artur- added a commit that referenced this pull request May 11, 2026
…232)

UC8 was missed in #228 — switch GeolocationTracker to GeolocationWatcher,
use Geolocation.watchPosition(...) instead of UI.getGeolocation().track(...),
and rename valueSignal() to positionSignal().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant