Commit e7fb11f
authored
Directly view existing explanation (#57)
When clicking on the "Explain Error" button when viewing the console
output and an explanation already exists a intermediate pseudo dialog
was shown to either show the explanation, regenerate or cancel. I think
that is not a good UI experience.
An existing explanation is now directly shown when clicking in "Explain
Error". The card now has 2 buttons in the top right that allow to
regenerate and to close the explanation.
Even when the explainer is disabled after an explanation has been
created for a run, the button will be available. But re-explaining will
not be available in that case.
The change also prevents that the footer injects anything to a page or
loads the js when not on a console url.
fixes #52
<!-- Please describe your pull request here. -->
After:
<img width="1052" height="233" alt="image"
src="https://github.com/user-attachments/assets/59c99383-b1c4-4a9f-ae62-9828122db5c6"
/>
### Testing done
Interactive testing and added unit tests that ensure the div is properly
injected.
<!-- Comment:
Provide a clear description of how this change was tested.
At minimum this should include proof that a computer has executed the
changed lines.
Ideally this should include an automated test or an explanation as to
why this change has no tests.
Note that automated test coverage is less than complete, so a successful
PR build does not necessarily imply that a computer has executed the
changed lines.
If automated test coverage does not exist for the lines you are
changing, you must describe the scenario(s) in which you manually tested
the change.
For frontend changes, include screenshots of the relevant page(s) before
and after the change.
For refactoring and code cleanup changes, exercise the code before and
after the change and verify the behavior remains the same.
-->
### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch**
(right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired
changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [ ] Link to relevant pull requests, esp. upstream and downstream
changes
- [ ] Ensure you have provided tests that demonstrate the feature works
or the issue is fixed
<!--
Put an `x` into the [ ] to show you have filled the information.
The template comes from
https://github.com/jenkinsci/.github/blob/master/.github/pull_request_template.md
You can override it by creating .github/pull_request_template.md in your
own repository
-->1 parent cd00de6 commit e7fb11f
File tree
7 files changed
+188
-206
lines changed- src
- main
- java/io/jenkins/plugins/explain_error
- resources/io/jenkins/plugins/explain_error/ConsolePageDecorator
- webapp/js
- test/java/io/jenkins/plugins/explain_error
7 files changed
+188
-206
lines changedLines changed: 0 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 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 | 96 | | |
130 | 97 | | |
131 | 98 | | |
| |||
Lines changed: 26 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| 34 | + | |
30 | 35 | | |
31 | | - | |
32 | | - | |
33 | | - | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
37 | 59 | | |
38 | 60 | | |
Lines changed: 21 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | 24 | | |
10 | 25 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 26 | + | |
31 | 27 | | |
32 | 28 | | |
| 29 | + | |
33 | 30 | | |
34 | 31 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 2 | + | |
8 | 3 | | |
9 | 4 | | |
10 | 5 | | |
| |||
14 | 9 | | |
15 | 10 | | |
16 | 11 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 12 | | |
24 | 13 | | |
25 | 14 | | |
| |||
36 | 25 | | |
37 | 26 | | |
38 | 27 | | |
39 | | - | |
40 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
41 | 32 | | |
42 | 33 | | |
43 | 34 | | |
| |||
65 | 56 | | |
66 | 57 | | |
67 | 58 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 59 | | |
78 | 60 | | |
79 | 61 | | |
| |||
98 | 80 | | |
99 | 81 | | |
100 | 82 | | |
101 | | - | |
102 | | - | |
| 83 | + | |
103 | 84 | | |
104 | 85 | | |
105 | 86 | | |
| |||
108 | 89 | | |
109 | 90 | | |
110 | 91 | | |
111 | | - | |
112 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
113 | 100 | | |
114 | 101 | | |
115 | 102 | | |
116 | 103 | | |
117 | 104 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 105 | | |
122 | 106 | | |
123 | 107 | | |
124 | 108 | | |
125 | 109 | | |
126 | 110 | | |
127 | 111 | | |
| 112 | + | |
128 | 113 | | |
129 | 114 | | |
130 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
131 | 121 | | |
132 | 122 | | |
133 | 123 | | |
134 | 124 | | |
135 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
136 | 128 | | |
137 | 129 | | |
138 | 130 | | |
139 | 131 | | |
140 | 132 | | |
141 | 133 | | |
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 | 134 | | |
172 | | - | |
173 | 135 | | |
174 | 136 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | 137 | | |
189 | | - | |
190 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
191 | 143 | | |
192 | 144 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
201 | 150 | | |
202 | 151 | | |
203 | 152 | | |
204 | | - | |
205 | 153 | | |
206 | 154 | | |
207 | 155 | | |
208 | 156 | | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | 157 | | |
214 | 158 | | |
215 | 159 | | |
216 | 160 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | 161 | | |
223 | | - | |
224 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
225 | 166 | | |
226 | 167 | | |
227 | 168 | | |
| |||
292 | 233 | | |
293 | 234 | | |
294 | 235 | | |
295 | | - | |
| 236 | + | |
296 | 237 | | |
297 | | - | |
298 | 238 | | |
0 commit comments