Commit 6b84d09
authored
chore: Cleanup Task Action Buttons (#1633)
## Description
<!-- Please provide a brief description of the changes made in this pull request. Include any relevant context or reasoning for the changes. -->
Extract Task Actions into individual Button Components and then render them conditionally within `TaskActions`.
Currently the definition of actions on a task is scattered across multiple different files in an ever-growing `actions` array. This change simplifies things greatly: actions are defined as their own button and then rendered via `TaskActions`.
This change separates concerns for all the different task actions and substantially reduces the amount of code lingering about in `TaskNodeCard`, `TaskOverview`, `TaskActions` and `ComponentDetailsDialog`.
Note: this change renders the general Action Framework created in #1470 somewhat obsolete. However, since the framework was initially created to support ReactNodes for backward-compatibility not change is actually needed to the framework. For now it can be left in place and in the future we can choose to use it or remove it.
Next Steps: Pipeline & Run Actions
## Related Issue and Pull requests
<!-- Link to any related issues using the format #<issue-number> -->
Supersedes #1534
Related to Shopify/oasis-frontend#401
## Type of Change
<!-- Please delete options that are not relevant -->
- [x] Cleanup/Refactor
## Checklist
<!-- Please ensure the following are completed before submitting the PR -->
- [ ] I have tested this does not break current pipelines / runs functionality
- [ ] I have tested the changes on staging
## Screenshots (if applicable)
<!-- Include any screenshots that might help explain the changes or provide visual context -->
No change to UI.
## Test Instructions
<!-- Detail steps and prerequisites for testing the changes in this PR -->
Check that every button in the task details panel and component details dialog works as expected.
## Additional Comments
<!-- Add any additional context or information that reviewers might need to know regarding this PR -->1 parent 80ffdbe commit 6b84d09
18 files changed
+452
-385
lines changed| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
| 10 | + | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
40 | 39 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 40 | + | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
Lines changed: 30 additions & 90 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
35 | | - | |
36 | 33 | | |
37 | | - | |
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
| |||
64 | 60 | | |
65 | 61 | | |
66 | 62 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 63 | + | |
73 | 64 | | |
74 | 65 | | |
75 | 66 | | |
| |||
84 | 75 | | |
85 | 76 | | |
86 | 77 | | |
87 | | - | |
| 78 | + | |
88 | 79 | | |
89 | 80 | | |
90 | 81 | | |
| |||
133 | 124 | | |
134 | 125 | | |
135 | 126 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 127 | + | |
144 | 128 | | |
145 | 129 | | |
146 | 130 | | |
| |||
175 | 159 | | |
176 | 160 | | |
177 | 161 | | |
178 | | - | |
179 | 162 | | |
180 | | - | |
181 | 163 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | 164 | | |
186 | 165 | | |
187 | 166 | | |
188 | | - | |
189 | | - | |
190 | 167 | | |
191 | 168 | | |
192 | 169 | | |
| |||
197 | 174 | | |
198 | 175 | | |
199 | 176 | | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | 177 | | |
205 | 178 | | |
206 | 179 | | |
207 | 180 | | |
208 | 181 | | |
209 | 182 | | |
210 | 183 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | 184 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
| 185 | + | |
| 186 | + | |
253 | 187 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 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 | + | |
273 | 213 | | |
274 | 214 | | |
275 | 215 | | |
| |||
0 commit comments