[PR #2825] [MERGED] fix(analytics): prevent countries from getting stuck highlighted on world map #7979

Closed
opened 2026-04-25 16:31:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/2825
Author: @AdnanSilajdzic
Created: 4/10/2026
Status: Merged
Merged: 4/11/2026
Merged by: @oschwartz10612

Base: devHead: fix/worldmap-hover-stuck-public


📝 Commits (1)

  • 1aedf9d fix(worldmap): avoid stuck country hover state

📊 Changes

1 file changed (+17 additions, -7 deletions)

View changed files

📝 src/components/WorldMap.tsx (+17 -7)

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

This fixes an issue on the analytics world map where hovered countries could remain highlighted after the cursor moved away.

I was able to reproduce this on the analytics page and traced it back to the hover implementation in WorldMap.tsx.

Before:

https://github.com/user-attachments/assets/268c63d3-9784-43e2-bde9-e8cfd4778e06

After applying this fix:

https://github.com/user-attachments/assets/e7a5ba94-2e49-4fe9-b019-dac927079dac

Cause

The previous implementation moved the hovered SVG country path to the end of the DOM during hover so it would render on top of neighboring countries.

That helped visually, but it also seems to interfere with hover cleanup in some cases, which can leave countries stuck in the highlighted state.

Fix

Instead of reordering the original country node during hover, this change renders the hovered country in a separate overlay path above the base map layer.

This keeps the hovered country visually on top while avoiding the sticky hover behavior.

How to test?

This can be tested by navigating to the /{orgId}/settings/logs/analytics and interacting with the map on the bottom of the screen.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/pangolin/pull/2825 **Author:** [@AdnanSilajdzic](https://github.com/AdnanSilajdzic) **Created:** 4/10/2026 **Status:** ✅ Merged **Merged:** 4/11/2026 **Merged by:** [@oschwartz10612](https://github.com/oschwartz10612) **Base:** `dev` ← **Head:** `fix/worldmap-hover-stuck-public` --- ### 📝 Commits (1) - [`1aedf9d`](https://github.com/fosrl/pangolin/commit/1aedf9da0ac258e58735da61a26ab1dc00aa08d8) fix(worldmap): avoid stuck country hover state ### 📊 Changes **1 file changed** (+17 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/components/WorldMap.tsx` (+17 -7) </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description This fixes an issue on the analytics world map where hovered countries could remain highlighted after the cursor moved away. I was able to reproduce this on the analytics page and traced it back to the hover implementation in `WorldMap.tsx`. Before: https://github.com/user-attachments/assets/268c63d3-9784-43e2-bde9-e8cfd4778e06 After applying this fix: https://github.com/user-attachments/assets/e7a5ba94-2e49-4fe9-b019-dac927079dac ## Cause The previous implementation moved the hovered SVG country path to the end of the DOM during hover so it would render on top of neighboring countries. That helped visually, but it also seems to interfere with hover cleanup in some cases, which can leave countries stuck in the highlighted state. ## Fix Instead of reordering the original country node during hover, this change renders the hovered country in a separate overlay path above the base map layer. This keeps the hovered country visually on top while avoiding the sticky hover behavior. ## How to test? This can be tested by navigating to the `/{orgId}/settings/logs/analytics` and interacting with the map on the bottom of the screen. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 16:31:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#7979