Filter by country when clicking the world map - #471
Open
smehmood wants to merge 1 commit into
Open
Conversation
Clicking a country on the world map applies the same country=eq.XX filter that the country metrics table produces. Clicking the selected country again clears the filter. Countries with data get a pointer cursor; while a filter is active any country can be clicked so you can switch selections. Clicks that are the tail end of a pan are ignored, and filtering is disabled on the realtime map, which does not read query filters. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clicking a country on the world map now filters the dashboard to that country, the same way clicking an entry in the Countries list does (
?country=eq.XX).Verification
Verified in the browser on the Hulu dashboard: clicking the US set
?country=eq.USand the filter chip + all panels updated (visitors 2.53k → 1.14k); clicking Brazil switched the filter; clicking it again cleared it; clicking a no-data country (Greenland) did nothing; dragging to pan did not apply a filter; the realtime map is not clickable. No console errors.Screenshots
After clicking the US on the map — filter chip applied, metrics scoped to that country:
The map itself with the selection highlighted and the Countries panel scoped to it:
🤖 Generated with Claude Code
🌒 Run on Niteshift: View Task