Skip to content

fix: disable compass interaction on non-interactive maps - #13707

Open
nightcityblade wants to merge 1 commit into
mapbox:mainfrom
nightcityblade:fix/issue-8618
Open

fix: disable compass interaction on non-interactive maps#13707
nightcityblade wants to merge 1 commit into
mapbox:mainfrom
nightcityblade:fix/issue-8618

Conversation

@nightcityblade

Copy link
Copy Markdown

Fixes #8618

Disables the navigation compass when interactive: false, prevents both reset and drag interactions, removes the misleading hover tooltip, and preserves the compass as a fully visible bearing indicator.

Launch Checklist

  • Make sure the PR title is descriptive and preferably reflects the change from the user's perspective.
  • Add additional detail and context in the PR description (with screenshots/videos if there are visual changes).
    • The disabled compass intentionally keeps its existing visual opacity, so no screenshot is needed.
  • Manually test the debug page.
    • Not run; the behavior is covered by the focused browser unit test.
  • Write tests for all new functionality and make sure the CI checks pass.
    • CI=true npm run test-unit -- test/unit/ui/control/navigation_control.test.ts
    • npm run tsc
    • npm run lint
    • npm run lint-css
  • Document any changes to public APIs.
    • N/A — this changes existing interactive: false behavior without adding or changing an API.
  • Post benchmark scores if the change could affect performance.
    • N/A — the change only skips compass event setup for non-interactive maps.
  • Tag @mapbox/map-design-team @mapbox/static-apis if this PR includes style spec API or visual changes.
    • N/A — there is no style-spec API or visual design change.
  • Tag @mapbox/gl-native if this PR includes shader changes or needs a native port.
    • N/A — there are no shader changes and no native port is needed.
  • Tag @mapbox/gl-native if this PR disables any test because it also needs to be disabled on their side.
    • N/A — no tests are disabled.
  • Create a ticket for gl-native to groom in the MAPSNAT JIRA queue if this PR includes shader changes or features not present in the native side or if it disables a test that's not disabled there.
    • N/A — this PR has no shader changes, native feature work, or disabled tests.

@nightcityblade
nightcityblade requested a review from a team as a code owner July 26, 2026 15:34
@nightcityblade
nightcityblade requested review from stepankuzmin and removed request for a team July 26, 2026 15:34
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


nightcityblade seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

Copy link
Copy Markdown

Hey, @nightcityblade 👋 Thanks for your contribution to Mapbox GL JS!

Important: This repository does not accept direct merges. All changes go through our internal review process.

What happens next:

  1. A team member will review your PR here first
  2. If it looks good, they will import it to our internal repository for further review
  3. If approved, changes will be synced back here via our release process

Please respond to any review comments on this PR. For more details, see CONTRIBUTING.md.

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.

Disable compass interactivity for interactive: false maps

2 participants