Skip to content

[3.0] Theme split (wave 1, part 3) — Drop the unused jQuery Custom Scrollbar - #9334

Merged
live627 merged 2 commits into
SimpleMachines:release-3.0from
albertlast:3.0/theme-scrollbar
Aug 2, 2026
Merged

[3.0] Theme split (wave 1, part 3) — Drop the unused jQuery Custom Scrollbar#9334
live627 merged 2 commits into
SimpleMachines:release-3.0from
albertlast:3.0/theme-scrollbar

Conversation

@albertlast

@albertlast albertlast commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Wave 1, part 3 of breaking up #7933. No theme templates touched.

Theme::loadJavaScript() loads jquery.custom-scrollbar.js and its stylesheet on every page for every logged-in member:

if (!User::$me->is_guest) {
	self::loadJavaScriptFile('jquery.custom-scrollbar.js', ['minimize' => true], 'smf_jquery_scrollbar');
	self::loadCSSFile('jquery.custom-scrollbar.css', ['force_current' => false, 'validate' => true], 'smf_scrollbar');
}

Nothing calls customScrollbar(). Grepping Sources/ and Themes/default/ for customScrollbar, custom-scrollbar, smf_jquery_scrollbar and smf_scrollbar finds only the plugin itself and these two lines. So it is 942 lines of JS and CSS downloaded and parsed for nothing.

Removes both files, both loader calls, and the credit entry, since the library is no longer bundled. #7933 leaves the credit behind; that looks like an oversight rather than a decision.

Not included: #7933 also adds defer to smf_jquery_plugins.js and theme.js in the same block. That is a separate change with its own risks, so it is left for the part that deals with script loading.

Testing

  • Board index, a topic, profile, personal messages, credits and the admin centre all load with no scrollbar references in the markup, and no console errors.
  • jQuery.fn.customScrollbar is undefined — confirming nothing was relying on it.

🤖 Generated with Claude Code

…rollbar

The plugin and its stylesheet are loaded on every page for every logged-in
member, and nothing calls customScrollbar(). Remove both files, the two
loader calls, and the credit for a library that is no longer bundled.

Wave 1, part 3 of breaking up SimpleMachines#7933.

Co-Authored-By: John Rayes <live627@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@albertlast albertlast mentioned this pull request Aug 1, 2026
@albertlast albertlast changed the title [3.0] Theme split 4/24 — Drop the unused jQuery Custom Scrollbar [3.0] Theme split (wave 1, part 3) — Drop the unused jQuery Custom Scrollbar Aug 1, 2026
@albertlast
albertlast force-pushed the 3.0/theme-scrollbar branch from 85b3b38 to a0158a5 Compare August 1, 2026 07:28
@jdarwood007 jdarwood007 added this to the 3.0 Alpha 5 milestone Aug 1, 2026
@live627

live627 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

this related CSS rule can go

.top_menu.scrollable {
max-height: 30em;
}

Review feedback on SimpleMachines#9334: .top_menu.scrollable capped #pm_menu and
#alerts_menu at 30em so the custom scrollbar had something to scroll.
Nothing ever called customScrollbar(), and .top_menu declares no
overflow, so the rule only made long lists spill outside the menu's
border instead of growing it. With the plugin gone it has no reason
to stay.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@live627
live627 merged commit 0524024 into SimpleMachines:release-3.0 Aug 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants