Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bs3 styles from crispy_forms_field #1003

Merged
merged 1 commit into from Oct 23, 2021

Conversation

smithdc1
Copy link
Member

@smithdc1 smithdc1 commented Mar 8, 2020

Here is another step towards decoupling crispy-forms-core from template packs.

This removes the bs3 styles which are currently being added in crispy_forms_field.py.

Interestingly, and at least from what I can see in the docs, form-control-danger is not the right way of adding errors in bs3. 'has-error' is the solution and that's already built into the templates. This made it much easier to put the remaining logic into the templates. I suspect the bs4 templates will not be quite so easy.

Here are before/after images (no change hopefully) 馃

Before:
before

After:
after

@codecov-io
Copy link

codecov-io commented Mar 8, 2020

Codecov Report

Merging #1003 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1003      +/-   ##
==========================================
- Coverage   97.06%   97.06%   -0.01%     
==========================================
  Files          24       24              
  Lines        2728     2724       -4     
  Branches      241      239       -2     
==========================================
- Hits         2648     2644       -4     
  Misses         39       39              
  Partials       41       41
Impacted Files Coverage 螖
crispy_forms/templatetags/crispy_forms_field.py 92.23% <酶> (-0.3%) 猬囷笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 2523c66...78cbc0a. Read the comment docs.

@smithdc1
Copy link
Member Author

@carltongibson Appreciate your thoughts on this. It's another step towards being able to split out the template packs.

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2021

Codecov Report

Merging #1003 (364471a) into main (93a873b) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1003      +/-   ##
==========================================
- Coverage   97.27%   97.26%   -0.01%     
==========================================
  Files          23       23              
  Lines        2931     2927       -4     
  Branches      243      241       -2     
==========================================
- Hits         2851     2847       -4     
  Misses         39       39              
  Partials       41       41              
Flag Coverage 螖
unittests 97.26% <酶> (-0.01%) 猬囷笍

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage 螖
crispy_forms/templatetags/crispy_forms_field.py 94.17% <酶> (-0.22%) 猬囷笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 93a873b...364471a. Read the comment docs.

@smithdc1 smithdc1 merged commit 0247e92 into django-crispy-forms:main Oct 23, 2021
@smithdc1 smithdc1 deleted the bs3-style-to-templates branch October 23, 2021 15:09
pacahon added a commit to cscenter/lms that referenced this pull request Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants