Skip to content

Filter by country when clicking the world map - #464

Open
smehmood wants to merge 1 commit into
masterfrom
smehmood/worldmap-click-to-filter
Open

Filter by country when clicking the world map#464
smehmood wants to merge 1 commit into
masterfrom
smehmood/worldmap-click-to-filter

Conversation

@smehmood

@smehmood smehmood commented Aug 3, 2026

Copy link
Copy Markdown

Clicking a country on the world map now applies the same country=eq.XX filter that the country metrics table already produces, so the whole page (metrics, chart, tables) narrows to that country.

Behavior

  • Click a country with data → filter applied, Country Is <name> chip appears in the filter bar.
  • Click the currently selected country → filter cleared.
  • Selected country renders in the full base color so the active selection is visible on the map.
  • Only countries with data are clickable (cursor: pointer); countries with no data are inert.
  • Clicks that are the tail end of a pan/drag are ignored (>3px pointer movement).
  • Filtering is disabled on the realtime map (allowFilter={false}), which doesn't read query filters.

Verification

Verified in the browser on the Hulu website overview: clicking the US set ?country=eq.US, the filter chip and filtered metrics (2.76k visitors, Countries table showing only United States at 100%) appeared, the map highlighted the US, clicking it again cleared the filter, and clicking a country with no data or dragging the map did nothing.

🤖 Generated with Claude Code
🌒 Run on Niteshift: View Task


Open in Devin Review

Clicking a country on the world map now applies the same country=eq.XX
filter that the country metrics table produces. Clicking the currently
selected country clears the filter, and the selected country renders in
the full base color so the active selection is visible on the map.

Only countries with data are clickable (cursor: pointer); clicks that are
the tail end of a pan/drag are ignored. Filtering is disabled on the
realtime map, which does not read query filters.

Run-on: Niteshift

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

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.

1 participant