-
-
Notifications
You must be signed in to change notification settings - Fork 383
[Map][Google] Upgrade @googlemaps/js-api-loader to ^2.0 #3115
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
base: 3.x
Are you sure you want to change the base?
Conversation
📊 Packages dist files size differenceThanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
|
92405c8
to
800f9b6
Compare
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.
Pull Request Overview
This PR upgrades the Google Maps Bridge to use @googlemaps/js-api-loader
version ^2.0.0
, modernizing the integration with the Google Maps JavaScript API. The upgrade introduces new API options and removes deprecated parameters to align with the latest Google Maps API standards.
Key changes include:
- Updated parameter names to match the new API options interface (
apiKey
→key
,version
→v
) - Replaced deprecated loader implementation with modern
importLibrary
andsetOptions
functions - Added support for new API options like
authReferrerPolicy
,mapIds
,channel
, andsolutionChannel
Reviewed Changes
Copilot reviewed 26 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/Map/src/Bridge/Google/src/Renderer/GoogleRenderer.php | Updates constructor parameters and provider options to match new API interface |
src/Map/src/Bridge/Google/src/Renderer/GoogleRendererFactory.php | Adjusts factory to create renderer with updated parameter mapping |
src/Map/src/Bridge/Google/assets/src/map_controller.ts | Replaces deprecated Loader class with modern importLibrary/setOptions approach |
src/Map/src/Bridge/Google/assets/package.json | Updates package dependency from ^1.16.6 to ^2.0.0 |
src/Map/src/Bridge/Google/tests/GoogleRendererTest.php | Updates test cases to use new parameter names |
src/Map/src/Bridge/Google/tests/GoogleRendererFactoryTest.php | Updates factory tests with new parameter names |
Multiple test snapshot files | Updates expected output to reflect new parameter names in generated HTML |
src/Map/src/Bridge/Google/README.md | Updates documentation to reflect new options and parameter names |
src/Map/src/Bridge/Google/CHANGELOG.md | Documents breaking changes for version 3.0 |
UPGRADE-3.0.md | Notes the breaking changes for users upgrading |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* The Twig function `render_map()` has been removed, use `ux_map()` instead | ||
* The option `title` from `Polygon`, `Polyline`, `Rectangle` and `Circle`, has been removed, use option `infoWindow` instead | ||
* The property `rawOptions` from `ux:map:*:before-create` events has been removed, use `bridgeOptions` instead | ||
* The Google Map Bridge has been upgraded to use `@googlemaps/js-api-loader` version `^2.0.0`, |
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.
Maybe we should be a bit more explicit on what user needs to do (or not) here ?
/** | ||
* @author Hugo Alliaume <hugo@alliau.me> | ||
* | ||
* @internal |
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.
👏
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.
Nice!
Let's take advantage of the upcoming 3.0 to upgrade
@googlemaps/js-api-loader
to ^2.0.0.It is possible to backport it on UX 2.x, but requires much work for no added-value.