Skip to content

Filter analytics by country when clicking the world map - #459

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

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

Conversation

@smehmood

@smehmood smehmood commented Jul 29, 2026

Copy link
Copy Markdown

Clicking a country on the world map now filters the dashboard to that country, matching the behavior of the country list in the Location panel.

  • Click a country with traffic → adds country=eq.XX to the URL (same filter param the FilterLink country rows use), so the whole page — metrics, chart, pages, sources, etc. — filters down.
  • Click the already-selected country → clears the filter.
  • Countries with data show a pointer cursor; the active country is painted in the full primary color.
  • Countries with no data (and Antarctica) stay inert.
  • The realtime page ignores query filters, so its map opts out via allowFilter={false}.

Verified in the browser: clicking the US set ?country=eq.US, the "Country Is United States" filter chip appeared, the Countries panel collapsed to United States at 100%, and clicking the US again cleared the filter. No console errors.

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


Open in Devin Review

Screenshots

Map with country=eq.US active — US highlighted, Countries panel narrowed to United States:

Filter chip and metrics after the click:

Clicking a country on the world map now applies the same `country=eq.XX`
filter used by the country list, and clicking the selected country again
clears it. Countries with data get a pointer cursor and the active one is
highlighted in the primary color. Realtime ignores query filters, so its
map opts out with allowFilter={false}.

Run-on: Niteshift

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

mesa-dot-dev Bot commented Jul 29, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@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