WW-5653 Upgrade Bootstrap to 5.3.x in sample apps#1793
Draft
lukaszlenart wants to merge 23 commits into
Draft
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ap 5 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…vbar classes Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…otstrap 5 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ootstrap 5 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…Home Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…otstrap 5 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…JS is served The old struts.action.excludePattern whitelisted the vendored /styles/*.css and /js/*.js layout for container serving. After moving Bootstrap/jQuery to webjars under /static/webjars/**, the '.*/js/.*\.js' entry matched the webjar JS path (e.g. bootstrap.bundle.min.js) and excluded it from Struts' static handler, so it fell through to the container and 404'd. Remaining webapp assets (prettify.js, main.css) are served via default-servlet fall-through. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ons, progress, forms, navbar) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lates Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…trap 5 HtmlUnit's JS engine cannot parse Bootstrap 5's ES6 (bootstrap.bundle.min.js uses 'class'), and the decorator now serves it, so the default WebClient threw on script error. The test only asserts server-rendered FreeMarker output, so JavaScript is disabled (matching Html5TagExampleTest). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Migrate new-person.ftl form off BS2 control-group/controls/form-actions to Bootstrap 5 (mb-3, form-label, form-control), and replace the dead alert-error class with alert-danger across the showcase pages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nder HtmlUnit HtmlUnit 5.2.0 cannot parse Bootstrap 5's minified ES6 (bootstrap.bundle.min.js uses 'class'), which broke the showcase HtmlUnit integration tests once the decorator started serving the bundle. - Add ParameterUtils.createWebClient() which disables throwExceptionOnScriptError, and route all integration tests through it (they assert server-rendered output, not Bootstrap's client-side behaviour). - Load bootstrap.bundle.min.js with 'defer' so a page's own inline scripts (e.g. the async chat demo) still execute before HtmlUnit hits the bundle's parse error; defer is also the recommended real-browser loading strategy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes WW-5653
Migrates both sample apps —
apps/showcaseandapps/rest-showcase— off the vendored Bootstrap 3.3.4 assets onto Bootstrap 5.3.7, served via the framework's own<s:webjar>support. This is a minimal port: pages keep their structure and look; only what Bootstrap 5 breaks was changed. Zero vendored Bootstrap 3 assets and zero Bootstrap 3 markup remain.Design + plan:
docs/superpowers/specs/2026-07-17-WW-5653-bootstrap5-migration-design.md,docs/superpowers/plans/2026-07-17-WW-5653-bootstrap5-migration.md.What changed
Asset delivery (WebJars)
org.webjars:bootstrap:5.3.7andorg.webjars.npm:bootstrap-icons:1.13.1(managed inparent/pom.xml, version props in rootpom.xml); both apps depend on them.<s:webjar>(bootstrap/css/bootstrap.min.css,bootstrap/js/bootstrap.bundle.min.js,bootstrap-icons/font/bootstrap-icons.min.css,jquery/jquery.min.js).struts.webjars.allowlist).jQuery isolation (note for reviewers)
webjars-jquery-showcase.versionproperty. The sharedwebjars-jquery.version(now4.0.0, core test scope) is intentionally not reused, so a future bump of the shared property won't drag the showcase to jQuery 4. Bootstrap 5 itself needs no jQuery.Markup migration (BS3/BS2 → BS5)
glyphicon-*(and old BS2icon-*) → Bootstrap Iconsbi bi-*.panel*→card*,btn-default→btn-secondary,btn-large→btn-lg,well→bg-light border rounded p-3,pull-*→float-*/ms-auto,table-condensed→table-sm,col-xs-*→col-*, BS2spanN→col-N,col-sm-offset-2→offset-sm-2,data-*→data-bs-*,page-header/hero-unitreplaced, carets removed.navbar-expand-lg, toggler +collapse,dropdown-toggle/dropdown-menu/dropdown-item).row mb-3+col-form-label); fixed a pre-existing malformed</apan>tag.Runtime verification (manual, both apps under
mvn jetty:run)biicons render; no glyphicons in output.Dogfooding find (already fixed here)
Serving the showcase via
<s:webjar>surfaced a real bug in the showcase's own config:struts.action.excludePatternstill whitelisted the old vendored layout (.*/styles/.*\.css,.*/js/.*\.js). The.*/js/.*\.jsentry matched the webjar JS path (/static/webjars/bootstrap/5.3.7/js/bootstrap.bundle.min.js), soStrutsExecuteFilterexcluded it from the static handler and it fell through to the container and 404'd (silently — no Struts logs). The CSS worked only because its webjar path is under/css/, not/styles/. Fixed by dropping the obsolete/styles/and/js/exclude entries. No core/framework code was changed — this is showcase config only.Draft — remaining follow-up nits (non-blocking)
navbar-headerwrapper div indecorators/main.jsp(no BS5 CSS behind it).page-headerreplacement isborder-bottom pb-2 mb-3on most pages vs a bare<div>on a few — both valid, slightly inconsistent.navbar-lightis soft-deprecated in BS 5.3 (works fine in 5.3.7;data-bs-themeis the newer idiom).dropdown-submenu/unclosed<li>in the navbar Examples menu (not introduced here).🤖 Generated with Claude Code