Skip to content

Conversation

Kocal
Copy link
Member

@Kocal Kocal commented Sep 30, 2025

Q A
Bug fix? no
New feature? yes
Deprecations? no
Documentation? no
Issues Fix #...
License MIT

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.

@Kocal Kocal added this to the 3.0 milestone Sep 30, 2025
@Kocal Kocal self-assigned this Sep 30, 2025
@carsonbot carsonbot added Feature New Feature Map Status: Needs Review Needs to be reviewed labels Sep 30, 2025
Copy link
Contributor

github-actions bot commented Sep 30, 2025

📊 Packages dist files size difference

Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.
Please review the changes and make sure they are expected.

FileBefore (Size / Gzip)After (Size / Gzip)
Map (Bridge Google)
map_controller.d.ts 3.42 kB / 900 B 3.44 kB0% / 911 B+1% 📈
map_controller.js 12.7 kB / 3 kB 12.14 kB-4% 📉 / 2.83 kB-6% 📉

@Kocal Kocal force-pushed the map-google-loader-2.0 branch from 92405c8 to 800f9b6 Compare September 30, 2025 20:54
@Kocal Kocal requested review from smnandre and Copilot September 30, 2025 21:03
Copy link

@Copilot Copilot AI left a 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 (apiKeykey, versionv)
  • Replaced deprecated loader implementation with modern importLibrary and setOptions functions
  • Added support for new API options like authReferrerPolicy, mapIds, channel, and solutionChannel

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`,
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

Copy link
Member

@smnandre smnandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature Map Status: Reviewed Has been reviewed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants