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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #575 - Select boxes rendering #583

Merged
merged 3 commits into from Aug 25, 2021

Conversation

SilviaAmAm
Copy link
Contributor

Fixes #575

In the same way that the files attachment have a special treatment for rendering them in the report, now also the select boxes have a special treatment.
I also updated the submission report template to prevent the table with the form data to run outside the page.
Note: If the label/value from a field are an extremely long word, this will still render in an ugly way. It is due to this bug in weasyprint: Kozea/WeasyPrint#36

@codecov-commenter
Copy link

Codecov Report

Merging #583 (5ac9f34) into master (bd27cd6) will increase coverage by 0.05%.
The diff coverage is 56.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #583      +/-   ##
==========================================
+ Coverage   88.49%   88.55%   +0.05%     
==========================================
  Files         420      432      +12     
  Lines        7750     8000     +250     
  Branches      654      683      +29     
==========================================
+ Hits         6858     7084     +226     
- Misses        754      767      +13     
- Partials      138      149      +11     
Impacted Files Coverage Δ
src/openforms/submissions/models.py 92.30% <56.25%> (+0.23%) ⬆️
src/openforms/submissions/api/viewsets.py 90.90% <0.00%> (-7.24%) ⬇️
src/openforms/forms/api/serializers.py 93.37% <0.00%> (-4.07%) ⬇️
src/openforms/forms/utils.py 97.22% <0.00%> (-0.56%) ⬇️
src/openforms/api/urls.py 100.00% <0.00%> (ø)
src/openforms/conf/base.py 92.59% <0.00%> (ø)
src/openforms/forms/constants.py 100.00% <0.00%> (ø)
src/openforms/forms/models/form_step.py 100.00% <0.00%> (ø)
src/openforms/forms/tests/admin/test_form.py 100.00% <0.00%> (ø)
src/openforms/submissions/api/serializers.py 100.00% <0.00%> (ø)
... and 16 more

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 bd27cd6...5ac9f34. Read the comment docs.

@@ -253,6 +255,30 @@ def get_merged_data(self) -> dict:

return merged_data

def get_printable_data(self) -> Dict[str, str]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for now, but if we keep expanding on this, we might have to just register a display/print function which takes the info argument and have a mapping of type: print_function so that can be tested/maintained in a bit more isolated way.

@sergei-maertens sergei-maertens merged commit 3e7c134 into master Aug 25, 2021
@sergei-maertens sergei-maertens deleted the issue/575-select-boxes-rendering branch August 25, 2021 08:18
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.

Rendering of Select Boxes in PDF summary
3 participants