Upgrading Bootstrap5 from version 3 to 4

Created on 12 June 2024, 11 months ago

Problem/Motivation

It's great to see version 4 has been released, thanks! It still says this on the front page, which could get updated:

4.0.x Experimental branch (possible inclusions: bootstrap icons (included), bootswatch, dark mode, CSS variables)

Also, does upgrading from 3.x to 4.x require any extra steps, or it's just a matter of composer require drupal/bootstrap5:^4.0 and then drush updatedb?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇩🇰Denmark ressa Copenhagen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ressa
  • 🇺🇸United States erutan

    If you're overridden any templates I'd check them against the base theme for changes, I added some new aria roles to page.html.twig that weren't in v3 but are in v4.

    I rebuilt a new subtheme, then copied over my SCSS and changes to .libraries.yml, .theme, and other things. There wasn't anything tricky about it, just make sure to not forget anything. You could always just try updating the base theme on localdev and see if things break or not.

  • 🇩🇰Denmark ressa Copenhagen

    Thanks @erutan, those are great suggestions. Perhaps the module maintainers could consider adding a few tips like these on the project page, or README, to help users upgrade between versions?

    Also, the project page still needs to get updated since version 4 is now the official release, and no longer experimental.

  • Status changed to Needs work 10 months ago
  • 🇩🇰Denmark ressa Copenhagen

    I created a doc page, feel free to add more details, if you think it might make the process easier and clearer for people who are new to this: https://www.drupal.org/docs/contributed-themes/bootstrap5/upgrade-a-boot...

  • 🇮🇳India ravi kant Jaipur

    The difference between two versions can be comparing from https://www.drupal.org/node/3190308/revisions .

  • 🇩🇰Denmark ressa Copenhagen

    Thanks @ravi kant but my question about updating and seeing the differences is aimed at the theme, not the project page.

    Please see my comment directly before yours, and feel free to expand the doc page, if you feel it can be improved.

Production build 0.71.5 2024