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

use native ‘Save’ command under 'File' menu to save Voyager #37

Open
zzhangjii opened this issue Apr 26, 2018 · 2 comments
Open

use native ‘Save’ command under 'File' menu to save Voyager #37

zzhangjii opened this issue Apr 26, 2018 · 2 comments

Comments

@zzhangjii
Copy link
Collaborator

zzhangjii commented Apr 26, 2018

Currently, the changes in voyager are saved through newly designed 'Save Voyager' button in 'Voyager' menu or toolbar, it kind of conflicts with JupyterLab user's operation habit:
since under 'File' menu, Jupyterlab already provided 'Save', 'Save As', 'Save All' commands for users to save work to local files. So, for Voyager, we should follow this design, use those native 'Save' buttons to save the current Voyager status (vl.json form by default) to local files.

Those 'Save' commands rely on each widget's context() function to get the contents. I modified VoyagerPanel's context() function, now the original 'Save' button under File menu can save the changes inside voyager to local vl.json file.
But for other file types like csv, this action will put vl.json content into csv file and therefore destroy the original data. So, right now I added another logic in context() function to determine if a file is vl.json, if it's not, then the 'Save' command will not actually do anything.

My current solution is not ideal, any suggestions?
@ellisonbg

@ellisonbg
Copy link
Collaborator

@zzhangjii @tgeorgeux

I think we should step back and study how other applications handle these types of situations where there are two files involved (the "document" and the "data"). Tableau is a great example of such an app we could study. What are others?

@tgeorgeux
Copy link

I think of outputting files from Figma/Sketch, save as .fig or Export into various file types. Microsoft Office/GSuite both have separate save and export features as well. I think it's safe to say 'export' is a good option, and possibly give options for how to export.

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

No branches or pull requests

3 participants