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

Improve outer border behaviour with nonzero gutter #1087

Merged
merged 9 commits into from
Jan 26, 2024

Conversation

mjasperse
Copy link

Festive greetings and Happy New Year to the team!

This PR fixes #1071 for the combination of simultaneous outer border and gutter by making the outer border line continuous and inserting gutter spacing inside the border

Checklist:

  • The GitHub pipeline is OK (green),
    meaning that both pylint (static code analyzer) and black (code formatter) are happy with the changes of this PR.

  • A unit test is covering the code added / modified by this PR

  • This PR is ready to be merged

  • N/A In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder

  • A mention of the change is present in CHANGELOG.md

By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.

@mjasperse mjasperse requested a review from gmischler as a code owner January 3, 2024 01:23
@mjasperse mjasperse force-pushed the feature/1071_outer_border_gutter branch from e1f60f1 to 0173731 Compare January 3, 2024 01:27
Outer border top and bottom lines are now single continuous lines
instead of many line segments
@mjasperse
Copy link
Author

The additional fix about the table header is that after a pagebreak the gutter height was not added - see test_table_with_colspan.pdf, where the gutter is missing:
image

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9569ccb) 93.50% compared to head (6a26820) 93.50%.

❗ Current head 6a26820 differs from pull request most recent head f3828e4. Consider uploading reports for the commit f3828e4 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1087   +/-   ##
=======================================
  Coverage   93.50%   93.50%           
=======================================
  Files          29       29           
  Lines        8556     8566   +10     
  Branches     1577     1578    +1     
=======================================
+ Hits         8000     8010   +10     
  Misses        344      344           
  Partials      212      212           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

filename = HERE / f"{name}.pdf"
assert_pdf_equal(pdf, filename, tmp_path, generate=False)
assert_pdf_equal(pdf, filename, tmp_path, generate=generate)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see a reason to leave the generate parameter here but it's not a showstopper.

@andersonhc
Copy link
Collaborator

Thank you for your contribution @mjasperse
If @Lucas-C don't have any objection I'll merge it shortly

@andersonhc andersonhc merged commit 2bdc5a9 into py-pdf:master Jan 26, 2024
0 of 10 checks passed
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.

Expected behaviour re outer table border with nonzero gutter?
3 participants