Skip to content

Migrate from Bootstrap 3.3.7 to Bootstrap 5.3.8#922

Merged
MakisH merged 22 commits into
precice:masterfrom
MuhammadAashirAslam:bootstrap5-migration
Jun 15, 2026
Merged

Migrate from Bootstrap 3.3.7 to Bootstrap 5.3.8#922
MakisH merged 22 commits into
precice:masterfrom
MuhammadAashirAslam:bootstrap5-migration

Conversation

@MuhammadAashirAslam

Copy link
Copy Markdown
Collaborator
  • Upgraded Bootstrap from 3.3.7 to 5.3.8 CDN bundle (CSS & JS) in head layouts and removed obsolete IE8/9 compatibility layers.
  • Simplified HTML layouts by deleting nested row/column wrappers ("div-soup") around section headers, paragraph tags, and obsolete caret helper elements.
  • Replaced custom CSS classes with modern native Bootstrap 5 grid, flexbox, and alignment utilities (e.g., col-flex -> d-flex flex-column, vertical-align -> d-flex align-items-center, no-margin -> m-0).
  • Consolidated main styles by deleting modern-business.css and merging rules into customstyles.css.
  • Purged duplicate CSS rules, legacy browser vendor prefixes, and obsolete panel/card dual-class selectors from stylesheets.
  • Compensated for spacing changes by shifting the 20px bottom-margin from the removed headers globally to the .section-header class.
  • Realigned page footer components, custom workshops, and team grids using standard Bootstrap 5 container, rounding, and spacing parameters.
  • Removed jquery.min.js and jqueryui.min.js and rewrote all jQuery-dependent JS to vanilla DOMContentLoaded APIs.
  • Replaced the navgoco jQuery sidebar plugin with Bootstrap 5 native collapse component using data-bs-toggle attributes.
  • Removed unused theme-blue.css and theme-green.css.

Documentation:

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have gone through most of the changes and I have looked through all of the pages in "desktop view" and several pages in "mobile view". Here are some first comments (all the ones from #921 seem to have been resolved).

Comment thread css/landing-page.css
Comment thread content/community/workshops/precice-workshop-2025.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a nice and long-overdue addition, thanks!

I wonder if we should use something more unique than the title (e.g., the filename where the data is drawn from), as the title could be duplicated (e.g., the slides and the post-proceedings paper of a conference). But that's not currently an issue.

Comment thread _config.yml Outdated
Comment thread _includes/news_banner.html
Comment thread _includes/sidebar.html
Comment on lines +1 to +6
{% comment %}
Recursive sidebar: renders nested doc nav from _data/sidebars via folder.folderitems.
Parameters: item (folder node), level (1–4), parent_id (element id for data-bs-parent accordion group).
Branch rows use BS5 Collapse (data-bs-toggle, .collapse.show); leaves are plain nav-links.
Active state compares page.url (no leading slash) to each item url.
{% endcomment %}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed, and how does it relate to sidebar.html?

Is this something standard, or something you implemented on top?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply, I missed this.

sidebar.html is the shell (title + top-level loop). sidebar_recursive.html does the nested part. It replaces navgoco after we dropped jQuery for BS5, walks _data/sidebars by calling itself, and sets active/expanded state in Liquid instead of client-side JS.

Same idea as Hugo's menu templates docs (recursive partial + active detection). We can then port it directly in the Hugo migration.

Comment thread _includes/sidebar_recursive.html Outdated
Comment thread _includes/head.html
}

/* Match the fixed collapsed navbar height on narrow screens. */
@media (max-width: 1199.98px) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably for a next PR: these hard-coded widths in media queries look a bit hacky. We should add some CSS preprocessor, or in some other way make these centrally configurable.

@MuhammadAashirAslam MuhammadAashirAslam Jun 6, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! i will look in to this

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more comments. I have now looked through the whole code, even though I only skimmed through some longer CSS additions, which I think need to be simplified.

Comment thread content/index.html Outdated
Comment thread content/index.html

