Skip to content

Track A: Drop jQuery 1.9.1 + Bootstrap 3.3.6 JavaScript (vanilla replacements) #1288

@jonfroehlich

Description

@jonfroehlich

Scoped first half of #1253. This track covers only the JavaScript / dependency side — removing jQuery 1.9.1 and the Bootstrap 3.3.6 JS components and replacing them with vanilla JS. The Bootstrap grid/CSS rewrite is deliberately split into a separate Track B (see below).

Why this track first

  • Real security payoff. jQuery 1.9.1 (2013) has known XSS issues; Bootstrap 3.3.6 JS is EOL. This is where the value is.
  • Small, bounded scope (verified against master 2026-06-15) — far smaller than the original Dropping Bootstrap #1253 estimate.
  • Low visual-regression risk vs. the grid rewrite, so it's safe to do before we have visual-diff coverage.

Actual scope (verified, not the #1253 estimate)

jQuery consumers in our own code:

  • website/static/website/js/top-navbar.js (38 lines)
  • website/static/website/js/backtop.js (27 lines)
  • website/static/website/js/project-sidebar-sticky.js (114 lines)
  • website/static/website/js/citationPopoverSimple.js (399 lines — popover API: 4 call sites)
  • inline $('.carousel').carousel(); in base.html

Bootstrap JS components in use:

  • Carouseldata-ride="carousel" in base.html (hero) + snippets/display_short_carousel_snippet.html
  • Popover — citations (citationPopoverSimple.js + data-toggle="popover" in display_citation_link_snippet.html)
  • ScrollSpydata-spy="scroll" on <body> in base.html
  • Collapse — navbar data-toggle="collapse" in base.html

Extra jQuery dependencies the original #1253 analysis missed:

  • jquery.easing.min.js (loaded in base.html)
  • jquery-ui.min.js + jquery-ui CSS (loaded on index.html, awards.html, publications.html) — no .autocomplete/.sortable/.datepicker/... API calls found anywhere. Likely dead weight. First step: confirm it's truly unused and delete it — possible free win that shrinks this track.

Suggested order (one PR per item, keep Bootstrap loaded until the last consumer is gone)

  1. Verify + remove unused jquery-ui (and its CSS) if confirmed dead.
  2. Vanilla navbar collapse + back-to-top + scrollspy (IntersectionObserver).
  3. Vanilla carousel.
  4. De-jQuery the citation popover.
  5. Replace jquery.easing usage.
  6. Remove the jQuery + Bootstrap JS <script> tags from base.html. (Bootstrap CSS stays — that's Track B.)

Out of scope (→ Track B)

  • Bootstrap grid (col-*, row, container) — only 22 col-* usages across 9 templates, not the ~242 claimed in Dropping Bootstrap #1253.
  • hidden-*/visible-* utilities (6 usages).
  • Deleting the Bootstrap CSS files.
  • Track B should be gated on a visual-regression safety net (e.g. Playwright screenshot diffs), since Pa11y covers a11y but not layout.

Refs #1253.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions