Commit 09fe320
* QAN light mode support
* delete commit
* PMM-14508: improve areas of the user interface that may be less intuitive for users
* PMM-14508: Remove unnecessary key prop, fix TypeScript types, and replace hardcoded colors
- Remove key={theme.type} from Filters and CheckboxGroup components (no longer needed for theme switching)
- Replace all 'any' types with proper TypeScript interfaces (FilterGroup, FilterItem, Filters)
- Create Filters.types.ts with type definitions
- Replace hardcoded colors with theme variables:
- #3d3d3d → theme.colors.border2 (divider)
- rgb(50, 179, 227) → theme.colors.linkExternal (counter)
- rgba(40, 40, 40) → theme.colors.border2 (border)
- #c6c6c6 → theme.colors.textWeak (icon fill)
These changes address code review feedback and improve theme reactivity without force remounting components.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* PMM-14508: Remove key prop from main QAN component and improve theme type safety
- Remove key={grafanaTheme.type} from QueryAnalytics.tsx (theme updates work correctly without force remount)
- Update getAntdTheme parameter type to accept GrafanaTheme | undefined for better type safety
- Improve JSDoc to clarify that grafanaTheme may be undefined during initialization
These changes address additional code review feedback from matejkubinec.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* PMM-14508: Revert removal of key prop - required for Ant Design theme updates
The key={grafanaTheme.type} on the main QAN component div is necessary to force
remount when theme changes. Without it, Ant Design components (Table, Select,
Checkbox) do not pick up the new theme from ConfigProvider and render with
incorrect colors until page refresh (e.g., dark mode table in light theme).
The key prop was correctly removed from child components (Filters, CheckboxGroup)
as their styles update reactively via useTheme() hook. Only the top-level component
wrapping ConfigProvider needs the key prop.
Added detailed comment explaining why force remount is required for future maintainers.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* PMM-14508: change theme
* PMM-14508: resolve test failed
---------
Co-authored-by: Claude <[email protected]>
1 parent 29051bb commit 09fe320
File tree
14 files changed
+294
-47
lines changed- pmm-app/src
- pmm-qan/panel
- components
- Filters
- components/CheckboxGroup
- hooks
- ManageColumns
- Overview/components/QanTable
14 files changed
+294
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
3 | 10 | | |
4 | 11 | | |
5 | 12 | | |
| 13 | + | |
6 | 14 | | |
7 | 15 | | |
8 | 16 | | |
9 | | - | |
| 17 | + | |
| 18 | + | |
10 | 19 | | |
11 | 20 | | |
12 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
13 | 25 | | |
14 | 26 | | |
15 | 27 | | |
| |||
18 | 30 | | |
19 | 31 | | |
20 | 32 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
24 | 40 | | |
25 | 41 | | |
26 | 42 | | |
27 | 43 | | |
| 44 | + | |
28 | 45 | | |
29 | 46 | | |
| 47 | + | |
30 | 48 | | |
31 | 49 | | |
32 | 50 | | |
| |||
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
53 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
54 | 80 | | |
55 | 81 | | |
56 | 82 | | |
| |||
82 | 108 | | |
83 | 109 | | |
84 | 110 | | |
85 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
86 | 114 | | |
87 | 115 | | |
88 | 116 | | |
| |||
91 | 119 | | |
92 | 120 | | |
93 | 121 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | | - | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
121 | | - | |
122 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
123 | 127 | | |
124 | 128 | | |
125 | 129 | | |
| |||
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
133 | | - | |
134 | | - | |
| 137 | + | |
135 | 138 | | |
136 | 139 | | |
137 | 140 | | |
| |||
Lines changed: 19 additions & 0 deletions
| 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 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | | - | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | 18 | | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | 22 | | |
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | | - | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | | - | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
129 | | - | |
130 | 127 | | |
131 | 128 | | |
132 | 129 | | |
| |||
148 | 145 | | |
149 | 146 | | |
150 | 147 | | |
151 | | - | |
| 148 | + | |
152 | 149 | | |
153 | 150 | | |
154 | 151 | | |
155 | | - | |
| 152 | + | |
156 | 153 | | |
157 | 154 | | |
158 | 155 | | |
| |||
0 commit comments