Skip to content

feat(ui-output): add districts list with areas#3016

Merged
skamril merged 19 commits intodevfrom
feature/4472-ouputs-districts
Feb 26, 2026
Merged

feat(ui-output): add districts list with areas#3016
skamril merged 19 commits intodevfrom
feature/4472-ouputs-districts

Conversation

@skamril
Copy link
Copy Markdown
Member

@skamril skamril commented Feb 20, 2026

  • LIstView: allow rendering content without TanStack routing
  • use ListView
  • refactor of some code
  • disable search for synthesis list

ANT-4472

@skamril skamril requested a review from hdinia February 20, 2026 10:23
@skamril skamril self-assigned this Feb 20, 2026
Copilot AI review requested due to automatic review settings February 20, 2026 10:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 hasVariablesForItem checks if the item exists in data.areas by comparing area.name === selectedItem.id. However, districts from getStudyDistricts are 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.

Comment thread webapp/src/components/page/ListView.tsx Outdated
@TheoPascoli TheoPascoli force-pushed the dev branch 3 times, most recently from b96b4f5 to 86503ca Compare February 20, 2026 12:06
@skamril skamril force-pushed the feature/4472-ouputs-districts branch from ff0d824 to 6f0d4f2 Compare February 20, 2026 14:09
@skamril skamril force-pushed the feature/4472-ouputs-districts branch from 70975e9 to e8ff272 Compare February 22, 2026 10:40
@AntaresSimulatorTeam AntaresSimulatorTeam deleted a comment from Copilot AI Feb 23, 2026
@skamril skamril force-pushed the feature/4472-ouputs-districts branch from 95f7431 to 90c8949 Compare February 24, 2026 14:49
Comment thread webapp/src/components/page/ListView.tsx Outdated
Comment thread webapp/src/components/page/ListView.tsx Outdated
@skamril skamril force-pushed the feature/4472-ouputs-districts branch from 90c8949 to 313125e Compare February 25, 2026 15:56
@skamril skamril force-pushed the feature/4472-ouputs-districts branch from d75b1f3 to 6741f0b Compare February 25, 2026 16:00
@skamril skamril requested a review from hdinia February 25, 2026 16:48
@skamril skamril force-pushed the feature/4472-ouputs-districts branch from 29337aa to 871d196 Compare February 25, 2026 18:11
@skamril skamril merged commit 5e7ca64 into dev Feb 26, 2026
13 of 14 checks passed
@skamril skamril deleted the feature/4472-ouputs-districts branch February 26, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants