Click a country on the world map to filter by it - #457
Open
smehmood wants to merge 2 commits into
Open
Conversation
Clicking a country on the world map now applies a `country=eq.<code>` filter, the same param the country metrics table uses, so the whole dashboard narrows to that country. Clicking the selected country again clears the filter, and the selected country is highlighted on the map. Panning the map is not treated as a click, and filtering is disabled on the realtime map since realtime data ignores filters. Run-on: Niteshift Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
Regions missing from ISO_COUNTRIES (Antarctica, Somaliland, South Sudan) have an undefined code, which compared equal to the undefined selectedCountry when no filter was active and painted them in the full highlight color. Default selectedCountry to null and guard the comparison on a non-empty code. Run-on: Niteshift 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.
What
Clicking a country on the world map now filters the dashboard to that country.
country=eq.<code>— the same URL param the Countries metrics table uses — so every panel (metrics, chart, pages, sources, etc.) and the filter bar chip update together.allowFilter={false}), since realtime data ignores filters.Verification
Verified in the browser on the Hulu website dashboard: clicking the US applied the
Country is United Statesfilter (visitors 8.15k → 3.69k), clicking it again cleared it, and dragging the map applied nothing.Screenshots
United States selected on the map after clicking it:
The resulting filter chip and narrowed metrics at the top of the page:
🌒 Run on Niteshift: View Task