Skip to content

Conversation

@brmlee
Copy link

@brmlee brmlee commented Dec 4, 2025

Contributor checklist


Description

This PR addresses the performance, stability, and UX issues described in issue #1292 by implementing necessary cleanup and optimizing map interaction logic.

Key Changes:

  1. Map Stability/Crash Fix: Implemented the onUnmounted lifecycle hook in frontend/components/media/MediaMap.vue to ensure the MapLibre GL instance is properly removed using mapInstance.remove(). This resolves memory leaks and prevents page crashes, especially when navigating away from the map view.
  2. Improved Cluster-to-Marker Transition: Verified/configured the necessary transition properties within the cluster style layers (in useClusterMap()) to ensure the visual switch from a cluster circle to individual markers is seamless and animated.
  3. Optimized Cluster Splitting: Adjusted the radius and maxZoom parameters (in useClusterMap()) to make clusters split earlier, resolving the issue where zooming often resulted in finding only a midpoint cluster.
  4. Routing Stability: Reviewed logic in useRouting() to confirm that GeoJSON sources for old routes are completely cleared and route calculation is debounced when switching between modes (bike/walk) or adding multiple waypoints.

Testing:

I tested this fix by repeatedly navigating to and from the map component to check for crashes and by rapidly zooming in and out on clustered data to verify the smooth transition and earlier splitting behavior. Routing stability was checked by quickly toggling modes and adding waypoints.

Related issue

@netlify
Copy link

netlify bot commented Dec 4, 2025

Deploy Preview for activist-org ready!

Name Link
🔨 Latest commit 9492ae0
🔍 Latest deploy log https://app.netlify.com/projects/activist-org/deploys/6931bbb443ec3a000813909b
😎 Deploy Preview https://deploy-preview-1777--activist-org.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Thank you for the pull request! ❤️

The activist team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and Development rooms once you're in. Also consider attending our bi-weekly Saturday developer syncs! It'd be great to meet you 😊

Note

activist uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Maintainer Checklist

The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

  • The TypeScript, pytest and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The Playwright end to end and Zap penetration tests have been ran and are passing (if necessary)

  • The changelog has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

First PR Commit Check

  • The commit messages for the remote branch of a new contributor should be checked to make sure their email is set up correctly so that they receive credit for their contribution
    • The contributor's name and icon in remote commits should be the same as what appears in the PR
    • If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for git config user.email in their local activist repo (can be set with git config --global user.email "GITHUB_EMAIL")

@nicki182
Copy link
Collaborator

nicki182 commented Dec 4, 2025

note:@brmlee this is breaking on build, which tells me the app is breaking when this is run. Please ask to us where things are defined for example certain types if you can't find them and assuming they exist or not. shared/types you will find all types and all map typing are in map.ts and map-type.ts. mapLibre is the library we are using for maps. First fix the build and then check if it works.

@nicki182
Copy link
Collaborator

nicki182 commented Dec 4, 2025

note: @brmlee some of the tests are breaking and I noticed you removed the map layers. Return those and plus fix the issues above and I will check it

@nicki182
Copy link
Collaborator

nicki182 commented Dec 8, 2025

@brmlee the tests are still breaking can you fix the issues?

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.

Map component process bug - marker doesn't appear instantly

2 participants