ipython-contrib / jupyter_contrib_nbextensions

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

zenmode: hiding header #1309

Open lsloan opened 6 years ago

lsloan commented 6 years ago

When the "Hide the header in zenmode" option is enabled (which it is by default) but the notebook's header is already hidden before zenmode is entered, then the headers will be shown when zenmode exits. Additionally, the "View > Toggle Header" menu item must then be selected twice to hide the header again.

I think zenmode needs to check the visibility of the header when it is entered and save that state for later use. If the header is already hidden, zenmode shouldn't try to hide it. Likewise, later when zenmode exits, if the header was initially hidden, zenmode shouldn't try to show it.

I haven't tested it, but I wouldn't be surprised if this also applied to the menubar hiding option, too.

jcb91 commented 6 years ago

True, zenmode was written before the header could be hidden by any other means, but now it needs to check!