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

Toolbar is often empty when opening a Notebook #6553

Closed
jtpio opened this issue Oct 5, 2022 · 5 comments · Fixed by #6887
Closed

Toolbar is often empty when opening a Notebook #6553

jtpio opened this issue Oct 5, 2022 · 5 comments · Fixed by #6887
Labels
Milestone

Comments

@jtpio
Copy link
Member

jtpio commented Oct 5, 2022

Sometimes the notebook toolbar moves most of the items in the toolbar popup, leaving only the popup opener visible.

This is one of the causes for the flaky UI tests (example run):

condensed-toolbar.mp4

But this sometimes also happens when opening a notebook or refreshing the page:

image

There seems to be a race condition somewhere. Or the toolbar resize logic is being triggered too early in the process of loading the notebook widget and adding it to the shell.

@jtpio jtpio added the bug label Oct 5, 2022
@jtpio jtpio added this to the 7.0 milestone Oct 5, 2022
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to issues that need triage label Oct 5, 2022
@jtpio jtpio removed the status:Needs Triage Applied to issues that need triage label Oct 5, 2022
@jtpio
Copy link
Member Author

jtpio commented Oct 6, 2022

This looks like a real issue / race condition.

Part of the fix should include the removal of this workaround in the UI tests added in #6487:

// temporary workaround to trigger a toolbar resize
// TODO: investigate in https://github.com/jupyter/notebook/issues/6553
await page.setViewportSize({ width: 524, height: 800 });

and:

// temporary workaround to trigger a toolbar resize
// TODO: investigate in https://github.com/jupyter/notebook/issues/6553
await page.setViewportSize({ width: 524, height: 800 });

@andrii-i
Copy link
Contributor

andrii-i commented Jun 9, 2023

I'm having a hard time reproducing this locally. Does this happens locally (often) or this is more of a testing problem? If it's the latter, should this issue be moved to 7.x and not be a blocker?

@jtpio
Copy link
Member Author

jtpio commented Jun 9, 2023

Right, as noticed in #6887 (comment), the issue now seems to be more about some items being cropped rather than items missing from the toolbar:

image

However it seems to be reproducible when testing with a mobile layout via the dev tools and refreshing the page several times:

items are "cropped"

image

expected behavior

image

@jtpio
Copy link
Member Author

jtpio commented Jun 12, 2023

Given that this is not very easily reproducible (although the UI tests seem to be catching it consistently in #6887), we can bump that one to 7.0.x for now.

But if someone would like to work on it in the meantime please feel free.

@jtpio jtpio modified the milestones: 7.0, 7.0.x Jun 12, 2023
@jtpio jtpio removed the tag:Release Blocker A must-have bug for the milestone to which it is tagged label Jun 12, 2023
@jtpio
Copy link
Member Author

jtpio commented Jun 14, 2023

For reference I just experienced this issue when using JupyterLab 4. So maybe it's a bug in JupyterLab and we should investigate it there:

image

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

Successfully merging a pull request may close this issue.

2 participants