.btn {
font-size: 14px;
line-height: 1.42857143;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this overly-specific number?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes from Bootstrap 3’s default line height: 20px / 14px = 1.42857143. The whole .btn block copies the old Bootstrap 3 button metrics (font-size: 14px, line-height: 1.42857143, padding: 6px 12px, border-radius: 4px) so the we keep the previous button height and spacing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of doubt: Fine to have this PR make things look reasonably similar and have a follow-up PR simplifying/cleaning up.

Comment thread css/customstyles-precice.css
@MuhammadAashirAslam

Copy link
Copy Markdown
Collaborator Author

I found a few remaining Bootstrap 3-era assets, docs, and helper-class references. Tried my best to remove all of the Bootstrap 3 references

440bf9e removes the old Glyphicons font files, since Bootstrap 5 no longer ships or uses them.
904ad64 updates the local Bootstrap assets to 5.3.8 and makes the PDF build use the local stylesheet.
9bc8e05 widens the PDF print layout so generated pages use more of the available page width.
69b459b updates stale documentation that still described the site as using Bootstrap 3.x.
ad133b8 removes remaining old Bootstrap references and migrates legacy image helper classes to Bootstrap 5 equivalents.

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the overview of updates and the clean history, this really helps!

Some comments on the latest changes.

Comment thread content/community/contribute/community-contribute-open-projects.md
Comment thread _layouts/default_print.html

@MakisH MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for resolving all details. The unresolved conversations can be handled in follow-up contributions.

Btw, also closes #867 (nice!)

I think this is already good enough to merge. @fsimonis do you see anything critical?

@MakisH MakisH self-assigned this Jun 12, 2026
- Upgraded Bootstrap from 3.3.7 to 5.3.8 CDN bundle (CSS & JS) in head layouts and removed obsolete IE8/9 compatibility layers.
- Simplified HTML layouts by deleting nested row/column wrappers ("div-soup") around section headers, paragraph tags, and obsolete caret helper elements.
- Replaced custom CSS classes with modern native Bootstrap 5 grid, flexbox, and alignment utilities (e.g., col-flex -> d-flex flex-column, vertical-align -> d-flex align-items-center, no-margin -> m-0).
- Consolidated main styles by deleting modern-business.css and merging rules into customstyles.css.
- Purged duplicate CSS rules, legacy browser vendor prefixes, and obsolete panel/card dual-class selectors from stylesheets.
- Compensated for spacing changes by shifting the 20px bottom-margin from the removed headers globally to the .section-header class.
- Realigned page footer components, custom workshops, and team grids using standard Bootstrap 5 container, rounding, and spacing parameters.

Documentation:
- BS5 Migration: https://getbootstrap.com/docs/5.3/migration/
- Grid System: https://getbootstrap.com/docs/5.3/layout/grid/
- Cards (replacing Panels): https://getbootstrap.com/docs/5.3/components/card/
- Spacing: https://getbootstrap.com/docs/5.3/utilities/spacing/
- Flexbox: https://getbootstrap.com/docs/5.3/utilities/flex/
- Dropdowns: https://getbootstrap.com/docs/5.3/components/dropdowns/
@MuhammadAashirAslam

Copy link
Copy Markdown
Collaborator Author

I rebased bootstrap5-migration onto the latest upstream master to keep the branch current and avoid merge conflicts ( turns out this was not needed 😅 )

@MuhammadAashirAslam

Copy link
Copy Markdown
Collaborator Author

4288212 Just a small tweak: the code_aster overview was rendered twice because the same URL was declared both on the code_aster parent and its Overview child.

@MakisH MakisH moved this from Todo to Needs review in GSoC 2026: Website modernization Jun 15, 2026
@fsimonis

Copy link
Copy Markdown
Member

I'll take a look at this now.

@MakisH

MakisH commented Jun 15, 2026

Copy link
Copy Markdown
Member

When updating the branch, the trivial change from #931 will need to be ported.

@fsimonis fsimonis self-requested a review June 15, 2026 08:52

@fsimonis fsimonis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewing this PR really makes you realize how slow and buggy the GitHub interface has become.

I opened an issue to cleanup these random snippets of JS that are lying around. #932

There is still a lot of CSS in the repo, but hopefully this will shrink when moving to the SASS version of the Hugo site.

I tested it locally and walked through the site with the old and the new side by side using the iPhone 17 preset.
The new theme is slightly more spacious, which is not a bad thing.
The only functional difference I noticed is that the sidebar of the new version is way snappier. Not sure why.

Anyway. Looks good and ready to go.

@MakisH

MakisH commented Jun 15, 2026

Copy link
Copy Markdown
Member

Just in case this is needed in the future: b25d6e1 is the last commit with Bootstrap 3.

@MakisH MakisH changed the title Migration from Bootstrap 3.3.7 to Bootstrap 5.3.8 Migrate from Bootstrap 3.3.7 to Bootstrap 5.3.8 Jun 15, 2026
@MakisH MakisH merged commit c8ef3c5 into precice:master Jun 15, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Needs review to Done in GSoC 2026: Website modernization Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Technical issues on the website

Development

Successfully merging this pull request may close these issues.

3 participants