feat(ui-output): add districts list with areas#3016
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds district support to the study outputs view and refactors the ListView component to support rendering content without TanStack routing. The changes enable users to view output data for both individual areas and district aggregations in a unified interface.
Changes:
- Enhanced ListView component to support both route-based navigation (RouteListItem) and local content rendering (ContentListItem)
- Added district fetching and display alongside areas in the outputs view
- Refactored ResultMatrixViewer/ResultFilters/ResultItemSelector components into OutputMatrixViewer/OutputFilters with cleaner interfaces
- Simplified component state management by consolidating item selection logic into ListView
Reviewed changes
Copilot reviewed 14 out of 16 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
index.tsx |
Simplified main output component to use ListView with districts integration and content rendering |
-utils.ts |
Added type guards for districts, updated path generation to support @ ${districtId} format, removed unused constants |
useVariablePerVariable.ts |
Simplified hook parameters by removing redundant itemType and selectedItemId in favor of selectedItem |
SynthesisViewer.tsx |
Refactored to self-contained component that fetches its own data using gridId |
ListView.tsx |
Added ContentListItem support for non-routing use cases with local state management |
ResultMatrixViewer/ → OutputMatrixViewer/ |
Renamed and restructured component directory, split filters into separate files (OutputFilters, VariableSelector, etc.) |
Comments suppressed due to low confidence (1)
webapp/src/routes/_authenticated/studies/$studyId/explore/outputs/$outputId/-components/OutputMatrixViewer/VariableMatrix/index.tsx:56
- Districts may not have variable metadata. The function
hasVariablesForItemchecks if the item exists indata.areasby comparingarea.name === selectedItem.id. However, districts fromgetStudyDistrictsare separate entities from areas and may not be present in the variables metadata. If a district is selected, this check will likely return false even though the district might have valid output data. Consider whether districts should be supported in variable-per-variable mode, and if so, ensure the metadata includes district information or handle this case explicitly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b96b4f5 to
86503ca
Compare
ff0d824 to
6f0d4f2
Compare
70975e9 to
e8ff272
Compare
95f7431 to
90c8949
Compare
hdinia
reviewed
Feb 24, 2026
90c8949 to
313125e
Compare
d75b1f3 to
6741f0b
Compare
29337aa to
871d196
Compare
hdinia
approved these changes
Feb 26, 2026
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.
ANT-4472