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

[BUG] fullscreen delayed trigger #14214

Open
rocheseb opened this issue Jan 3, 2025 · 3 comments
Open

[BUG] fullscreen delayed trigger #14214

rocheseb opened this issue Jan 3, 2025 · 3 comments
Labels
grant: CZI R6 Funded by CZI Round 6 grant type: bug
Milestone

Comments

@rocheseb
Copy link

rocheseb commented Jan 3, 2025

Software versions

Python version : 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0]
IPython version : 8.27.0
Tornado version : 6.4.1
NumPy version : 1.26.4
Bokeh version : 3.5.2
BokehJS static path :
node.js version : (not installed)
npm version : (not installed)
jupyter_bokeh version : (not installed)
Operating system : Linux-4.18.0-513.18.1.el8_9.x86_64-x86_64-with-glibc2.28

Browser name and version

Firefox 133.0.3 (64-bit)

Jupyter notebook / Jupyter Lab version

4.2.5

Expected behavior

I noticed a bug when using the fullscreen tool with figures inside a gridplot with more than 1 rows.

The expectation is that the plot is redrawn to fullscreen right away.

Observed behavior

When going to full screen the subplot will initially be with its initial size in the top left corner, and it gets redrawn in full screen only after interacting with the plot for a little bit (at least two box zooms).

Example code

from bokeh.plotting import figure
from bokeh.layouts import gridplot
from bokeh.io import save, output_file

output_file("test_fullscreen.html")

plot1 = figure(width=400, height=400, title="Plot 1", toolbar_location="above", tools="pan,box_zoom,reset,fullscreen")
plot1.scatter([1, 2, 3], [4, 5, 6], size=10, color="navy", alpha=0.5)

plot2 = figure(width=400, height=400, title="Plot 2", toolbar_location="above", tools="pan,box_zoom,reset,fullscreen")
plot2.scatter([1, 2, 3], [6, 5, 4], size=10, color="green", alpha=0.5)

plot3 = figure(width=400, height=400, title="Plot 3", toolbar_location="above", tools="pan,box_zoom,reset,fullscreen")
plot3.scatter([1, 2, 3], [6, 5, 4], size=10, color="red", alpha=0.5)

plot4 = figure(width=400, height=400, title="Plot 4", toolbar_location="above", tools="pan,box_zoom,reset,fullscreen")
plot4.scatter([1, 2, 3], [6, 5, 4], size=10, color="orange", alpha=0.5)

# Create a gridplot with multiple rows
grid = gridplot([[plot1, plot2], [plot3, plot4]])

for plot in grid.children:
    plot[0].toolbar_location = "above"

# Show the layout
save(grid)

Stack traceback or browser console output

No response

Screenshots

bokeh_fullscreen_bug.mp4
@rocheseb rocheseb added the TRIAGE label Jan 3, 2025
@bryevdv
Copy link
Member

bryevdv commented Jan 3, 2025

@rocheseb please confirm whether this issue exists using the latest release 3.6.2

@rocheseb
Copy link
Author

rocheseb commented Jan 3, 2025

@bryevdv just reproduced the same behaviour with 3.6.2

@mattpap
Copy link
Contributor

mattpap commented Jan 3, 2025

It requires manual layout invalidation, because the plot is managed by the grid plot, yet in fullscreen mode it's expected to work standalone. I'm quite surprised it works at all, because there is no mechanism for detaching a plot from a layout when switching modes. I'm tempted to mark this as a duplicate of issue #3598, because so far fullscreen mode was implemented only for standalone plots.

@mattpap mattpap added type: bug grant: CZI R6 Funded by CZI Round 6 grant and removed TRIAGE labels Jan 9, 2025
@mattpap mattpap added this to the 3.x milestone Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grant: CZI R6 Funded by CZI Round 6 grant type: bug
Projects
Status: Todo
Development

No branches or pull requests

3 participants