Repository navigation
chore (5/8): migrate templates from Bootstrap 3 to Bootstrap 5 - #328
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates UNAIDS CKAN theme templates and format-chip styles toward Bootstrap 5 compatibility for CKAN 2.11, preserving custom homepage behavior and key UI interactions.
Changes:
- Replaces several Bootstrap 3 data attributes, grid utilities, float helpers, and label classes with Bootstrap 5 equivalents.
- Adds
.badge[data-format]selectors alongside existing.label[data-format]styling. - Adds
home/index.htmlto route the CKAN homepage back through the customhome/layout1.html.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
ckanext/unaids/theme/templates/user/edit_user_form.html |
Updates grid and float utilities in the user edit form. |
ckanext/unaids/theme/templates/snippets/dataset_selector.html |
Updates dropdown trigger attribute. |
ckanext/unaids/theme/templates/scheming/form_snippets/org_to_allow_transfer_to.html |
Updates collapse trigger attribute. |
ckanext/unaids/theme/templates/request/show.html |
Updates float utility on approval action. |
ckanext/unaids/theme/templates/package/snippets/package_form.html |
Updates float utilities in danger-zone actions. |
ckanext/unaids/theme/templates/package/snippets/bulk_file_uploader.html |
Updates modal trigger attributes. |
ckanext/unaids/theme/templates/package/releases/list.html |
Updates dropdown and grid utilities in release list. |
ckanext/unaids/theme/templates/package/releases/base.html |
Updates offset utility in release modal layout. |
ckanext/unaids/theme/templates/package/read.html |
Updates float utility on download-all button. |
ckanext/unaids/theme/templates/package/read_base.html |
Updates tooltip toggle attribute. |
ckanext/unaids/theme/templates/package/collaborators/collaborator_new.html |
Updates float utility on collaborator delete action. |
ckanext/unaids/theme/templates/organization/members.html |
Updates float utility in member action group. |
ckanext/unaids/theme/templates/organization/member_new.html |
Updates float utility on member delete action. |
ckanext/unaids/theme/templates/organization/bulk_process.html |
Updates float utility and converts labels to Bootstrap 5 badges. |
ckanext/unaids/theme/templates/home/layout1.html |
Updates homepage grid, ordering, visibility, and float utilities. |
ckanext/unaids/theme/templates/home/index.html |
Adds homepage shim that includes the custom layout. |
ckanext/unaids/assets/custom.css |
Adds Bootstrap 5 badge format-chip selectors. |
ckanext/unaids/assets/css/ckanext-geoview.css |
Adds Bootstrap 5 badge selectors for geospatial formats. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced May 19, 2026
A-Souhei
force-pushed
the
chore/ckan-211-pr4-test-bodies
branch
from
May 20, 2026 11:07
7dad432 to
4702c86
Compare
A-Souhei
force-pushed
the
chore/ckan-211-pr5-bootstrap-5
branch
from
May 20, 2026 11:07
3ce2fd2 to
966587d
Compare
A-Souhei
force-pushed
the
chore/ckan-211-pr4-test-bodies
branch
from
May 20, 2026 11:34
4702c86 to
14307a5
Compare
A-Souhei
force-pushed
the
chore/ckan-211-pr5-bootstrap-5
branch
from
May 20, 2026 11:34
966587d to
c9a3a3c
Compare
A-Souhei
force-pushed
the
chore/ckan-211-pr4-test-bodies
branch
from
May 20, 2026 13:17
14307a5 to
078885e
Compare
A-Souhei
force-pushed
the
chore/ckan-211-pr5-bootstrap-5
branch
from
May 20, 2026 13:18
c9a3a3c to
19976a5
Compare
A-Souhei
force-pushed
the
chore/ckan-211-pr4-test-bodies
branch
from
May 21, 2026 06:14
078885e to
1b13721
Compare
A-Souhei
force-pushed
the
chore/ckan-211-pr5-bootstrap-5
branch
2 times, most recently
from
May 21, 2026 06:58
03248ff to
2f86950
Compare
This was referenced May 21, 2026
A-Souhei
force-pushed
the
chore/ckan-211-pr4-test-bodies
branch
from
May 26, 2026 10:47
3e1167a to
25b8879
Compare
added 2 commits
May 26, 2026 17:20
CKAN 2.11 ships Bootstrap 5 (was BS3 in 2.9). Templates and CSS need
matching syntax updates so dropdowns, modals, tooltips, columns and
helpers keep working under the new framework.
- data-toggle / data-target -> data-bs-toggle / data-bs-target across
5 templates (dropdowns, modals, tooltips).
- pull-right / pull-left -> float-end / float-start across the
templates that used them (the third-party bootstrap-table.css is
left untouched).
- col-xs-* -> col-*, col-{sm,md,lg}-offset-N -> offset-{sm,md,lg}-N,
order-xs-N -> order-N, and hidden-{xs,sm} -> d-* responsive utilities
in home/layout1.html, user/edit_user_form.html, and the release-list
rows.
- label label-info / label-danger -> badge bg-info / bg-danger in the
org bulk_process row. The format-color rules in assets/custom.css
and assets/css/ckanext-geoview.css gain parallel .badge[data-format]
selectors next to the existing .label[data-format] ones so the
format chips keep their colours under both BS3-rendered and
BS5-rendered markup (no colour changes here — cosmetic adjustments
are out of scope).
- Add ckanext/unaids/theme/templates/home/index.html that delegates
to home/layout1.html. CKAN 2.11 removed the ckan.homepage_style
config that previously selected layout1; without this shim the
homepage falls back to core CKAN's layout and our custom homepage
vanishes.
Completes the BS3->5 migration by converting classes/attributes the first pass missed (3 flagged by review, 3 found by a follow-up sweep): - read.html + download_all.js: `hidden` -> `d-none` for the Download All button, in both the template and the JS module that toggles it (BS5 dropped `.hidden`, so the button never hid/showed correctly). - read_base.html: tooltip `data-placement` -> `data-bs-placement`. - edit_user_form.html: `text-right` -> `text-end`; `hidden` -> `d-none` on the hidden-inputs wrapper. - text_template.html: `hidden` -> `d-none` on the value-carrying input (would otherwise render visibly under BS5). - releases/restore_or_delete.html: `text-right` -> `text-end`.
A-Souhei
force-pushed
the
chore/ckan-211-pr5-bootstrap-5
branch
from
May 26, 2026 14:21
7492053 to
9f66143
Compare
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.
Summary
Single cause: CKAN 2.11 ships Bootstrap 5 (CKAN 2.9 was Bootstrap 3). Every change in this PR is a mechanical Bootstrap 3 → 5 class/attribute rename required for our existing templates to keep rendering correctly. There is no visual redesign, no new layouts, and no colour or spacing changes — only renames of classes/attributes that Bootstrap 5 removed or renamed.
This directly answers the client's question "are these all to do with the bootstrap version changing? If so, that could be 1 PR" — yes, and this is that one PR. Changes for other reasons (CSRF, activity-plugin routes) are split into their own PRs (#329, #330).
What changed (all BS3 → BS5 renames)
pull-right/pull-left→float-end/float-startdata-toggle/data-target→data-bs-toggle/data-bs-target(dropdowns, modal, collapse, tooltip)data-placement→data-bs-placementtext-right→text-endhidden→d-none(incl. the Download All button + itsdownload_all.jstoggle, so show/hide works again)col-xs-*→col-*,col-lg-offset-2→offset-lg-2,order-xs-2→order-2,hidden-xs hidden-sm→d-none d-md-blocklabel label-info/label-danger→badge bg-info/bg-danger.badge[data-format]selectors alongside the existing.label[data-format]ones so the colour coding still applies under BS5 markup (no colour values changed)Plus one CKAN-2.11 (not Bootstrap) item that belongs with the homepage template work:
home/index.htmlshim that includes ourhome/layout1.html. CKAN 2.11 removed theckan.homepage_styleconfig that previously loaded our custom homepage; without this shim the homepage silently falls back to core CKAN's.Completeness
A repo-wide sweep was run for leftover BS3 classes (
pull-*,col-xs-*,hidden-*,data-toggle,data-placement,text-right,.hidden,label-*). All functional leftovers are converted. Remaining.label[data-format]selectors are intentional (kept alongside the new.badge[data-format]for backwards compatibility); a.col-xs-*selector list incustom.cssis a harmless padding rule (itscol-sm/md/lgselectors still apply under BS5).Test plan