ipython-contrib / jupyter_contrib_nbextensions

A collection of various notebook extensions for Jupyter
http://jupyter-contrib-nbextensions.readthedocs.io/en/latest
Other
5.2k stars 805 forks source link

In Jupyterhub v3 the TOC2 vanishes behind the main navigation bar. #1608

Closed Paperone80 closed 1 year ago

Paperone80 commented 1 year ago
image

Error see screenshot:

Config: jupyter-contrib-nbextensions 0.6.0 jupyter-nbextensions-configurator 0.5.0 jupyter 1.0.0 jupyter_client 7.4.2 jupyter-console 6.4.2 jupyter-contrib-core 0.4.0 jupyter-contrib-nbextensions 0.6.0 jupyter-core 4.11.1 jupyter-highlight-selected-word 0.2.0 jupyter-http-over-ws 0.0.8 jupyter-latex-envs 1.4.6 jupyter-nbextensions-configurator 0.5.0 jupyter-server 1.21.0 jupyter-telemetry 0.1.0 jupyterhub 3.0.0 jupyterlab 3.4.8 jupyterlab-pygments 0.2.2 jupyterlab_server 2.16.0 jupyterlab-widgets 1.1.0

Paperone80 commented 1 year ago

Changing the width of the TOC2 bar adjusts it but now returns a JS errors:

Uncaught ReferenceError: _ is not defined at setMd (toc2.js?v=20221016194143:110:43)

var setMd = function(key, value) {
        if (liveNotebook) {
            var md = IPython.notebook.metadata.toc;
            if (md === undefined) {
                md = IPython.notebook.metadata.toc = {};
            }
            var old_val = md[key];
            md[key] = value;
            >>>> if (typeof _ !== undefined ? !_.isEqual(value, old_val) : old_val != value) { <<<<
                IPython.notebook.set_dirty();
            }
        }
        return value;
    };
at HTMLDivElement.saveTocPosition (toc2.js?v=20221016194143:284:9)
var saveTocPosition = function () {
        var toc_wrapper = $('#toc-wrapper');
        var new_values = toc_wrapper.hasClass('sidebar-wrapper') ? ['width'] : ['left', 'top', 'height', 'width'];
        $.extend(toc_position, toc_wrapper.css(new_values));
        setMd('toc_position', toc_position);
    };
at V.<computed>.<computed>._trigger (jquery-ui.min.js:6:1)
at V.<computed>.<computed>._propagate (jquery-ui.min.js:6:1)
at a.<computed> [as _propagate] (jquery-ui.min.js:6:1)
at V.<computed>.<computed>._mouseStop (jquery-ui.min.js:6:1)
at a.<computed> [as _mouseStop] (jquery-ui.min.js:6:1)
at V.<computed>.<computed>._mouseUp (jquery-ui.min.js:6:1)
at a.<computed> [as _mouseUp] (jquery-ui.min.js:6:1)
at s._mouseCapture._mouseDistanceMet._mouseDelayMet._mouseUpDelegate (jquery-ui.min.js:6:1)
ylzuimeng commented 1 year ago

I have the same problem

juhasch commented 1 year ago

Hi, can you try the change in PR #1618 ?

glennneuber commented 1 year ago

Hi @juhasch,

thanks for looking into this. I updated with the latest tarball master but I am still getting this error. Still hiding in the top and appears with errors when I double click to drag.

image image image image