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

Recreate nbgrader widgets after they are disposed. #1773

Merged
merged 2 commits into from
Jun 12, 2023

Conversation

ykazakov
Copy link
Contributor

Fixes #1772

I did not add tests to reproduce the issue. This would require a bit more work.

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch ykazakov/nbgrader/master

@brichet
Copy link
Contributor

brichet commented Mar 31, 2023

Thanks @ykazakov
This also fixes #1722

It would be great if you could add some tests.
I can give some hints if needed.

@ykazakov
Copy link
Contributor Author

It would be great if you could add some tests. I can give some hints if needed.

I can give it a try.
I found relevant functions to open the menus, e.g:

const open_assignment_list = async (page:IJupyterLabPageFixture) => {

Any idea how to close the opened tab?

@brichet
Copy link
Contributor

brichet commented Mar 31, 2023

This is the correct function.
It may be added to the following test (for assignment list) or a new test can be created.

test('Open assignment list tab from menu', async({

I think the close icon have the class lm-TabBar-tabCloseIcon, so maybe we could simulate a click on it (be sure to select the correct one if several tabs are opened or if there is another TabBar).

@tuncbkose
Copy link
Contributor

By the way, I submitted an identical pull request two weeks ago (#1756).

@ykazakov
Copy link
Contributor Author

ykazakov commented Apr 3, 2023

I have now extended the UI tests upon suggestion of @brichet (with a little of refactoring). The tests fail without the patch.

@tuncbkose sorry I did not notice the identical issue #1722. I noticed that the bug is still present in the latest release 0.8.2, so I did not check for old issues. :-/

@brichet
Copy link
Contributor

brichet commented Jun 12, 2023

Thanks @ykazakov

@brichet brichet merged commit 6c546d0 into jupyter:main Jun 12, 2023
AlirezaT99 pushed a commit to AaltoSciComp/nbgrader that referenced this pull request Aug 6, 2024
* Extend ui tests to reproduce jupyter#1772

The extended tests close the opened tab and open it again

* Recreate nbgrader widgets after they are disposed.

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

Successfully merging this pull request may close these issues.

Nbgrader Menu in JupyterLab opens windows that cannot be closed
3 participants