Commit 58eedd6
committed
Add loading spinner for Turbo Frame updates
Why these changes are being introduced:
Users experience long delays when switching between search tabs due to
slow Primo API responses, with no visual feedback indicating that the
system is processing their request.
Relevant ticket(s):
- [USE-134](https://mitlibraries.atlassian.net/browse/USE-134)
How this addresses that need:
This adds a CSS spinner animation that appears during Turbo Frame
updates. It uses Turbo's built-in `busy` attribute for reliable state
detection. Turbo also adds `aria-busy` for screen reader users.
Side effects of this change:
- Adds data-turbo-action="advance" to search results frame.
- Spinner may briefly show during fast API responses.
- Deprecated Turbo API syntax has been updated to current syntax.
- This is different the from built-in Turbo progress bar that we use for
page reloads, as that feature is not available for Turbo Frame updates.
It's fairly straightforward to rebuild in JS if we decide we want
consistent loading progress indicators.1 parent b4195f1 commit 58eedd6
File tree
3 files changed
+35
-2
lines changed- app
- assets/stylesheets/partials
- javascript
- views/search
3 files changed
+35
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments