Skip to content

[WC-3521] Maps widget - Part2 - #2405

Open
gjulivan wants to merge 2 commits into
mainfrom
maps/various-fix
Open

[WC-3521] Maps widget - Part2#2405
gjulivan wants to merge 2 commits into
mainfrom
maps/various-fix

Conversation

@gjulivan

Copy link
Copy Markdown
Collaborator

Pull request type


Description

@gjulivan
gjulivan requested a review from a team as a code owner August 28, 2026 14:21
@github-actions

This comment has been minimized.

iobuhov
iobuhov previously approved these changes Aug 31, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

AI Code Review

⚠️ Approved with suggestions — low-severity items only, safe to merge


What was reviewed

File Change
packages/pluggableWidgets/maps-web/CHANGELOG.md Added Fixed and Changed entries for default marker fix and Mendix minimum version bump
packages/pluggableWidgets/maps-web/package.json Bumped @vis.gl/react-google-maps from ^0.8.3 to ^1.9.0; added @types/google.maps ^3.64.0 devDep; raised minimumMXVersion to 10.24.0
packages/pluggableWidgets/maps-web/rollup.config.mjs Added fixImportedAssetPaths and fixCssAssetPaths to fix asset URL casing for deployed apps
packages/pluggableWidgets/maps-web/src/components/__tests__/GoogleMap.spec.tsx Added 9 new tests covering default pin, image marker, map camera, and click behaviour; added test helpers and marker fixtures
packages/pluggableWidgets/maps-web/src/components/__tests__/__snapshots__/GoogleMap.spec.tsx.snap All 6 snapshots updated to reflect @vis.gl/react-google-maps@1.9.0 inner div wrapper
packages/pluggableWidgets/maps-web/tsconfig.json Added "google.maps" to compilerOptions.types
packages/pluggableWidgets/maps-web/typings/MapsProps.d.ts Prettier formatting only (trailing semicolons in union type members) — generated file
packages/pluggableWidgets/maps-web/openspec/changes/archive/** Archived two completed OpenSpec changes
pnpm-lock.yaml Lockfile regenerated — out of scope

Skipped (out of scope): dist/, pnpm-lock.yaml (except verifying dep resolution is consistent)


Findings

⚠️ Low — typings/MapsProps.d.ts is a generated file and should not be edited

File: packages/pluggableWidgets/maps-web/typings/MapsProps.d.ts lines 57, 69
Note: The file starts with WARNING: All changes made to this file will be overwritten. The only diff is cosmetic (trailing semicolons added inside union type members by Prettier). These changes will be silently lost the next time the file is regenerated from Maps.xml, which could cause unexpected whitespace churn in a future PR. If the Prettier hook is touching this file, consider adding it to .prettierignore for this package.


⚠️ Low — clickMarker JSDoc is stale after the design deviation

File: packages/pluggableWidgets/maps-web/src/components/__tests__/GoogleMap.spec.tsx lines 161–169
Note: The JSDoc for clickMarker says "AdvancedMarker listens for the native gmp-click DOM event rather than a google.maps.event listener", but design.md documents that 0.8.3 used google.maps.event.addListener and the helper was intentionally made version-agnostic. The current spec only dispatches the native gmp-click event; the google.maps.event half described in the design notes was never added. The comment therefore understates the historical context. Low impact (comment only), but worth aligning with the final implementation to avoid confusing future maintainers.


Positives

  • The TDD approach is well-executed: design.md documents the red/green split and confirmed failure output on 0.8.3, giving future readers proof the tests actually exercised the bug.
  • attachedPins() is a thoughtful deviation from the original spec — asserting parent attachment rather than instance count correctly decouples the assertion from vis.gl's per-render effect identity, making the test robust against re-renders.
  • google.maps.Settings stub in beforeEach is precisely scoped with a comment attributing it to a mock library gap, preventing it from being confused with a widget defect.
  • The fixImportedAssetPaths / fixCssAssetPaths split in rollup.config.mjs cleanly separates the two asset pipeline concerns with well-placed comments explaining the root cause of each fix.
  • CHANGELOG entries are user-facing and appropriately free of implementation details; the minimum Mendix version bump is called out as its own Changed item with a clear reason.
  • minimumMXVersion correctly raised to 10.24.0 to match the react-client dependency of the asset URL fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants