Skip to content

Remove dead Bootstrap scrollspy from <body> (#1288) - #1291

Merged
jonfroehlich merged 1 commit into
masterfrom
1288-remove-dead-scrollspy
Jun 15, 2026
Merged

Remove dead Bootstrap scrollspy from <body> (#1288)#1291
jonfroehlich merged 1 commit into
masterfrom
1288-remove-dead-scrollspy

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Third step of Track A (#1288), the JS half of the Bootstrap+jQuery removal (#1253). Follows #1289 and #1290.

What

Removes data-spy="scroll" data-target=".navbar-fixed-top" from the <body> tag. One-line change.

Why it's a no-op (safe)

Bootstrap scrollspy only activates nav links whose href is an in-page #anchor matching an on-page element. The main navbar (.navbar-fixed-top) contains only full page-URL links (/publications, /people, …) and external links — zero #anchors — so scrollspy matched nothing and just attached a wasted scroll listener.

  • In-page section nav on publications/awards is tocbot, independent of Bootstrap.
  • The navbar's active-page highlight is server-side template logic ({% if url_name == ... %}active), not scrollspy.

So nothing to convert to IntersectionObserver — this just deletes a dead attribute and drops one more Bootstrap-JS dependency point.

Verification

All pages return HTTP 200; data-spy gone from served HTML; active-page highlight unchanged across /, /publications, /people, /awards.

Refs #1253.

Track A (#1253). The body carried `data-spy="scroll" data-target=".navbar-fixed-top"`,
but Bootstrap scrollspy only activates nav links whose href is an in-page
`#anchor` matching an on-page element. The main navbar contains only full
page-URL links and external links — zero `#anchors` — so scrollspy matched
nothing and did nothing (it just attached a wasted scroll listener).

In-page section navigation on publications/awards is handled by tocbot,
independent of Bootstrap. The navbar's active-page highlight is server-side
template logic (`{% if url_name == ... %}active`), not scrollspy — so this is
purely removing a no-op and one more Bootstrap-JS dependency.

Verified: all pages 200, active-page highlight unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich
jonfroehlich merged commit f9ff732 into master Jun 15, 2026
1 check passed
jonfroehlich added a commit that referenced this pull request Jun 15, 2026
Bumps ML_WEBSITE_VERSION 2.4.0 -> 2.5.0. Marks the completion of Track A
(#1288): the frontend is now jQuery-free and Bootstrap-JS-free. Navbar (#1290),
citation popover (#1292), and carousels (#1293) rewritten in vanilla JS; dead
scrollspy (#1291), jQuery UI, jQuery Easing, and back-to-top removed
(#1289/#1290); jQuery 1.9.1 + Bootstrap 3.3.6 JS script tags dropped (#1295).
Bootstrap CSS unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich jonfroehlich mentioned this pull request Jun 15, 2026
20 tasks
mechanicjay pushed a commit to mechanicjay/makeabilitylabwebsite that referenced this pull request Jun 17, 2026
Final step of Track A (makeabilitylab#1253). With the navbar (makeabilitylab#1290), scrollspy (makeabilitylab#1291),
citation popover (makeabilitylab#1292), and carousel (makeabilitylab#1293) all converted to vanilla JS,
nothing in the site's frontend uses jQuery or Bootstrap's JS any longer
(verified: zero `$(...)` calls, zero Bootstrap data-api attributes besides the
inert `data-toggle="popover"` selector). This removes the two now-unused CDN
script tags from base.html:

  - jQuery 1.9.1 (2013; known XSS issues)
  - Bootstrap 3.3.6 JS

Bootstrap's CSS (bootstrap.min.css) stays — only the JavaScript is removed;
the grid/CSS migration is the separate Track B.

Also tidied a now-stale comment in project-sidebar-sticky.js (the rest of the
codebase no longer uses jQuery).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich
jonfroehlich deleted the 1288-remove-dead-scrollspy branch June 22, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant