Migrate from Bootstrap 3.3.7 to Bootstrap 5.3.8#922
Conversation
There was a problem hiding this comment.
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 %} | ||
| 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 %} |
There was a problem hiding this comment.
Why is this needed, and how does it relate to sidebar.html?
Is this something standard, or something you implemented on top?
There was a problem hiding this comment.
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.
| } | ||
|
|
||
| /* Match the fixed collapsed navbar height on narrow screens. */ | ||
| @media (max-width: 1199.98px) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Thanks! i will look in to this
MakisH
left a comment
There was a problem hiding this comment.
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.
|
|
||
| .btn { | ||
| font-size: 14px; | ||
| line-height: 1.42857143; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
In case of doubt: Fine to have this PR make things look reasonably similar and have a follow-up PR simplifying/cleaning up.
|
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. |
ad133b8 to
1d7306c
Compare
MakisH
left a comment
There was a problem hiding this comment.
Thanks for the overview of updates and the clean history, this really helps!
Some comments on the latest changes.
- 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/
…ustomstyles-precice.css
…ide buttons vertically
1a69211 to
5ad7bbf
Compare
|
I rebased bootstrap5-migration onto the latest upstream master to keep the branch current and avoid merge conflicts ( turns out this was not needed 😅 ) |
|
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. |
|
I'll take a look at this now. |
|
When updating the branch, the trivial change from #931 will need to be ported. |
fsimonis
left a comment
There was a problem hiding this comment.
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.
|
Just in case this is needed in the future: b25d6e1 is the last commit with Bootstrap 3. |
Documentation: