-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adds wrapping to tables in docs for improved readability. #1729
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
Conversation
I've also added a dependency on sphinx_rtd_theme in the environment.yml file as the docs wouldn't build without it.
@fujiisoup I can lower the threshold at which it changes from reflow → horizontal or remove it entirely.
Should I with option 2? (The 500px number is somewhat arbitrary, I just guessed it based on a few trials. Of course, any appropriate number between 440 and 500 will do.) |
Thanks for putting this together! I just gave looked at a preview in Chrome. Here's the progression I see, as I shrink the width of the browser window:
My thought: we should definitely have a minimum width for the right column (maybe a few hundred px?). But it would be nice if we had consistent behavior for the API docs table, regardless of whether or not the table of contents fits. |
@shoyer Currently that wrap → horizontal threshold is set to 767px in the CSS, which is why your third picture and fujisoup's second picture show the horizontal table.
Coincidentally (or maybe by design, idk), this 767px threshold is close to the TOC disappearing threshold. I propose lowering the threshold to 500px, or thereabouts. I haven't committed those changes yet; I'm waiting for the green light. |
@theindigamer OK, that makes more sense. I wonder, is there a way to set that cutoff threshold after subtracting the size of the TOC if shown? Or is that too complicated for CSS? |
Do you mean something like
or something else? I think arithmetic should be doable easily using the I've been looking at the CSS and the value of the sidebar's width is set using
I suppose this just moves the sidebar outside the display area (it has fixed width). My guess is that we can't refer to this 768px value directly because it isn't saved in any attribute, so we will need to copy the whole |
We switched to a different theme in #4835 so this PR might not be necessary anymore. Should we close it? cc @andersy005 |
Yes, I think this PR can be closed |
let's close this, then. Thanks for the effort, @typesanitizer. |
I've also added a dependency on
sphinx_rtd_theme
in theenvironment.yml
file asthe docs wouldn't build without it.
git diff upstream/master **/*py | flake8 --diff
whats-new.rst
for all changes andapi.rst
for new API(I've ticked the last checkbox but I'm not sure if I'm supposed to document anything additional here...)