Commit b2a1406
Add manage columns functionality to HardwareConfigurationTable using reusable ManageColumnsModal and useManageColumns hook (#2101)
* Initial commit copying code from opendatahub-io/odh-dashboard#5825 (e46d06125bb15897179b6e88e43ec11593ee9c76)
Signed-off-by: Mike Turley <[email protected]>
* Fix imports
Signed-off-by: Mike Turley <[email protected]>
* Add manage columns functionality to HardwareConfigurationTable
Integrate the ManageColumnsModal and useManageColumns pattern to allow
users to customize which columns are visible in the hardware configuration
table and their order.
Key changes:
- Create useHardwareConfigColumns hook that combines manage columns with
latency filter effects (when filter changes, relevant columns update)
- Add constants for sticky columns, default visible fields, and storage key
- Add toolbarActions prop to HardwareConfigurationFilterToolbar
- Integrate ManageColumnsModal in HardwareConfigurationTable
- Fix import paths in copied odh-dashboard components
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: Mike Turley <[email protected]>
* Fix TPS column names
Signed-off-by: Mike Turley <[email protected]>
* TODO add this to ODH version - reset default columns button
Signed-off-by: Mike Turley <[email protected]>
* TODO add this to ODH version - Move modal state into useManageColumns hook
Refactored ManageColumnsModal to get isModalOpen and closeModal from
manageColumnsResult instead of having separate isOpen and onClose props.
This simplifies usage by letting the hook manage all modal state internally.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: Mike Turley <[email protected]>
* Remove unnecessary type conversion
HardwareConfigColumn is directly assignable to SortableData since
HardwareConfigColumnField (a string literal union) is a subtype of string.
Removed the useMemo conversion and unused SortableData import.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: Mike Turley <[email protected]>
* Rearrange columns
Signed-off-by: Mike Turley <[email protected]>
* Fix description
Signed-off-by: Mike Turley <[email protected]>
* Add comment
Signed-off-by: Mike Turley <[email protected]>
* TODO add to ODH version - Refactor for more generic types
Signed-off-by: Mike Turley <[email protected]>
* Add comment
Signed-off-by: Mike Turley <[email protected]>
* Fix key used for sticky hardware config column
Signed-off-by: Mike Turley <[email protected]>
* Fix test
Signed-off-by: Mike Turley <[email protected]>
* TODO add to ODH version - Fix search to handle NBSP and show empty state
- Normalize whitespace (including NBSP) to regular spaces when
comparing column labels with search input
- Add EmptyState component when search returns no matching columns
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Signed-off-by: Mike Turley <[email protected]>
---------
Signed-off-by: Mike Turley <[email protected]>
Co-authored-by: Claude Opus 4.5 <[email protected]>1 parent 353a878 commit b2a1406
File tree
19 files changed
+1912
-111
lines changed- clients/ui/frontend
- src
- __tests__/cypress/cypress/tests/mocked/modelCatalog
- app
- pages/modelCatalog/components
- concepts
- dashboard
- modelCatalog
19 files changed
+1912
-111
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
115 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| |||
clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelCatalog/modelCatalogTabs.cy.ts
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
371 | | - | |
| 371 | + | |
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
| 408 | + | |
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
| 425 | + | |
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
158 | 167 | | |
159 | 168 | | |
160 | 169 | | |
| |||
Lines changed: 45 additions & 66 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | 8 | | |
14 | | - | |
| 9 | + | |
15 | 10 | | |
16 | 11 | | |
| 12 | + | |
17 | 13 | | |
18 | 14 | | |
19 | 15 | | |
| |||
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
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 | | - | |
| 31 | + | |
| 32 | + | |
73 | 33 | | |
74 | 34 | | |
75 | 35 | | |
| |||
80 | 40 | | |
81 | 41 | | |
82 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
83 | 54 | | |
84 | 55 | | |
85 | 56 | | |
86 | 57 | | |
| 58 | + | |
87 | 59 | | |
88 | 60 | | |
89 | 61 | | |
90 | 62 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 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 | + | |
110 | 89 | | |
111 | | - | |
| 90 | + | |
112 | 91 | | |
113 | 92 | | |
114 | 93 | | |
| |||
0 commit comments