django-bootstrap5
django-bootstrap5 copied to clipboard
Added `.form-label` default to `<label>`s.
It looks like bootstrap 5 expects .form-label now on <label> elements.

TESTING:
- Modified affected tests to reflect the newly added
.form-labeldefault.
Thanks, looks like we'll have to do quite a few fixes with all the breaking changes to forms.
The label_class in render_label was intended for horizontal forms (which it seems is now obsolete).
I'll check the new changes and see what we need to do. Thanks for the PR, and I'll reply here later.
For horizontal forms, we need col-form-label
https://getbootstrap.com/docs/5.1/forms/layout/#horizontal-form
Looks like this solution might be the only thing necessary after all, because most calls to render_label provide an explicit label_class. Still some checks to do, thanks for your patience.
Any news on that? After upgrading several of my Django apps from BS4 to BS5, I became very much convinced, that I don't want to render forms myself anymore and should switch to django-bootstrapX. It would be really good, however, if all breaking changes are taken care of.
Pull Request Test Coverage Report for Build 1950914503
- 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.1%) to 97.0%
| Totals | |
|---|---|
| Change from base Build 1950908615: | -0.1% |
| Covered Lines: | 585 |
| Relevant Lines: | 598 |
💛 - Coveralls
Merging main in broke this.
Sorry for breaking this @emmceemoore. I'll pull this one in and fix it with a separate PR.