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 save as without changing the file name #14212
Conversation
Thanks for making a pull request to jupyterlab! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hbcarlos
If we do that, could we remove the logical change introduced in https://github.com/jupyterlab/jupyterlab/pull/14182/files#diff-bd91309321cead1ad13aa66f461c81110113c117fababf12ea04e346b0b5afb5
aka switching back to
if (this.isDisposed || !newPath) {
return;
}
instead of rejecting the promise.
And could you add a jest test that if the path is the same, no save
event should be triggered.
I can help if you are not available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hbcarlos
@meeseeksdev please backport to 3.6.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
Benchmark reportThe execution time (in milliseconds) are grouped by test file, test type and browser. The mean relative comparison is computed with 95% confidence. Results table
Changes are computed with expected as reference.
Waiting for localhost:8888 Cell memory leaksCreate a code cellMemory change: +152 kB Leak detected: YesLeaking objects:
Leaking collections: Create a markdown cellMemory change: -89.1 kB Leak detected: NoLeaking objects:
Leaking collections: Create a raw cellMemory change: +147 kB Leak detected: YesLeaking objects:
Leaking collections:
File editor memory leaksCreate a fileMemory change: -79.3 kB Leak detected: NoLeaking objects:
Notebook memory leaksCreate a notebookMemory change: +32.8 kB Leak detected: YesLeaking objects:
2 passing (6m)
|
* Fixes saving with the same name * Review * Add test for dismissed save as dialog --------- Co-authored-by: Frédéric Collonval <fcollonval@gmail.com> (cherry picked from commit b80523f)
Follow-up #14182
I just realized there is an issue. When saving the document with the same name, the Drive emits a
save
event with the same name, so we close the document but do not open the new one.This fix will prevent closing the document if we are not opening a new one.
Grabacion.de.pantalla.2023-03-16.a.las.14.24.18.mov
cc @fcollonval
References
Code changes
User-facing changes
Backwards-incompatible changes