Skip to content

chore: upgrade mapbox-gl version for accessibility issues (v3.0.0)#654

Merged
anguyen-yext2 merged 10 commits intomainfrom
mapbox-upgrade
Mar 26, 2026
Merged

chore: upgrade mapbox-gl version for accessibility issues (v3.0.0)#654
anguyen-yext2 merged 10 commits intomainfrom
mapbox-upgrade

Conversation

@anguyen-yext2
Copy link
Copy Markdown
Contributor

@anguyen-yext2 anguyen-yext2 commented Mar 18, 2026

  • current version has some accessibility issues that will be addressed by this upgrade
  • removed unnecessary @types/mapbox-gl import since mapbox-gl provides its own types
  • replace Mapbox-owned public types in search-ui-react with library-owned, version-stable interfaces
  • replace deprecated Mapbox aliases usage

This PR also includes some improvements that I noticed when testing:

  • test-site pin popups not showing up
  • clean up the map listeners properly
  • memoizes the debounced function so it stays the same across renders unless milliseconds changes

J=WAT-5461
TEST=auto,manual

verified test-site still function as expected
verified that locator functions as expected and that there is no longer any accessibility errors on live site

current version has some accessibility issues that will be addressed by this upgrade

J=WAT-5461
TEST=manual

verified test-site still function as expected
platform testing:
1. pack the change along
2. upgrade the mapbox versions in pages-component and pack that change
3. reference those packed versions in VE and starter
4. swapped branch and confirmed there is no longer any accessibility errors on live site
@anguyen-yext2 anguyen-yext2 requested a review from a team as a code owner March 18, 2026 20:11
@k-gerner
Copy link
Copy Markdown
Contributor

Why does this require a major version upgrade?

@semgrep-code-yext
Copy link
Copy Markdown

Legal Risk

The following dependencies were released under a license that
is currently prohibited by your organization. Merging is blocked until this is resolved.

Recommendation

Reach out to your security team or Semgrep admin to address this issue. In special cases, exceptions may be made for dependencies with violating licenses, however, the general recommendation is to avoid using a dependency under such a license

non-standard

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 18, 2026

Current unit coverage is 89.1826923076923%
Current visual coverage is 68.85075403016121%
Current combined coverage is 91.55206286836935%

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 18, 2026

Coverage Status

coverage: 84.457% (-0.2%) from 84.61%
when pulling 6c675f6 on mapbox-upgrade
into 2b50142 on main.

@anguyen-yext2
Copy link
Copy Markdown
Contributor Author

Why does this require a major version upgrade?

Because our public types expose Mapbox types (mapboxgl.MapboxOptions, LngLatBounds, etc.), so consumers can see breaking type/runtime differences even though our component props didn’t change.
For example, if a consumer uses our exported OnDragHandler (bounds non-null), but Mapbox v3 can return nullable bounds in some paths, their handler assumptions can fail type checks or require code changes.
That’s why I had to change MapboxMap.tsx around getBounds() handling.
Similarly, consumers would hit TS errors when accessing e.originalEvent until they add guards like 'originalEvent' in e.

@anguyen-yext2 anguyen-yext2 changed the title chore: upgrade mapbox versions (v3.0.0) chore: upgrade mapbox-gl version for accessibility issues (v3.0.0) Mar 18, 2026
@anguyen-yext2 anguyen-yext2 requested a review from k-gerner March 24, 2026 12:39
@anguyen-yext2 anguyen-yext2 requested a review from a team March 24, 2026 17:48
Copy link
Copy Markdown
Contributor

@k-gerner k-gerner left a comment

Choose a reason for hiding this comment

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

Generally LGTM

@k-gerner
Copy link
Copy Markdown
Contributor

Approving but would like a second approval here if we can wait for that

@anguyen-yext2 anguyen-yext2 merged commit 36a48c6 into main Mar 26, 2026
22 checks passed
@anguyen-yext2 anguyen-yext2 deleted the mapbox-upgrade branch March 26, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants