Filter by country when clicking the world map - #465
Open
smehmood wants to merge 1 commit into
Open
Conversation
Clicking a country on the world map now applies the same `country=eq.<code>`
filter that the countries table produces, so the whole dashboard scopes to
that country. Clicking the already-selected country clears the filter, and
the selected country is highlighted on the map.
The realtime page opts out (allowFilter={false}) since realtime data does not
support filters.
Run-on: Niteshift
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
smehmood
force-pushed
the
smehmood/world-map-country-filter
branch
from
August 7, 2026 14:07
45b1420 to
60a8244
Compare
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.
What
Clicking a country on the world map now filters the dashboard to that country.
country=eq.<code>URL param the countries table'sFilterLinkuses, so every panel (metrics, charts, tables) scopes to the clicked country and the country chip shows up in the filter bar.allowFilter={false}— realtime queries don't take filters — so its map keeps the previous non-interactive behavior.Verification
Verified in the browser on the Hulu demo site: clicking the US navigated to
?country=eq.US, visitors dropped from 4.9k to 2.23k (matching the US row in the countries table), the "Country Is United States" filter chip appeared, and the countries table collapsed to United States at 100%. Clicking the US again removed the filter. On the realtime page no map country renders a pointer cursor. No console errors.Screenshots
Map with United States selected — the clicked country is highlighted and the location table scopes to it:
Top of the same page — the
Country Is United Statesfilter chip and the scoped metrics:🤖 Generated with Claude Code
🌒 Run on Niteshift: View Task