Skip to content

Make plugin list in PDF docs readable #9241

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

Merged
merged 3 commits into from
Oct 28, 2021

Conversation

andrewdotn
Copy link
Contributor

The current PDF docs attempt to format the list of all plugins as a
table, without any word-wrapping of the plugin description. That results
in almost all the information getting cut off. This PR formats the same
information into more of a paragraph format for the PDF, with nothing
cut off.

  • Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.

Sorry, something went wrong.

The current PDF docs attempt to format the list of all plugins as a
table, without any word-wrapping of the plugin description. That results
in almost all the information getting cut off. This PR formats the same
information into more of a paragraph format for the PDF, with nothing
cut off.

Fixes pytest-dev#451
@andrewdotn
Copy link
Contributor Author

Sample output, starting on page 126:
pytest-better-plugin-list.pdf

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Thank you, this looks good to me.

It would have been nice if there were some "responsive" table format, i.e. one that could self-adjust to the page dimensions, but I guess there isn't?

@andrewdotn
Copy link
Contributor Author

With sphinx, there is a way to set automatic width with wrapping for a column, but when the table has more than 30 rows, sphinx flips over to using the LaTeX longtable package to get the a table that supports having page breaks inside it. And that package doesn’t support automatic-width columns.

With longtable, one can specify that a column has a specific width and gets wrapped, e.g., p{2in} for a 2-inch-wide column, but I don’t think that’s a good long-term option because it would take a lot of manual tuning to look ok, and anyone publishing a new pytest plugin or updated package description to PyPI could dramatically change the required widths.

Another alternative I considered, before going with this PR, is to flip the pages with the table to landscape mode, possibly with a larger page size for just those pages.

@andrewdotn andrewdotn force-pushed the pdf-docs-plugin-list branch from 93ee6bd to 3ff2d80 Compare October 28, 2021 00:21
@bluetech
Copy link
Member

OK, that sounds good!

@bluetech bluetech merged commit bcad6e8 into pytest-dev:main Oct 28, 2021
The-Compiler added a commit to The-Compiler/pytest that referenced this pull request Nov 8, 2021
This is an impovement for a doc update introduced in this release, so including it in a changelog against the last release seems confusing. The issue number also seems about something different.
The-Compiler added a commit that referenced this pull request Nov 10, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
* Remove changelog entry for #8251

Reverted in #8903

* Move #9202 changelog to to trivial

This won't concern users of pytest

* Streamline deprecation changelogs/docs

* Remove #8994 changelog

This is an impovement for a warning introduced in this release, so including it in a changelog against the last release seems confusing.

* Remove #9241 changelog

This is an impovement for a doc update introduced in this release, so including it in a changelog against the last release seems confusing. The issue number also seems about something different.

* Remove #8897 changelog

Empty file...

* Various minor changelog fixes
@wimglenn
Copy link
Member

wimglenn commented Dec 1, 2021

@andrewdotn I wonder if you have any ideas to make this table render better? This is what it looks like to me in Chrome browser / macOS - "last release" column way too narrow, and there's a lot of wrapping with hyphenation characters for some reason rendering as a box. Maybe the "status" and/or "requires" column(s) could be dropped, they don't have much useful info and it would allow the others to be wider.

Screen Shot 2021-12-01 at 12 29 36 AM

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