plone / bobtemplates.plone

Python Code Templates for Plone Projects with mr.bob
https://pypi.org/project/bobtemplates.plone/
GNU General Public License v2.0
24 stars 31 forks source link

Fix SCSS imports for Bootstrap 5.3 #550

Closed petschki closed 1 year ago

petschki commented 1 year ago

see https://github.com/plone/plonetheme.barceloneta/issues/335 and https://github.com/plone/buildout.coredev/pull/864#issuecomment-1584394489

mauritsvanrees commented 1 year ago

So I created a new theme with this, and it works.

But we should document how to fix existing themes. You have some changes in this PR that are not strictly needed for that, I think. I tried a few things. Can you check if the following instructions are sane?

For an existing theme where you want to keep using Bootstrap 5.2, you should simply add a pin to package.json. Add "bootstrap": "~5.2.3" to either devDependencies or dependencies. Both seem to work for me. Is there a preference?

If you want to update an existing theme to use Bootstrap 5.3:

Where to document this? Maybe in several places:

mauritsvanrees commented 1 year ago

One final thought: if we merge this PR, then bobtemplates.plone can only create themes that use Bootstrap 5.3. No problem, especially if we go with Bootstrap 5.3 in Plone 6.0.x already. But I would say this deserves a feature release.

We could do a bugfix release first where we add "bootstrap": "~5.2.3" to devDependencies, so there is a version of bobtemplates that can still generate a Bootstrap 5.2 theme that works out of the box. Then in the upgrade note we can point to this version. Does that make sense?

petschki commented 1 year ago

We could do a bugfix release first where we add "bootstrap": "~5.2.3" to devDependencies, so there is a version of bobtemplates that can still generate a Bootstrap 5.2 theme that works out of the box. Then in the upgrade note we can point to this version. Does that make sense?

This definitely makes sense and is the right way to go. I'll prepare a PR for 6.2.7 release and after that we can create a bugfix branch.

/cc @MrTango

petschki commented 1 year ago

just found out that @plone/plonetheme-barceloneta-base=3.0.2 will pull Bootstrap 5.3 because of a wrong version pin (https://github.com/plone/plonetheme.barceloneta/pull/336/commits/6d939d6521188c8850eb26ef7a0763d003093552#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R47). For completeness sake I'll fix that in 3.0.3 and will pin that here in 6.2.x ... then we're safe.

petschki commented 1 year ago

waiting for #552 and patch branch before mergin this!