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

Ensure that example codes are shown without the horizontal slider. #970

Closed
Pijukatel opened this issue Feb 11, 2025 · 1 comment · Fixed by #973
Closed

Ensure that example codes are shown without the horizontal slider. #970

Pijukatel opened this issue Feb 11, 2025 · 1 comment · Fixed by #973
Assignees
Labels
documentation Improvements or additions to documentation. t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@Pijukatel
Copy link
Contributor

Pijukatel commented Feb 11, 2025

Example code used in docs is rendered in a page with certain width. If the code rendered in the page is having too large line length, then horizontal slider is added, which is not terrible, but also not so nice and it reduces the clarity of the code example, when not all of it is visible at once.
(Visualization element in the webpage has the line-wrap option, but that does make examples less readable as it wraps in non-Pythonic way)

Ensure this does not happen. Possible solutions:

  • Custom ruff line length settings for example code and running separate ruff check.
  • Adjust the webpage to match our normal line length (change width or font size of code examples)
  • ...

Some example pages with code examples with slider:

@Pijukatel Pijukatel added documentation Improvements or additions to documentation. t-tooling Issues with this label are in the ownership of the tooling team. labels Feb 11, 2025
@vdusek
Copy link
Collaborator

vdusek commented Feb 11, 2025

Maybe we can have separate .ruff.toml file with:

[tool.ruff]
line-length = 100  # or less

in the docs/ directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants