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

[proposal] increase width of main content section #1

Open
drbenvincent opened this issue Jul 25, 2024 · 4 comments
Open

[proposal] increase width of main content section #1

drbenvincent opened this issue Jul 25, 2024 · 4 comments

Comments

@drbenvincent
Copy link

I find the width of the main central content part too narrow. For example, when we have code, it very often runs off the edge of the page, requiring scrolling in code blocks.

For laptop and desktop viewing, this narrowness is not required as the total width of all content easily fits on the screen.

For mobile or tablet, then the adaptive dropping of the left/right columns does the job, or will require scrolling in code blocks regardless.

I think the only/main argument against this is that having extremely wide content can reduce readability. But I'm only suggesting that we make wide enough so that we don't need to horizontally scroll very much when viewing code.

@drbenvincent
Copy link
Author

An example from pymc-marketing

Screenshot 2024-07-25 at 16 59 41

@OriolAbril
Copy link
Collaborator

This page shows how it can be done: https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/layout.html#horizontal-spacing.

However, it should be noted that this setting is explicitly set by the pydata-sphinx-theme because otherwise it difficults readability, especially for people without perfect sight. If notebooks are automatically formatted so code has at least X characters per line, we could modify so the page fits exactly that number of characters which might be a good compromise, if that were too wide then we could reduce the max number of characters per line in the formatter and increase the width a bit. If notebooks aren't automatically formatted then it is bound to not help anyone, readability will be decreased yet scrolling will continue to be necessary.

@drbenvincent
Copy link
Author

My preference would be to do the (small) increase in width needed to fit ruff/black formatted code. I don't know the number of characters off the top of my head.

My main concern is that the width is not wide enough to accommodate the standard line length.

We shouldn't try to accommodate widths of poorly formatted notebooks.

@maresb
Copy link

maresb commented Jul 25, 2024

Ah, great point! Default is 88 characters wide. A quick approximate count was about 83 currently showing, so I think it just needs a minor increase.

(Some people like enabling really wide lines in the code formatter, but I personally appreciate narrow lines due to cases like this.)

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

No branches or pull requests

3 participants