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

Loading plot in separate JupyterLab tab collapses layout #8655

Closed
philippjfr opened this issue Feb 13, 2019 · 4 comments · Fixed by #8685
Closed

Loading plot in separate JupyterLab tab collapses layout #8655

philippjfr opened this issue Feb 13, 2019 · 4 comments · Fixed by #8685

Comments

@philippjfr
Copy link
Contributor

As I originally outlined in #8084 since the layout PR you can get into situation where a layout collapses completely when reloading a notebook window. Since then I've further narrowed it down, and figured out that this only occurs in JupyterLab when the plot is in a different tab than the current one being displayed.

Here is a screencast demonstrating the issue, in it I have two notebooks open each with a bokeh layout. When I reload the notebook (by refreshing the page) the layout of widgets in the second notebook, which is not visible during the reload, collapses.

screencast_jlab

My guess is that this occurs because non-active JupyterLab tabs render but do not correctly report their size. I'm not really sure if this will be an easy thing to fix and it may have to happen in the JupyterLab extension telling bokeh to rerender the plots in the newly activated tabs.

@bryevdv
Copy link
Member

bryevdv commented Feb 13, 2019

cc @canavandl in case we need some Jlab extension help

@mattpap
Copy link
Contributor

mattpap commented Feb 13, 2019

I need to reproduce this.

@mattpap
Copy link
Contributor

mattpap commented Feb 15, 2019

The problem is similar to #8614. To make correct measurements, widget element must be displayed, as well as its each parent. This is not the case here. In case of tabs this can be easily fixed by using visibility property instead of display.

@mattpap mattpap added this to the 1.1 milestone Feb 17, 2019
@mattpap
Copy link
Contributor

mattpap commented Feb 22, 2019

Another issue is that notebook integration code loads CSS after JS, which makes stylesheets unavailable to layout when needed. This can be observed also in classical notebook.

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

Successfully merging a pull request may close this issue.

3 participants