There is always a great deal of Joomla! development activity underway and communicating with other developers in the community is essential. This site is a resource for anyone looking to build or maintain software based on the Joomla! platform.

Joomla 4 and Bootstrap 5

For the last 2 years, the Production Leadership Team has been closely monitoring the progress of the Bootstrap project in regards to its next major release, Bootstrap 5. We do have a big interest in shipping Joomla with the latest and greatest versions of the libraries and frameworks we use. Because of the problems which arose after the release of Joomla 3 and Bootstrap 2, we were very torn on how to proceed on this front.
Switching the major version of a framework like this is not an easy decision and we want share the arguments which we have had to consider:

  • Bootstrap 5 currently is in beta stage. Should we take the risk of relying on a non-stable release? Should we, in the worst case, ship with an unstable version of this framework?
  • Joomla 4 itself is in beta stage and we promised not to introduce any breaking changes from here on.
  • What is the benefit of using the newer version? (See Bootstrap 5 Introduction, 5 New Features in Bootstrap 5, Bootstrap 5 vs Bootstrap 4 – What’s New & What Changed?, Difference between Bootstrap 4 and Bootstrap 5) How do our users and (third party) developers benefit from this?
  • Bootstrap 4 has jQuery whereas Bootstrap 5 is independent of jQuery
  • Bootstrap 4 needs us to deal with the right to left languages where as Bootstrap 5 deals with the RtL and LtR changes
  • How long will a conversion take? In the past, especially design changes took far longer than expected and delayed the project by years. Do we take the risk that 90% can be done quickly, but the last 10% takes us many months of work?
  • Could we possibly introduce this change in a later, minor release?
  • Can we put the additional load on third party extension developers to rewrite their extensions to use this new Bootstrap 5? Many have already invested quite some time into migrating from Bootstrap 2 to Bootstrap 4. How much more work would that be?
  • How much delay (if any) are we willing to accept?

Especially in the last 2 meetings of the PLT, we have had intense discussions about this and initially we leaned towards not switching the version. However the work of Dimitris Grammatiko informed our opinion. It turned out that changing the version could be done faster and easier than expected. Inspired by that PR, George Wilson tested this out for the CSS as well and with him making fast progress, we are now leaning towards doing this switch here and now.

Above we listed several questions, so let us also list the arguments for each question as well:

  • Past versions have shown that Bootstrap has been stable even when in the beta stage. The Bootstrap project has no plans to introduce any new major changes in this 5.0 release and thus could live with shipping with a tested beta release.
  • We promised to not introduce breaking changes when Joomla 4.0 is in the beta phase. This is still a large issue for us, but right now we think the benefits outweigh the drawbacks.
  • Our biggest benefit would be the amount of time our major version of Bootstrap would be supported. J4 will launch with the current and not an old version of Bootstrap giving developers and designers better support for the life of J4.
  • The conversion at time of writing this has been almost finished and thus we expect this to be done in a very short timeframe. It looks like the conversion is at the 95% mark already, it is reasonable to expect that that last 5% would not delay us in a noticeable way.
  • Changing the major version of Bootstrap in a minor release of Joomla is not possible.
  • With the experience Dimitris and George gained so far while migrating to the new version, the task is not as difficult as was feared thus we hope that the third party developers share our judgement that this change is worth investing a little more time into their respective extensions.
    We don’t really want to accept any further delays.

Joomla 4 already has many great features to ship with.
Developers will have the benefit of a next generation CSS framework decoupled from jQuery and packed with the features they need to make their extensions perform at their best. It will make integration with other frameworks easier.
Joomla 4 will also benefit from Right to Left support, all reasons to embrace this change.
The upgrading to Bootstrap 5 will finish off the work of building a new major Joomla version with an up to date CSS framework and ensure the longevity of the J4 release well into the future.

Additionally for clarification. J4 will ship with an official version of jQuery to help unify developers who still use jQuery and allow easy addition of jQuery to extensions that are not using native, if required.

We wish all well, stay safe and healthy.

Production Department