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

bad positioning in toc2 extension #1629

Open
paulovn opened this issue Mar 12, 2023 · 2 comments
Open

bad positioning in toc2 extension #1629

paulovn opened this issue Mar 12, 2023 · 2 comments

Comments

@paulovn
Copy link

paulovn commented Mar 12, 2023

Hi. I'm trying to use the toc2 extension, but the toc pane is positioned above where it should (to the window top), and hence the upper section of the sidebar gets behind the notebook menu bars:

Screenshot from 2023-03-12 10-54-28

My configuration is:

jupyter_client                    8.0.3
jupyter-console                   6.6.3
jupyter-contrib-core              0.4.2
jupyter-contrib-nbextensions      0.7.0
jupyter_core                      5.2.0
jupyter-events                    0.6.3
jupyter-highlight-selected-word   0.2.0
jupyter-nbextensions-configurator 0.6.1
jupyter_server                    2.4.0
jupyter_server_terminals          0.4.4
jupyterlab-pygments               0.2.2
jupyterlab-widgets                3.0.5
nbclassic                         0.4.8
notebook                          6.5.3
notebook_shim                     0.2.2

On an Ubuntu 22.04.2 system. As per #1628 I installed with nbclassic<0.5, but the issue is the same if I use nbclassic 0.5.3

The issue seems to be related to some CSS. The computed positioning of the toc-wrapper DIV is:

Screenshot from 2023-03-12 10-56-21

and somehow this is pushing the DIV above its natural position. If I manually add a top: 106px property to that DIV, then it appears to be positioned fine:

Screenshot from 2023-03-12 10-58-08

... but this seems like a hack. Also, there are other issues: the configuration toggle to display as a floating window is not working (though I can manually drag the sidebar as a floating window), and the "Navigate" pull-down menu opens as a truncated window:

Screenshot from 2023-03-12 11-31-50

Is there any configuration/installation combination that I could use to fix this behaviour?

@RNarayan73
Copy link

@paulovn I have the same issue and as a workaround, I noticed that if you select any branch of the ToC tree and pull it down, then it gets displayed properly.
Until it is fixed...

@paulovn
Copy link
Author

paulovn commented Mar 27, 2023

@paulovn I have the same issue and as a workaround, I noticed that if you select any branch of the ToC tree and pull it down, then it gets displayed properly. Until it is fixed...

I ended up using the mentioned nasty hack: adding a CSS property

top: 106px; /* hack to fix behaviour */

to the #toc-wrapper element. Seems to work, but it's fragile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants