Commit f847b39
authored
Upgrade from woefully outdated jQuery version (#2022)
## Changes
<!-- List the changes this PR makes. -->
- fix #2004
## Context
<!-- Explain why you're making these changes. -->
jQuery has not been meaningfully updated in over a decade. The previous
version in use , **jQuery 1.7.1 (released in 2011)** , predates
widespread support for modern JavaScript APIs. It was last updated in
this project around 2013, and since then, no further upgrades were made
despite **over 50 releases** and critical improvements in the jQuery
ecosystem.
This long-standing neglect created growing technical debt:
- Increasing incompatibility with modern development tools
- Accumulation of deprecated patterns (`.bind()`, `.click()`)
- Potential security and performance concerns
- Poor developer experience when debugging or extending JS
While the site continued to function thanks to jQuery Migrate and
browser backward compatibility, this was **not sustainable maintenance**
.
---
## Why Upgrade Now?
We are modernizing the JavaScript foundation to:
- [x] **Improve compatibility** with current and future browser
standards
- [x] **Leverage bug fixes and performance improvements** from jQuery
3.x
- [x] **Enable use of modern jQuery features** (e.g. improved `.on()`,
better event delegation)
- [x] **Support upcoming enhancements** that depend on reliable,
up-to-date tooling
- [x] **Remove reliance on deprecated APIs** that hinder maintainability
- [x] **Align with security best practices** by using actively supported
versions
jQuery 3.x dropped support for legacy browsers (IE 6–8), which we no
longer need to support. This allows us to benefit from a leaner, faster,
and more predictable codebase.
---
## Migration Strategy
This upgrade was done incrementally to ensure stability:
1. **Added jQuery Migrate 1.2.1** to detect deprecations
2. **Refactored legacy event bindings** (`.click()` → `.on()`, `.bind()`
→ `.on()`)
3. **Upgraded to jQuery 3.7.1 + jQuery UI 1.14.1** with modern Migrate
4. **Verified functionality** across all interactive components
5. **Removed Migrate** after confirming no deprecation warnings
6. **Cleaned up outdated asset comments** in `application.js`
All changes preserve existing behavior. The result is a safer, more
maintainable JavaScript foundation.
----
This work closes a long-overdue maintenance gap and sets the stage for
more confident, modern front-end development.2 files changed
+17
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| |||
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | | - | |
| 44 | + | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
| |||
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
118 | | - | |
| 116 | + | |
119 | 117 | | |
120 | 118 | | |
121 | 119 | | |
| |||
181 | 179 | | |
182 | 180 | | |
183 | 181 | | |
184 | | - | |
| 182 | + | |
185 | 183 | | |
186 | 184 | | |
187 | | - | |
| 185 | + | |
188 | 186 | | |
189 | 187 | | |
190 | 188 | | |
191 | 189 | | |
192 | 190 | | |
193 | | - | |
| 191 | + | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
197 | | - | |
| 195 | + | |
198 | 196 | | |
199 | 197 | | |
200 | 198 | | |
| |||
220 | 218 | | |
221 | 219 | | |
222 | 220 | | |
223 | | - | |
| 221 | + | |
224 | 222 | | |
225 | 223 | | |
226 | 224 | | |
227 | 225 | | |
228 | 226 | | |
229 | | - | |
| 227 | + | |
230 | 228 | | |
231 | 229 | | |
232 | | - | |
| 230 | + | |
233 | 231 | | |
234 | 232 | | |
235 | 233 | | |
| |||
476 | 474 | | |
477 | 475 | | |
478 | 476 | | |
479 | | - | |
| 477 | + | |
480 | 478 | | |
481 | 479 | | |
482 | 480 | | |
| |||
497 | 495 | | |
498 | 496 | | |
499 | 497 | | |
500 | | - | |
| 498 | + | |
501 | 499 | | |
502 | 500 | | |
503 | 501 | | |
| |||
551 | 549 | | |
552 | 550 | | |
553 | 551 | | |
554 | | - | |
| 552 | + | |
555 | 553 | | |
556 | 554 | | |
557 | 555 | | |
| |||
654 | 652 | | |
655 | 653 | | |
656 | 654 | | |
657 | | - | |
| 655 | + | |
658 | 656 | | |
659 | 657 | | |
660 | 658 | | |
| |||
786 | 784 | | |
787 | 785 | | |
788 | 786 | | |
789 | | - | |
| 787 | + | |
790 | 788 | | |
791 | 789 | | |
792 | 790 | | |
793 | 791 | | |
794 | | - | |
| 792 | + | |
795 | 793 | | |
796 | 794 | | |
797 | 795 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments