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

Some tables in documentation are cut off #2736

Closed
3 tasks done
binste opened this issue Dec 1, 2022 · 1 comment
Closed
3 tasks done

Some tables in documentation are cut off #2736

binste opened this issue Dec 1, 2022 · 1 comment
Labels

Comments

@binste
Copy link
Contributor

binste commented Dec 1, 2022

Some tables in the new documentation design are too wide to be displayed. For example https://binste.github.io/altair-docs/user_guide/encoding.html#color-fill-and-stroke

image

This happens because some types in the second column are too big and so they push the table beyond 100% width:

image

I'm not very familiar with the layout and how these tables are generated so I don't know how to fix this. Some ideas:

  • Is it possible to shorten the names of these types? The long ones are not very useful anyway in my opinion. I'm aware that the tables are autogenerated so it would probably require some adjustment in that Sphinx directive.
  • Make the table scrollable horizontally. This is still not very convenient as the scrollbar will be at the bottom and some of the tables are very long.
  • Shorten section titles in left navigation bar ("Interactive Charts: Parameters, Conditions, Bindings" -> "Interactive Charts", I prefer this anyway) and then make it narrower. This won't solve it completely but helps.
  • If the layout is responsive, we could make the tables wider on bigger screens. On a 13'' laptop screen the documentation has a good size but on a 27'' 2560x1440 monitor it does look rather narrow:

image


Please follow these steps to make it more efficient to solve your issue:

  • Since Altair is a Python wrapper around the Vega-Lite visualization grammar, most bugs should be reported directly to Vega-Lite. You can click the Action Button of your Altair chart and "Open in Vega Editor" to create a reproducible Vega-Lite example and see if you get the same error in the Vega Editor.
  • Search for duplicate issues.
  • Use the latest version of Altair.
@binste binste added the bug label Dec 1, 2022
@joelostblom
Copy link
Contributor

This caused an issue in the old documentation as well where it was difficult (but still possible) to read the rightmost column as it became very narrow:

image

I don't know if we can make the names shorter, but what do think of making the left column scrollable horizontally and limiting the max width?

I noticed that we can set max-width on the td element of the table to make it more narrow, but I wasn't able to add a scrollbar. There are some suggestions here that we could spend some more time on https://stackoverflow.com/questions/19794211/horizontal-scroll-on-overflow-of-table

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

2 participants