diff --git a/DESIGN_GUIDELINES.md b/DESIGN_GUIDELINES.md index fd8d3f3bd13..fffe8bc6dbd 100644 --- a/DESIGN_GUIDELINES.md +++ b/DESIGN_GUIDELINES.md @@ -31,9 +31,10 @@ holds `private final UI ui`, and all `executeJs` calls go through `ui.getElement()` or `ui.getPage()`. Follow the `Page` / `History` pattern. Enforce single-instance creation in the constructor if needed. -If the facade hands out a stateful handle (e.g. `Geolocation.track()` -returning a `GeolocationTracker`), make the handle's constructor -**package-private** so application code cannot bypass the facade. +If the facade hands out a stateful handle (e.g. +`Geolocation.watchPosition()` returning a `GeolocationWatcher`), make the +handle's constructor **package-private** so application code cannot bypass +the facade. ### Keep internal mutators off user-facing classes diff --git a/flow-server/src/main/java/com/vaadin/flow/component/geolocation/Geolocation.java b/flow-server/src/main/java/com/vaadin/flow/component/geolocation/Geolocation.java index bd852174c9c..101a86403a3 100644 --- a/flow-server/src/main/java/com/vaadin/flow/component/geolocation/Geolocation.java +++ b/flow-server/src/main/java/com/vaadin/flow/component/geolocation/Geolocation.java @@ -42,21 +42,21 @@ *

* Two usage modes: *

* Availability check: * * Treat the value as a hint for pre-rendering decisions (e.g. auto-fetching * on return visits, hiding controls in unsupported contexts). For critical - * paths, call {@link #get} and handle the authoritative result in the - * callback. + * paths, call {@link #getPosition} and handle the authoritative result in + * the callback. * * @return the availability signal */ diff --git a/flow-server/src/main/java/com/vaadin/flow/component/geolocation/GeolocationAvailability.java b/flow-server/src/main/java/com/vaadin/flow/component/geolocation/GeolocationAvailability.java index eeddc8332f2..ce280a21133 100644 --- a/flow-server/src/main/java/com/vaadin/flow/component/geolocation/GeolocationAvailability.java +++ b/flow-server/src/main/java/com/vaadin/flow/component/geolocation/GeolocationAvailability.java @@ -21,9 +21,9 @@ *

* Returned by {@link Geolocation#availabilitySignal()}. Reading the value does * not show a permission dialog — it reports whether a dialog would - * appear on the next {@link Geolocation#get} or {@link Geolocation#track} call, - * or whether the call would fail regardless because the feature is unusable in - * this context. + * appear on the next {@link Geolocation#getPosition} or + * {@link Geolocation#watchPosition} call, or whether the call would fail + * regardless because the feature is unusable in this context. *

* Typical usage: *