-
Notifications
You must be signed in to change notification settings - Fork 36
[WIP] Add "Save as..." command and toolbar button #596
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
base: main
Are you sure you want to change the base?
Conversation
Integration tests report: appsharing.space |
|
@martinRenou @brichet @gjmooney @simonprovost I would love to hear your thoughts on this: Right now we can save the file as a new filename and update the model to reflect that. However, changes applied to the widget in the GUI after, for example, adding a new layer, do not get saved to the new filename. "Saving as" a 2nd time, the filename placeholder is properly updated as we expect, but those underlying saves are not happening. |
Co-authored-by: Arjun Verma <[email protected]> Co-authored-by: Martin Renou <[email protected]> Co-authored-by: Yao-Ting Yao <[email protected]> Co-authored-by: Jamison Polackwich <[email protected]> Co-authored-by: Tammy Woodard <[email protected]>
Co-authored-by: Arjun Verma <[email protected]>
Fix the file extension automatically if it doesn't end in jGIS FIXME: Does not save changes to the shared document after changing the filePath. Co-authored-by: Arjun Verma <[email protected]>
@mfisher87 I don't think there is a simple way to achieve it. The file is updated on disk with the shared model of the widget model. I think that, at least, the shared model should be recreated to be able to update the file on disk (probably using this). A other solution (maybe easier) could be to replace the whole widget by a new one. Maybe @davidbrochart or @trungleduc have a better idea about it. |
Thinking again about it, I wonder if it won't be confusing for user to change the shared model on the fly. It could be only an |
It looks to me that this is what JupyterLab does already with notebooks when you run save-as, since I see the widget blink (as if we closed the widget and reopened it). To be verified in the code itself. |
Another way to avoid confusion could be to have 2 classes:
|
@brichet Interesting idea! Fernando compared this dynamic to similar core concepts in JupyterLab: a Notebook, which is file-backed at all times, and a console, which is ephemeral, not file-backed. When a user opens a console vs a Notebook, they look significantly different and visual cues enable the user to reason about the difference between the two environments. Do you have thoughts on what visual cues might help the user differentiate between those different classes and how they must use them differently? For example, if calling an |
Description
We want to enable users working on nameless documents (
doc = GISDocument()
) to save that document from the UI (#594). The current "Save JGIS As..." menu entry from JupyterLab works great in a full view, but not in a widget view or sidecar view.Checklist
Resolves #XXX
.Failing lint checks can be resolved with:
pre-commit run --all-files
jlpm run lint