Commit eb6f631
authored
feat: sidebar group cards and toggle collapse all button [DHIS2-20773/20772] (#153)
* chore: dedupe node modules
* chore: refactor dimension selection state for correct collapse all behaviour
* feat: add toggle-collapse-all-button
* chore: fix typo in data source TET type guard
* chore: set initial dimension group state isLoading to false
* chore: add string literal types for card and list keys
* chore: refactor the dimension selection state slice so card collapse and list loading are completely separate
* chore: adjust toggle collapse button to new state structure
* chore: fix unified search input after slice changes
* chore: add card components without styling
* chore: add styles to the card components WIP
* chore: update deps
* chore: fix styles
* chore: fix collapse state
* chore: give data-source dropdown a max-height so all options remain visible
* chore: base DataSourceFilter on DimensionType so they can be used to filter
* chore: use-dimension-list WIP
* chore: address some potential hook issues
* chore: use-dimension-list hook unit tests WIP
* chore: add use-is-card-disabled-by-filter hook
* chore: remove duplicate initial fetch
* chore: refactor use dimenion list hook and add many test cases
* chore: add new hook to check enabled state
* chore: add OpenCode config files
* chore: use consistent fields and type definition for program and program-stage
* chore: use Program and ProgramStage type throughout
* chore: rename initialDimensions to fixedDimensions
* chore: add isDisabledByFilter field to use-dimensions-list hook and remove separate hook
* chore: apply client side filter when fetch completes
* chore: prevent race conditions while fetching dimension lists
* chore: extract disabled by filter logic for reuse in stage component
* chore: add isLoadingMore to hook
* chore: add skeleton chip component
* chore: useDimensionList returns hasNoData
* chore: dimension-list WIP
* chore: dimension-list with styles
* chore: make cards that are disabled by filter opaque
* chore: filter fetched dimensions based on filter state
* chore: make dimensionListKey optional for fixed-dimension-only cards
* chore: fix disabled by filter logic for fixed-dimension-only lists
* chore: pass program and stage down to dimension list item
* chore: do not wrap dimension-card-subsection children in dimension-list
* chore: implement enrollment card
* chore: remove console.log
* chore: add program stage subsection
* chore: add program indicator card
* chore: add tracked entity type card
* chore: add event card for program without registration and extract shared logic
* chore: console.error instead of throw error so the app doesn't crash when hot reloading
* chore: add card other
* chore: add card metadata
* chore: adjust failing tests to type change
* chore: ensure collapse button remains aligned with input in case of search errors
* chore: add optional transformer prop to use-dimensionlist hook to deal with TETs
* chore: add type card
* chore: make cards container scrollable and apply scroll styles
* chore: remount cards when data source changes
* chore: remove redundant fields from hook result
* chore: load more delay and keep showing show more if it's there
* chore: do not update (redux) state after unmounting
* chore: rename useEffectEvent to useStableCallback
* chore: address sonarqube issues
* chore: fix more sonarqube issues
* chore: fix last sonarqube issue
* chore: add sonarqube issue fix skill for AI agents
* chore: update AI agent instructions for git and file-level checks
* chore: fix focus styles and keyboard event handlers
* chore: tweak lint/test AI instructions
* chore: tweak AGENTS instructions
* chore: use FC type for all components
* chore: add bidirectional delay to isLoadingMore
* chore: useDimensionList refator WIP
* chore: fix useStableCallback
* chore: useDimensionList refactor WIP
* chore: refactor useDimensionList complete
* chore: migrate unit tests to new approach using fake timers WIP
* chore: refactor unit test suite for useDimensionList and its helpers
* chore: add useDelayedIsLoading hook with specs
* chore: update agents instructions reg tests with fake timers
* chore: add spec file for useListFetchState
* chore: undo redundant rename
* chore: add helpers to create baseQueries with unit tests
* chore: set paging to true not false in helper
* chore: use useDelayedIsLoadingMore in useDimensionList and adjust some test expectations
* chore: fix typo
* chore: fix sonarqube issues
* chore: update skill so AI knows the PR the user is talking about
* chore: remove redundant and add tests for no data scenarios
* chore: upgrade @dhis2/ui and dedupe deps1 parent db00176 commit eb6f631
82 files changed
Lines changed: 7740 additions & 796 deletions
File tree
- .opencode/skills/sonarqube-fix
- i18n
- src
- api
- components
- app-wrapper/metadata-provider
- main-sidebar
- __tests__
- cards-program-with-registration
- cards-program-without-registration
- cards-tracked-entity-type
- data-source-select
- styles
- dimension-card
- styles
- styles
- use-dimension-list
- __tests__
- hooks
- modules
- __tests__
- store
- __tests__
- test-utils
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 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 | + | |
0 commit comments