- Notifications
You must be signed in to change notification settings - Fork 8
Internally manage trackLocationId #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe recent updates primarily focus on upgrading dependencies and enhancing the location tracking functionality in the Changes
Sequence Diagram(s)sequenceDiagram participant User participant TrackLocationDemo participant GoogleMap User ->> TrackLocationDemo: Click "Start Tracking" TrackLocationDemo ->> GoogleMap: trackLocation() GoogleMap ->> GoogleMap: Check if tracking session is active GoogleMap -->> TrackLocationDemo: Start new tracking session TrackLocationDemo -->> User: Notify tracking started User ->> TrackLocationDemo: Click "Stop Tracking" TrackLocationDemo ->> GoogleMap: stopTrackLocation() GoogleMap ->> GoogleMap: Stop current tracking session GoogleMap -->> TrackLocationDemo: Confirm tracking stopped TrackLocationDemo -->> User: Notify tracking stopped Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File ( |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- pom.xml (1 hunks)
- src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java (3 hunks)
- src/test/java/com/flowingcode/vaadin/addons/googlemaps/TrackLocationDemo.java (4 hunks)
Additional comments not posted (9)
src/test/java/com/flowingcode/vaadin/addons/googlemaps/TrackLocationDemo.java (3)
27-27: Import ofHorizontalLayoutis appropriate for the new UI layout.
46-59: Refactored button handling logic to enable/disable buttons based on tracking state.
79-81: Improved error handling for geolocation support.pom.xml (2)
7-7: Updated version ofgoogle-mapsartifact to2.0.0-SNAPSHOT. Ensure this aligns with the breaking changes mentioned.
12-12: Updated Vaadin version to14.11.11. Verify compatibility with other dependencies.src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMap.java (4)
54-55: AddedtrackLocationIdto manage tracking sessions. This is crucial for the new functionality.
629-638: RefactoredtrackLocation()to prevent multiple active sessions. Proper use of exception handling.
646-647: AddedgetTrackLocationId()method to retrieve the current tracking ID.
673-677: UpdatedstopTrackLocation()to clear the tracking session. This ensures clean session management.




This PR closes issue #133. Location tracking id is now handled internally.
trackLocationmethod was changed to update the internal value and to throw an exception in case an attemp to start a second tracking is done. stopTrackLocationmethod was also updated to stop the tracking using the internal value and to clear this value when the tracking session is stopped. Demo view was updated to reflect these changes too.As this refactor is a breaking change a version update is also included. And Vaadin version was also updated to the latest Vaadin 14 version.
Summary by CodeRabbit
New Features
Improvements
google-mapsand Vaadin to ensure better compatibility and performance.Refactor