notebook
notebook copied to clipboard
v7 horizontal scroll bar absent in Firefox
Firefox - no way to scroll to the last columns
Edge
Thanks for opening this issue @liquidcarbon! This has been noted in https://github.com/jupyterlab/jupyterlab/issues/14625 and will likely be resolved in Notebook 7 once Jupyterlab is updated.
As mentioned in ticket #14625 of jupyterlab for googlers arriving here:
Workaround to show the scrollbars from within a Notebook cell:
from IPython.display import display, HTML
display(HTML("<style>.jp-OutputArea-output {display:flex}</style>"))
I can confirm @liquidcarbon 's observations:
- edge shows horizontal bars
- chrome shows them as well
- firefox doesn't
@svaningelgem
When you see this issue with Notebook v7.0.5+:
- Can you reproduce in a clean environment with a fresh pip install?
- What version of Firefox you use?
- Can you shift + right-click over the data frame output and select "inspect" and create a screenshot like below (with
jp-OutputArea-outputselected and CSS rules visible):
I just installed a new environment with this command:
mamba create -n v7bar python=3.11 notebook ipywidgets pandas
This installed v7.0.6 of notebook.
I then started the notebook:
conda activate v7bar
jupyter notebook
I then proceeded with this cell:
import numpy as np
import pandas as pd
df = pd.DataFrame(np.arange(100))
with pd.option_context('display.max_columns',100):
display(df.T)
And ... I do have a scrollbar.
Ok, so I'm now off investigating what is different between the 2 environments.
FYI my screenshot resembles yours:
And this is in the other notebook where I don't have the scrollbar:
Can you add a screenshot showing Help → About window in the faulty environment? My suspicion would be two different versions of notebook installed (one via conda, one via pip) or in a very unlikely event a problem with conda-forge assets.
It gets weirder. Everything worked fine with the new kernel (v7bar). So I went back to the old one (howest), and tried it on an empty notebook. Worked fine. I restarted the kernel (from within E:\tmp), opened the demo notebook: fine I copied the notebook into that directory and opened it: fine
But... I figured out now how to reproduce it. I've no clue how, why or what, but I can reproduce it.
mamba create -n v7bar python=3.11 notebook ipywidgets pandas- open a cmd
- cd e:\tmp
- jupyter notebook (port for me: 8889)
- open a notebook (or create a new one if it isn't there yet)
- copy/paste the pandas code from above to simulate a large dataframe
- run it
- ===> No scrollbars
- save the document (I use CTRL-S)
- open another cmd
- cd e:\tmp
- jupyter notebook (port for me: 8890)
- open the previously created notebook
- ====> scrollbars!
No clue... This is by most the weird behavior I've ever noticed 😁. And I'm already working for 20 years in software development 🤣.
Can you add a screenshot showing Help → About window in the faulty environment? My suspicion would be two different versions of notebook installed (one via conda, one via pip) or in a very unlikely event a problem with conda-forge assets.
So basically, the environment is fine, and the notebook shows the scrollbar. Just as long as it's not the first kernel started...
I now tried it another way:
mamba create -n v7bar python=3.11
mamba activate v7bar
pip install jupyter notebook pandas
Same behavior: 1st kernel I start has no scrollbars, 2nd kernel has.
So I doubt it has something to do with conda vs pip assets. For completeness sake:
(v7bar) e:\tmp>pip list | grep notebook
notebook 7.0.6
notebook_shim 0.2.3
(v7bar) e:\tmp>pip list | grep jupyter
jupyter 1.0.0
jupyter_client 8.4.0
jupyter-console 6.6.3
jupyter_core 5.4.0
jupyter-events 0.8.0
jupyter-lsp 2.2.0
jupyter_server 2.8.0
jupyter_server_terminals 0.4.4
jupyterlab 4.0.7
jupyterlab-pygments 0.2.2
jupyterlab_server 2.25.0
jupyterlab-widgets 3.0.9
About window:
When I CTRL-C the first kernel, and re-open the notebook in the 2nd one, the scrollbars stay there just fine.
Small additional remark: I have thus 2 environments: howest & v7bar. When I start the first kernel in the first environment, I don't have a scrollbar. When I start the second kernel in the 2nd environment, I do have one. So related to the port of the server or such??
Hmmm, changing the default port to 7777 via:
c.NotebookApp.port = 7777
Makes the scroll bars appear in the first kernel. Setting the port to 8890: check. Works fine. Setting the port to 8889: gone...
W..T..F.. (I think my current unbelief warrants this outburst 😁)
port 8888 seems to be already in use on my system by another application - that's why my kernel never starts up under 8888, but always 8889 first.
Could it be that there is an old server with old version of notebook running in the background and you need to restart you computer to get rid of it?
That suggestion makes sense. So I just restarted my computer. As I have IntelliJ and WSL2 installed, where both could -independently- start up another version of the jupyter server.
After the restart:
(.venv) ~$ ps afx | grep notebo
441 pts/0 S+ 0:00 | \_ grep --color=auto notebo
(.venv) ~$ ps afx | grep jupyt
449 pts/0 S+ 0:00 | \_ grep --color=auto jupyt
> tasklist | grep -i jupyt
> tasklist | grep -i notebook
> net stop iphlpsvc
Conclusion: nothing running, and iphlpsvc was running on port 8888.
Then:
- I started a jupyter notebook. It opened a browser tab to 8888. >> scrollbars
- I started another kernel. A browser tab opened to port 8889 >> no scrollbars
- I opened up another kernel. A browser tab opened to port 8890 >> scrollbars
So weird!
What do you mean be starting another kernel? Can you provide a full screencast? Given the information about WSL, it could be that you have the old version installed elsewhere.
Hi Michal, I made a screencast & sent it to your email address (I don't want my desktop to be shown here and I wouldn't really know a faster way to give you a screencast). In it, I made a new conda environment, and started the kernel.
I noticed 1 strange thing; on the browser tab where the scrollbars show, I have information about "flexbox" in the devtools.
Nuclear option... I'm going to delete my history, cache, cookies and everything.
It works now... Something somewhere got stuck in FF's cache I guess that a "normal" erase didn't get to.
For other people arriving at this ticket:
CTRL-SHIFT-DELETE + check all the boxes & timerange "everything"
A "normal" delete of cache only didn't got it for me the first time around.
Thanks a lot @krassowski for your assistance, I'm happy it's resolved now and that it hadn't to do anything with jupyter, but more with my own local setup. I'll bear the shame of that till the end of my days 😥.
@svaningelgem just checking if you are still seeing this issue with the latest versions?
Trying with the latest 7.1.0b0 (still pre-release for now), it seems to be fine with Firefox 122?
Closing as fixed in 7.1.
Please feel free to open a new issue if needed, thanks!