django-bootstrap5 icon indicating copy to clipboard operation
django-bootstrap5 copied to clipboard

Added `.form-label` default to `<label>`s.

Open emmceemoore opened this issue 4 years ago • 6 comments

It looks like bootstrap 5 expects .form-label now on <label> elements.

image

TESTING:

  • Modified affected tests to reflect the newly added .form-label default.

emmceemoore avatar Sep 26 '21 05:09 emmceemoore

Thanks, looks like we'll have to do quite a few fixes with all the breaking changes to forms.

dyve avatar Sep 26 '21 05:09 dyve

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.

dyve avatar Sep 26 '21 05:09 dyve

For horizontal forms, we need col-form-label https://getbootstrap.com/docs/5.1/forms/layout/#horizontal-form

dyve avatar Sep 26 '21 07:09 dyve

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.

dyve avatar Nov 01 '21 06:11 dyve

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.

zyv avatar Feb 19 '22 15:02 zyv

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 Coverage Status
Change from base Build 1950908615: -0.1%
Covered Lines: 585
Relevant Lines: 598

💛 - Coveralls

coveralls avatar Mar 08 '22 10:03 coveralls

Merging main in broke this.

dyve avatar Oct 15 '22 06:10 dyve

Sorry for breaking this @emmceemoore. I'll pull this one in and fix it with a separate PR.

dyve avatar Oct 15 '22 06:10 dyve