Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove map highlight when leaving artwork page #111

Merged
merged 2 commits into from
Sep 24, 2024

Conversation

reefdog
Copy link
Collaborator

@reefdog reefdog commented Sep 24, 2024

Prior to this change, if you went to an artwork page (which highlights its map pin) and then went back to the search results page (which should clear the highlight), the pin remained highlighted. This PR fixes that.

Testing:

  1. On main, navigate to an artwork page
  2. Note that the pin in the map highlights
  3. Go "Back to search results"
  4. ❌ Note that the pin remains highlighted (although the zoom level correctly changes)
  5. Switch to this branch and repeat
  6. ✅ Note that the pin loses its highlight when navigating back to the search results

Closes #103

Prior to this commit, we only reset all pins styling when changing
between artwork detail pages. This meant going back to the index page
didn’t reset them, leaving the last highlighted pin highlighted.

Now, we reset them whenever the route changes, which is what we intend.

Issue #103 Highlighted map pin doesn't reset when returning to search
           results
@reefdog reefdog merged commit 0ba9b88 into main Sep 24, 2024
4 checks passed
@reefdog reefdog deleted the 103-fix-map-pin-highlight branch September 24, 2024 22:07
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.

Highlighted map pin doesn't reset when returning to search results
1 participant