Commit 10811f8
refactor: make dataset filters use the shared filters and cleanup all the individual components (#1957)
## Description
Refactor dataset and proposal filtering to a shared, configurable filter
architecture and modernize the proposal dashboard into composable
components
## Motivation
Background on use case, changes needed
## Fixes:
Please provide a list of the fixes implemented in this PR
* Items added
## Changes:
Please provide a list of the changes implemented by this PR
* changes made
## Tests included
- [x] Included for each change/fix?
- [x] Passing? (Merge will not be approved unless this is checked)
## Documentation
- [ ] swagger documentation updated \[required\]
- [ ] official documentation updated \[nice-to-have\]
### official documentation info
If you have updated the official documentation, please provide PR # and
URL of the pages where the updates are included
## Backend version
- [ ] Does it require a specific version of the backend
- which version of the backend is required:
## Summary by Sourcery
Refactor dataset and proposal filtering to a shared, configurable filter
architecture and modernize the proposal dashboard into composable
components
New Features:
- Introduce SharedFilterComponent and SharedFilterModule to replace
individual filter components
- Add FullTextSearchBarComponent and FullTextSearchBarModule for unified
text searching
- Create ProposalTableComponent, ProposalSideFilterComponent, and
ProposalSearchBarComponent for the proposal dashboard
Enhancements:
- Unify dataset filter actions and selectors into generic multiselect,
dateRange, and text filters
- Replace fetchCountAction with fetchFacetCountsAction and update
effects/reducers to handle facet counts
- Refactor proposal-dashboard.component and datasets-filter.component to
use shared filter modules and stream queryParams
Tests:
- Update unit tests and selectors to match new filter types and facet
counts
- Adjust Cypress tests to trigger searches via search-button instead of
direct input
## Summary by Sourcery
Refactor dataset and proposal filtering to a shared, configurable filter
architecture, replacing individual filter components and actions with a
unified SharedFilter component and generic filter actions/reducers, and
modernize the proposal dashboard and UI by introducing faceted
multi-select and numeric range filters while updating tests accordingly
New Features:
- Introduce a generic SharedFilterComponent and SharedFilterModule that
supports text, dateRange, multiSelect, and numeric range filters
- Add MultiSelectFilterComponent for faceted multi-selection filtering
and NgxNumericRangeFormField modules for numeric range inputs
- Update DatasetsFilterComponent and ProposalDashboardComponent to use
shared filter configurations and sync filter state via query parameters
Enhancements:
- Replace individual dataset filter actions and reducers with generic
addDatasetFilterAction, removeDatasetFilterAction, and setFiltersAction
- Centralize FilterConfig and ConditionConfig definitions in the user
store and remove legacy filter components and label mappings
- Unify dataset selectors to dynamically derive facets from enabled
filters and streamline router navigation on filter updates
Tests:
- Update unit tests and reducer specs to validate new generic filter
actions and selectors
- Add comprehensive tests for numeric range form field container and
control components
- Adapt existing component and end-to-end tests to use the shared filter
interface and search-button triggers
---------
Co-authored-by: junjiequan <a331998513@gmail.com>1 parent 875e382 commit 10811f8
File tree
95 files changed
+2188
-4534
lines changed- CI/e2e
- src
- app
- datasets
- dashboard
- dataset-detail/dataset-detail
- datasets-filter
- settings
- proposals
- proposal-dashboard
- proposal-filters/side-bar-filter
- state-management
- actions
- effects
- models
- reducers
- selectors
- state
- assets
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
95 files changed
+2188
-4534
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 109 | | |
121 | 110 | | |
122 | 111 | | |
| |||
199 | 188 | | |
200 | 189 | | |
201 | 190 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
209 | 233 | | |
210 | 234 | | |
211 | 235 | | |
| |||
0 commit comments