[WIP] Add "Save as..." command and toolbar button#596
[WIP] Add "Save as..." command and toolbar button#596mfisher87 wants to merge 3 commits intogeojupyter:mainfrom
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 <arjxn.py@gmail.com> Co-authored-by: Martin Renou <martin.renou@gmail.com> Co-authored-by: Yao-Ting Yao <YaoTingYao@users.noreply.github.com> Co-authored-by: Jamison Polackwich <7376361+rjpolackwich@users.noreply.github.com> Co-authored-by: Tammy Woodard <19804979+tawoodard@users.noreply.github.com>
Co-authored-by: Arjun Verma <arjxn.py@gmail.com>
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 <arjxn.py@gmail.com>
|
@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 |
|
There's a "Save as..." method in the "File" menu. Let's punt this until later :) |

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-filesjlpm run lint