-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Do not automatically open Project Explorer when opening project if user closed it #7546
Conversation
This goes for both creating a new project and opening an existing project. The Project Explorer is opened if the visible_if_project_open option is set.
Hello @jitseniesen! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on July 24, 2018 at 14:36 Hours UTC |
I used the module name of the master branch instead of the 3.x branch.
@@ -14,6 +14,7 @@ | |||
import pytest | |||
|
|||
# Local imports | |||
import spyder.plugins.base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only valid in master
. For 3.x
you need to write:
import spyder.plugins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I tested against master, then rebased against 3.x, but forgot to run the tests again. Stupid.
This looks very good, but I have one remark: the project explorer is a good indicator that Spyder is in project mode. Now, after this, if users create a new project but closed the project explorer while the previous one was active, it won't show up again. So the only indicator left would be the addition of the projects' name to the window title. Is that ok for you @jitseniesen? |
For me it's okay. I don't need an indication of project mode. I have half a dozen of projects I work on and I open them immediately when opening Spyder, or I work on single files in which case I don't use a project. The main difference of project mode for me is that the project directory is in the Python path, so my scripts have an ImportError if I run them outside project mode. To be honest, I don't know what other users think of it, but (barring usability testing) the only way to find out is to try and the current behaviour is annoying several people. If we do need an indicator, surely we can do this with less screen area real estate. |
Ok, in the spirit of "open source is about scratching your own itch", I'm going to merge this one. Let's see what other users think about it. |
Pull Request Checklist
modified the
spyder/defaults
directory, or added new icons/assetsDescription of Changes
Create a new config option for the projects plugin called
visible_if_project_open
, defaulting toTrue
to mimic current behaviour. When closing a project or quitting Spyder with a project open, set or clear this according to whether the Project Explorer is open. When creating a new project or opening an existing project, open the Project Explorer only if the config option is set.The effect is that if a user opens a project, closes the Project Explorer and then restarts Spyder, the Project Explorer is not opened again, as opposed to the current situation where it is opened.
Issue(s) Resolved
Fixes #6292