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

Code blocks do not render 88 chars without horizontal scrollbar #12945

Open
cbrnr opened this issue Nov 5, 2024 · 7 comments
Open

Code blocks do not render 88 chars without horizontal scrollbar #12945

cbrnr opened this issue Nov 5, 2024 · 7 comments
Labels

Comments

@cbrnr
Copy link
Contributor

cbrnr commented Nov 5, 2024

We're using a line length of 88 characters in our code base, and that's also the standard in the Python community nowadays (e.g., enforced by Ruff and Black). Therefore, I think it would be great if code blocks on our documentation website could be rendered without horizontal scrollbars. For example, see the very last code block at the bottom of https://mne.tools/stable/auto_tutorials/epochs/40_autogenerate_metadata.html.

@cbrnr cbrnr added the DOC label Nov 5, 2024
@cbrnr cbrnr mentioned this issue Nov 5, 2024
5 tasks
@hoechenberger
Copy link
Member

I don't understand the intention here, how would I scroll if you remove the scrollbar? I have to scroll on my screen to uncover all of the code

@hoechenberger
Copy link
Member

Or are you suggesting enforcing shorter lines for code blocks?

@drammock
Copy link
Member

drammock commented Nov 5, 2024

I thought the intent was "make the content area wider and/or shrink the font so that 88 chars is visible without scrolling". @cbrnr can you confirm/clarify?

@cbrnr
Copy link
Contributor Author

cbrnr commented Nov 5, 2024

Yes, exactly what you're saying @drammock!

@hoechenberger
Copy link
Member

hoechenberger commented Nov 5, 2024

yeah but ... on my screen, you cannot make it any wider without hiding the navigation

slightly reducing the font size should be fine, but I'm not sure if this will free up enough space

@cbrnr
Copy link
Contributor Author

cbrnr commented Nov 7, 2024

I mean, since we are using 88 characters in our codebase, I think our website should also support displaying 88 characters without scrolling. I'm not a fan of shrinking the font size since this will make the code harder to read, and I would prefer making our main area wider. Forcing a shorter line length for our documentation is also not a good option since we want to stay consistent with our source code.

@cbrnr
Copy link
Contributor Author

cbrnr commented Nov 7, 2024

Maybe we can make one or both navigation panes a bit narrower so that the main area works with 88 chars in code blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants