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 spyder New and Open file options instead of duplicanting for Notebook #134

Open
goanpeca opened this issue Nov 11, 2017 · 4 comments
Open

Comments

@goanpeca
Copy link
Member

goanpeca commented Nov 11, 2017

@spyder-ide/core-developers maybe we should really use the normal open dialog and if the plugin is installed, we should be able (via some api) to ask the user if they want to open as text or as a notebook.

This would really avoid having all this duplicates. We could add an extra thing on the open dialog (but this would require creating a custom Open dialog for each OS) so that we have a checkbox or something that reads, open as text, so that the default is to open as a notebook.

I think no one really opens a notebook as text, so why bother with that? The current UI is very unfriendly :-\ and error prone. Users don't want 2 separate set of menus, open save, and close should be one and only one and act depending on what dock/pane send the request.

@dalthviz
Copy link
Member

Just linking this with the discussion at #39 to have reference to some ideas discussed previously.

@goanpeca
Copy link
Member Author

goanpeca commented Nov 12, 2017

@rlaverde maybe the save, save_as, close, open actions should be global and broadcast the request depending on the active pane, and not get tied up to the editor.

@rlaverde
Copy link
Member

Yes, I like it, how this will work? a plugin will implement a method to catch the result of the file?,also some configurations to be used in the dialog? (filters, default dir..)

@goanpeca
Copy link
Member Author

goanpeca commented Nov 12, 2017

Yeah I guess a plugin should define the methods

def save(self, fpath, filters=None, data={}):
    """"Save method""

def save_as(self, fpath, filters=None, data={}):
    """"Save as method""

def open(self, fpath, data={}):
    """"Open method""

def close(self, fpath, data={}):
    """"Close method""

def close_all(self, fpath, data={}):
    """"Close all method""

where maybe data is some additional info we transmit like what plugin, and maybe some settings, don't know for sure.

Now this still does not solve the issue of Open. Because open should work, no matter which dock /pane is active/selected. Basically the open section should define a set of files and extensions plus the priority so that when a plugin is registered it sets the filters and the priority (? and this is the default?) OR, if several plugins register something the the open dialog needs to have an extra widget injected to derive what plugin should perform the action? (either way we need a default)

@jitseniesen jitseniesen added this to the v0.2 milestone Aug 22, 2018
@jitseniesen jitseniesen modified the milestones: v0.2.0, v0.3.0 Dec 17, 2019
@goanpeca goanpeca added the v0.3 label Feb 23, 2020
@goanpeca goanpeca removed this from the v0.3.0 milestone Feb 23, 2020
This was referenced May 31, 2020
@jitseniesen jitseniesen added v0.4 and removed v0.3 labels May 31, 2020
@jitseniesen jitseniesen added this to the v0.5 milestone Apr 18, 2021
@jitseniesen jitseniesen removed the v0.4 label Apr 18, 2021
@jitseniesen jitseniesen modified the milestones: v0.5, v0.5.1 Jun 25, 2023
@jitseniesen jitseniesen modified the milestones: v0.5.2, v0.6.1 May 28, 2024
@jitseniesen jitseniesen modified the milestones: v0.6.1, v0.6.2 Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants