-
Notifications
You must be signed in to change notification settings - Fork 950
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
fix: restoring widgets from saved state is broken since v8 in Lab #3866
fix: restoring widgets from saved state is broken since v8 in Lab #3866
Conversation
Also related to #3823 |
@vidartf and @jasongrout do you remember why this line was removed in #2532 ? Also, the failure on the visual test is odd, since it's a font that was already used. Could it be that we don't pin a particular library? I do see we use 'ubuntu-latest' which can lead to changes in visual results. @mariobuikhuizen can you first open an 'empty' PR to see if this is unrelated to this PR? |
I'm re-running the tests to see if we can figure out the visual regression test failure. Once we get to the bottom of that, we should merge this as the saved widget state functionality is important. |
Looking at the failed regression tests, I'm not seeing any material difference between the two rendered items. The failure is triggered by a few changed pixels, but not a real regression. |
If this really is the only problem, I strongly urge this to be pushed ahead quickly. The broken saved widget state is a big deal that prevents me from being willing to work on moving my projects to jupyter lab from nbclassic. Thanks. |
In 9d999d7 waiting for sessionContext.ready was removed, this caused _loadNotebook() not to work, because it was called before the widget metadata was available. This commit restores waiting for sessionContext.ready. This has to be before _loadFromKernel(), otherwise this.kernel is not present, causing an exeption, skipping _loadNotebook(). Fixes: jupyterlab/jupyterlab#15361
f811726
to
c52b230
Compare
I just rebased, it is still failing. @mariobuikhuizen @ibdafna @maartenbreddels should we merge event though the visual regression test fails? Given the diff I don't think this is caused by this PR. We should fix the regression separately |
Indeed, this seems unrelated, and it also happens for cell 41, so it's not likely to be a timing issue due to loading CSS slowly. |
Can I help somehow with this issue, to have it merged? |
Unsure why this is needed, since jupyter-widgets#3866 seems like an unrelated change.
We also really want to have this released soon. I'm gonna push the visual changes as a separate commit, with an explanation that we do not fully understand why this visual diff happens. |
Unsure why this is needed, since jupyter-widgets#3866 seems like an unrelated change.
9820642
to
3ec3fd3
Compare
sidenote: images 40 to 44 have changes, but the visual report only shows 1 image at a time. To make sure we really commit small changes if have to push 1 image at a time. I'm not sure if this is a galata setting, since it will speed things up in the future? |
Unsure why this is needed, since jupyter-widgets#3866 seems like an unrelated change.
3ec3fd3
to
3eca787
Compare
Since you have a number of ipywidgets/ui-tests/tests/widgets.test.ts Lines 41 to 44 in b253179
this will still mark the test as failed, but will run through all of them (and generate images for all). |
This will make the galata report all the mismatches at the end of the test run, instead of failing immediately on the first mismatch.
Unsure why this is needed, since jupyter-widgets#3866 seems like an unrelated change.
3eca787
to
2bf3d5d
Compare
Many thanks 🤗 |
Unsure why this is needed, since jupyter-widgets#3866 seems like an unrelated change.
2bf3d5d
to
d374291
Compare
Looking at a recent run of #3880 it seems the visual test are also failing in that PR (I've checked before that other PR's were green, maybe a caching 'luck'). Also, the docs fail in #3880 so I thin we can merge now. Many thanks to the people who helped with this and the patience of our users; I'll work on a release now! |
Great to hear! Looking forward to testing this new feature! |
Thanks!! |
We have the first 2024 release 🥳 |
Awesome!
and Save -> Restart -> Close -> Reopen Works now! 🎉 Screen.Recording.2024-02-09.at.11.28.24.movI've also tried another order (Restart before save) That one still gives the error: Screen.Recording.2024-02-09.at.11.37.10.mov |
and here's another observation when I do the following steps:
it will ask me if I want to save changes before closing. That's unexpected, because I did not make changes. However, when I click on "Save changes" and reopen the notebook, the error of not rendering the widget occurs again: Screen.Recording.2024-02-09.at.11.42.18.mov |
Ipywidgets v7 has the same behaviour (edit: forgot to turn on save widget state, it works in classic notebook with v7) |
In 9d999d7 waiting for sessionContext.ready was removed, this caused _loadNotebook() not to work, because it was called before the widget metadata was available.
This commit restores waiting for sessionContext.ready. This has to be before _loadFromKernel(), otherwise this.kernel is not present, causing an exeption, skipping _loadNotebook().
Fixes: jupyterlab/jupyterlab#15361