Skip to content

fix(skin): drop duplicate Bootstrap 5 includes from respondr skin#2980

Merged
bjagg merged 3 commits into
uPortal-Project:masterfrom
bjagg:fix/dedupe-bootstrap-skin-includes
May 5, 2026
Merged

fix(skin): drop duplicate Bootstrap 5 includes from respondr skin#2980
bjagg merged 3 commits into
uPortal-Project:masterfrom
bjagg:fix/dedupe-bootstrap-skin-includes

Conversation

@bjagg

@bjagg bjagg commented May 5, 2026

Copy link
Copy Markdown
Member

Problem

uPortal-webapp/src/main/webapp/media/skins/respondr/common/common_skin.xml declared the Bootstrap 5 CSS bundle and the Bootstrap 5 JS bundle three times each:

  • a <… included=\"plain\"> variant
  • a <… included=\"aggregated\"> variant
  • a third unqualified entry that matched both render modes

The unqualified entry caused Bootstrap to load twice in the browser. Two copies of bootstrap.bundle.js attach two delegated handlers per dropdown toggle, so a single user click toggled the menu to open then immediately back to closed. Portlet Options dropdowns appeared dead, and any UX flow gated on opening that menu — favorites add/remove, rate-this-portlet, edit-mode entry — silently broke.

Goal

Include each Bootstrap asset exactly once per render mode so each click handler attaches once.

Changes

  • Drop the unqualified <css>bootstrap.min.css</css> entry from common_skin.xml; the included=\"plain\" + included=\"aggregated\" pair already covers every render mode.
  • Drop the matching unqualified <js>bootstrap.bundle.min.js</js> entry for the same reason.

How this snuck in

The duplication landed during the Bootstrap 5 migration when two contributors added the asset from different mental models — unconditional include and mode-qualified include. Both were applied; neither was removed.

Verification

Built uPortal locally, redeployed the WAR via uPortal-start (./gradlew :overlays:uPortal:tomcatDeploy), and ran the uPortal-start Playwright smoke suite (106 tests). With the duplicate present, four dropdown-driven tests fail on intermittent open/close races. With the duplicate removed, all four pass; the suite is green.

Manual sanity check in the browser: opening any portlet's Options menu now stays open until the user clicks elsewhere, instead of closing on the same click that opened it.

bjagg added 3 commits May 4, 2026 15:52
Problem: respondr/common/common_skin.xml declared the Bootstrap 5 CSS
bundle and the Bootstrap 5 JS bundle three times each: a "plain"
variant, an "aggregated" variant, and a third unqualified entry that
matched both modes. The unqualified entry caused Bootstrap to load
twice in the browser. Two copies of bootstrap.bundle.js attached two
delegated handlers per dropdown toggle, so a single click toggled the
menu to "open" then immediately back to "closed". Portlet Options
dropdowns appeared dead, and any UX flow gated on opening that menu
(favorites add/remove, rate-this-portlet, etc.) silently broke.

Goal: include each Bootstrap asset exactly once per render mode so
each click handler attaches once.

Changes:
- remove the unqualified <css>bootstrap.min.css</css> entry from
  common_skin.xml; the "plain" + "aggregated" pair already covers
  every render mode
- remove the matching unqualified <js>bootstrap.bundle.min.js</js>
  entry for the same reason

Notes: the duplication snuck in during the Bootstrap 5 migration when
two contributors added the asset from different mental models —
"unconditional" and "mode-qualified". Verified with the uPortal-start
Playwright suite: dropdown-driven tests went from 4 failures to 0
once Bootstrap loaded a single time.
@bjagg bjagg merged commit c70251d into uPortal-Project:master May 5, 2026
5 checks passed
bjagg added a commit to bjagg/uPortal-start that referenced this pull request May 5, 2026
Problem: this branch has been carrying tests and overlay seeds that
depend on three companion fixes published over the last few days
(uPortal Bootstrap dedupe, CalendarPortlet template-sigil leak,
NotificationPortlet jjwt runtime classpath). Until those landed on
Maven Central, CI couldn't go green here even though every spec
passed locally against the locally-built SNAPSHOTs.

Goal: consume the published GA versions so PR uPortal-Project#692 lights up green
and is ready to merge.

Changes:
- uPortalVersion 5.17.4 → 5.17.5 (picks up
  uPortal-Project/uPortal#2980 — Bootstrap 5 include de-dup in the
  respondr skin, fixes silently-broken Options menus / favorites /
  rate-portlet across the dashboard)
- calendarPortletVersion 2.7.2 → 2.7.3 (picks up
  uPortal-Project/CalendarPortlet#404 — Underscore template
  settings override per call, fixes the events column rendering raw
  template source instead of event entries)
- notificationPortletVersion 4.8.3 → 4.8.4 (picks up
  uPortal-Project/NotificationPortlet#695 — pin jjwt-impl +
  jjwt-jackson at runtime, fixes /api/v2 silently 403'ing and the
  notification web components rendering empty)

Notes: locally redeployed the three webapps from Maven Central
artifacts and ran the Playwright suite three times in a row —
117/117 each pass — to confirm the published versions match what we
were testing against the SNAPSHOTs.
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.

2 participants