Commit ee418c5
committed
Add / remove spinner on pagination changes
** Why are these changes being introduced:
We recently refactored how the spinner is applied and removed when
changing between tabs, but neglected to be consistent when it comes to
pagination changes.
** Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/use-201
** How does this address that need:
This adds the same add/remove calls for managing the spinner to the
pagination management branches of the javascript file. It elects to
maintain the separate pathways for these calls, rather than trying to
handle the spinner in a unified area of the event listeners.
** Document any side effects to this change:
The duplication of calls, like lines 46-50 being basically the same as
lines 26-30, may be seen as a code smell later. For now, though, I
prefer to keep them separate like this - both for parity between these
pathways and also symmetry with the .classList.add() lines at 61 and 75.
It seems safer to handle the spinner only in qualified contexts, rather
than risking it appearing or disappearing without that being intended.1 parent 20ad4d3 commit ee418c5
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
| 65 | + | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
| |||
0 commit comments