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

Updates warning message on double file open #375

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

JasonWeill
Copy link
Contributor

@JasonWeill JasonWeill commented Oct 15, 2024

If the same file is opened twice in the same JupyterLab session, in two different contexts, we had previously displayed a message reading:

Two collaborative sessions are accessing the file (name) simultaneously. Opening a document with multiple views simultaneously is not supported. Please close one view; otherwise, you might lose some of your progress.

This change rewrites the message to:

You have opened the file (name) with two separate views. This is not supported. Please close one view; otherwise, some of your edits may not be saved properly.

This is intended to be clearer, and is intended to fix or mitigate #371. "Two collaborative sessions are accessing" is misleading; two different sessions can, by design, edit the same file. This warning should only appear when the user opens the file twice in the same session. In addition, "some of your progress" is misleading; because this warning appears on initial load, we can assume that the user hasn't made any edits yet.

@JasonWeill JasonWeill added the enhancement New feature or request label Oct 15, 2024
Copy link
Contributor

Binder 👈 Launch a Binder on branch JasonWeill/jupyter-collaboration/rewrite-warning-message

@ellisonbg
Copy link

Thanks @JasonWeill I think this is an improvement. It may help to go a bit further and clarify that the issue is more specifically related to opening the same file in two different formats (notebook and text editor). There are cases where it is fine to open the file twice (e.g. in separate browser tabs) as long as both are in the same format (e.g., two notebook views).

@JasonWeill
Copy link
Contributor Author

@ellisonbg Updated the message to clarify that this refers to two separate views.

Copy link
Collaborator

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@davidbrochart davidbrochart merged commit c809930 into jupyterlab:main Oct 17, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants