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

Scrolling in windows #750

Closed
jonathanrobie opened this issue Dec 22, 2017 · 2 comments
Closed

Scrolling in windows #750

jonathanrobie opened this issue Dec 22, 2017 · 2 comments
Labels
tag:Upstream Related to an upstream project (e.g., mistune, nbconvert) or notebook example

Comments

@jonathanrobie
Copy link

jonathanrobie commented Dec 22, 2017

I am checking in notebooks that show output scrolling in windows. On GitHub and in nbviewer, the scrollable windows are lost.

For example, this has scrollable windows in Jupyter, but not in nbviewer.

https://github.com/biblicalhumanities/greek-new-testament/blob/master/labnotes/dative-direct-objects.ipynb

http://nbviewer.jupyter.org/github/biblicalhumanities/greek-new-testament/blob/master/labnotes/dative-direct-objects.ipynb

I can fix this by converting to HTML and modifying the CSS for div.output_area, but I would love it if this would Just Work. Any suggestions?

@parente
Copy link
Member

parente commented Jul 8, 2018

I suspect the HTML emitted by nbconvert doesn't provide an indication of the scrolled attribute value in the notebook file format and so there's not a way to style those outputs accordingly on nbviewer. (There's only one mention of the attribute in the nbconvert code base and it's in the code to strip metadata.)

I can see benefits to matching the nbviewer rendering as closely as possible to what an author sees in the notebook editing environment. I can also see people used to the current behavior being surprised if it changes suddenly. At any rate, I think the change would need to be proposed and discussed in the nbconvert repo to affect nbviewer. GitHub's implementation is private and may or may not be impacted by changes in nbviewer.

The only workaround I can think of in the meantime is to include a cell in your notebook like:

%%html
<style>
.nbviewer div.output_area {
  overflow-y: auto;
  max-height: 500px; /* or value of your choosing */
}
</style>

to make all outputs past a certain length scrollable.

@parente parente added the tag:Upstream Related to an upstream project (e.g., mistune, nbconvert) or notebook example label Jul 8, 2018
@krinsman
Copy link
Collaborator

krinsman commented Feb 4, 2020

@jonathanrobie Were you able to open an issue with NBConvert
https://github.com/jupyter/nbconvert
to address this issue?

I am tentatively closing this issue as resolved (at least on the side of NBViewer). Please let me know whether it should be reopened.

@krinsman krinsman closed this as completed Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag:Upstream Related to an upstream project (e.g., mistune, nbconvert) or notebook example
Projects
None yet
Development

No branches or pull requests

3 participants