Add click-to-filter to world map - #450
Open
smehmood wants to merge 1 commit into
Open
Conversation
Clicking a country on the world map now filters the page metrics to that country via the country=eq.<code> URL param, matching the existing FilterLink behavior. Clicking the selected country again toggles the filter off. The selected country is highlighted in the primary color and the cursor shows a pointer over clickable countries. Gated on websiteId so the realtime map (data-only) is unaffected.
|
You do not have enough credits to review this pull request. Please purchase more credits to continue. |
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
country=eq.<code>URL param, matching the existingFilterLinkbehavior used by the country metrics table.websiteIdbeing present, so the realtime world map (which passesdataonly) is unaffected.Verified
On the Demo SaaS site (All-time range), clicking the US added
country=eq.USto the URL, highlighted US in the primary blue, and surfaced a "Country: United States" filter chip. Clicking it again removed the filter.Task: https://niteshift.dev/task/task_int_62x95y38nqugepig