-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: increased width of text area (#4159) #4165
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
@y-p I think u put the max there originally |
yes I did. It's considered typographic best practice to limit I'm pleased with the way the docs look now, don't you agree? |
I think limiting is good....this just increases the limint a bit (they take up about 1/2 of the screen on my (big) monitor)...what is considered 'normal'? pretty much filling the screen or showing a certain num of characters? |
Here's how this build looks online (if you don't have time to build): http://jtratner.github.io/example-pandas-docs/doc-build/html/index.html |
I am +1 on this....its just a bit wider, but to me (my 2c) makes a big diff, many less horizontal scrollbars in the code exmples |
Thanks for the link, that helps. I was motivated by this talk: https://www.youtube.com/watch?v=8J6HuvosP0s Expressly, the text width should not be determined by the width of your screen. The current style follows this, the new style exceeds it and I find it (slightly) too wide. jeff, can you link to a code example that makes you scroll? maybe it's fixable, |
ok, I see the problem with the code examples. It looks like this patch roughly doubles the text width. I think most of the issue Some code examples produce unreasonably wide output (dataframes that doesn't summarize, etc), |
Also, a majority of the offending lines in the code snippets are handicapped by Converting that prompt into |
@y-p it would be nice if there were a way to reset the numbering on the input counter (but I didn't see a setting). |
http://ipython.org/ipython-doc/dev/development/ipython_directive.html ipython_promptin and ipython_promptout |
@y-p I completely understand that you limited the max width (in the previous version it was indeed way to wide for a wide screen), but my main point that it is now too small is the scrolling with the code snippets (as I explained in the original issue #4159) At the moment with this PR the width of the actual text area (so without the padding of 30px at each side) is increased from 540 px to 780 px, so an increase of 44.44 % to be exactly (so within your range of 25-50% :-) But if I can make it a little bit smaller while displaying the code snippets that's fine (eg with the ipython prompt starting at 1 each time) |
my mistake. 50% is way too much then. by all means, make the text display a little wider, but don't be guided by the width I suggest a a text width of 640-660px would be a good compromise, in combination with |
I did some testing with the width in firefox for a normal code snippet (so not in a bulleted list):
So the max of 840 px (as now in the PR) could be a little bit lower. Another option of course is to adapt all code snippets that they are shorter than the standard 78 characters, but that zou need a scrollbar to see the whole code snippet as is the case for some now, I find really awkward. What do you think? I can eg put the max-width at 800 px instead of 840 px? |
I'm fine with max-width of 720px. I'm puzzled why you seem to come |
For example in the basic functionality section http://pandas.pydata.org/pandas-docs/dev/basics.html, on my computer there are about 20 code snippets on that page that need a horizontal scrollbar, while most of them (not all) are no outliers but within the standard of 78 chars. For the values above, I just added a code snippet with a line of exactly 80 chars with and without prompts, and looked in firefox with the developers tools (there you can adapt the css and directly see the result) what the value of max-width had to be to display the line. Would it be an option to limit the width of the text paragraphs but let the code snippets be a little bit wider? |
I went ahead and modified the IPython prompt and used 720px for the max-width, Perhaps there's a DPI or font fallback issue at play here, so our systems display |
@y-p What do you mean with 'update the prompt'? Convert it to >>>? I asked MinRK from IPython about the ever increasing prompt numbers, and it seems that it is because an old version of ipython_directive in the pandas repo. I will add a commit to fix that. With that every page should start at prompt number 1, this will also make a little bit room. |
new version - http://jtratner.github.io/example-pandas-docs/html/index.html .for future reference, you can (I believe) push to a gh-pages branch on any project and get github pages for free. I was rushing through which is why URLs were weird. |
numbering looks good...how about we split difff on max-wdith....720? 750? it actually is a little wide here I think (too much whitespace) |
@jtratner can you put a revised version up with say 750 max-width? |
@jreback, my vote is for 720 and '>>>', go ahead and merge what works for you all. |
I agree @jorisvandenbossche can h make the change to 720 max width |
…ompt number at 1 each page
OK, 720 max is fine. I updated the commit. What about the ipython prompt? Do I also change that to >>>. My personal preference is to keep the ipython prompt (certainly now the numbering is less of a problem), but of course my preference is not that important. |
I think the numbers are good. (now that they r reset each file) |
DOC: increased width of text area (#4159)
See #4159
This adds a minimum and maximum width of the text area (instead of one fixed value of, at the moment 600px), and I also increased the maximum value (from 600 to 840).
I took the values of the standard sphinx docs which are 780-1080 (minus 240 for the sidebar, in the standard sphinx docs the width is defined for the whole body, here only for the main text area)