feat(opengrid): jurisdiction filter — add multi-select#17
Merged
nicholasalanbrown merged 2 commits intomainfrom Feb 25, 2026
Merged
feat(opengrid): jurisdiction filter — add multi-select#17nicholasalanbrown merged 2 commits intomainfrom
nicholasalanbrown merged 2 commits intomainfrom
Conversation
- Add jurisdictions[] array to ExplorerState for tracking selected state codes - Serialize/deserialize jurisdiction filter in URL (?jurisdictions=CA,TX,NY) - Add JurisdictionFilter component: dropdown with search + checkboxes - Update UtilityListPanel to render JurisdictionFilter and apply jurisdiction filtering - Update explorer/utilities/page.tsx with same multi-select behavior - Filtering logic: a utility matches if its jurisdiction field contains ANY selected state (utilities with multi-state jurisdictions like 'AL, GA, MS' match any of those states) Fixes MAI-39
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Remove hand-rolled JurisdictionFilter dropdown (~200 lines removed) - Replace with edges FilterDialog + DataControls filter chips pattern - Consolidates segment filter into same FilterDialog (two facets: Segment, Jurisdictions) - Works on mobile via Dialog/Tray (no inline popover needed) - URL sync unchanged — still serializes to ?jurisdictions=CA,TX,NY - tsc --noEmit: clean
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
Addresses Cyril's feedback (MAI-39): the jurisdiction filter was single-select (no filter at all previously in the ExploreShell version), but utilities frequently span multiple states. This PR adds multi-select so users can filter by multiple jurisdictions simultaneously.
Update: Replaced the bespoke
JurisdictionFilterdropdown with edges'FilterDialog/DataControlsfilter chip pattern, which handles mobile natively via a Dialog/Tray.Changes
components/explorer/panels/UtilityListPanel.tsxJurisdictionFiltercomponent (~200 lines deleted)FilterDialogwith two facets: Segment and Jurisdictions<select>intoFilterDialogDataControlsfilter propsexplorer/app/(shell)/utilities/page.tsxJurisdictionFilter→FilterDialogcomponents/explorer/ExplorerContext.tsx(unchanged from original PR)jurisdictions: string[]inExplorerStateSET_JURISDICTIONSaction andsetJurisdictionscontext method?jurisdictions=CA,TX,NYUX Details
DataControlsopensFilterDialogFilterDialogrenders as a bottom sheet (Tray) — no inline dropdown neededTesting
tsc --noEmitpasses clean"AR, KS, MO, OK") match when any of those states is selectedCloses MAI-39