-
-
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: Remember undocked state of plugins when closed and allow to close Outline when the Editor is maximized or in an Editor window #19784
PR: Remember undocked state of plugins when closed and allow to close Outline when the Editor is maximized or in an Editor window #19784
Conversation
47839a3
to
3fac4ac
Compare
Leaving this for 5.4.1 so I can gather feedback from other devs during our developers meeting. |
3fac4ac
to
1fb9d8d
Compare
- This allows users to show plugins directly undocked, i.e. without making them first visible but docked on the main window to then undock them. - Also, improve typing a bit.
- To close it the user can click the Close action in its Options menu or go to the Panes menu. - Hide the Outline's Undock and Lock/unlock actions when shown in the maximized editor because it doesn't make sense to show them in that case.
e8c8146
to
3f8b7bf
Compare
EditorMainWindow
to the new API
EditorMainWindow
to the new APIEditorMainWindow
to the new API
3f8b7bf
to
846e9e8
Compare
- That way it can be used by other plugins or widgets. - Use it to set the menubar stylesheet of EditorMainWindow.
- Also, fix failing tests for the Working directory.
Also, check for the presence of splitter handler because it can't be available during tests.
This was causing a crash at startup in some cases.
846e9e8
to
73e1022
Compare
@dalthviz, this is finally ready for review. It ended up being a big PR because I decided to migrate |
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.
I think there is one problem that needs to be addressed before this can be merged:
- When the Outline pane is undocked, there is still an "Undock" action in its options menu, and clicking that leads to a core dump.
The rest is just feedback for your consideration:
- I would change "Move to another position" to "Move", because moving something means moving it to another position. I don't think I have ever seen this spelled out in a menu.
- I don't like that "Close" in options menu of undocked panes is different from the "Close" button. The latter sometimes hides and sometimes docks. But this seems a conscious decision on your part, so fair enough.
- If I maximize the editor pane and then click on View > Window Layouts > Spyder default layout, the result is strange and kind of halfway between the maximized layout and the default layout. But this is probably not related to the PR.
- Minor code comments.
- Also, remove unnecessary condition in test_undock_plugin_and_close and style from the app stylesheet.
Co-authored-by: Jitse Niesen <jitseniesen@yahoo.com>
This helps to have a more straightforward UI because "Move" means basically "Move to another position". And "Lock" means "Lock position".
Also, remove a couple of unneeded imports.
- We were not unmaximizing a possibly maximized plugin before the switch, which left the window in an inconsistent state. - We also need to reapply the dock tabbar style after the switch so the window looks as expected.
@jitseniesen, this is ready for another review. About your comments:
Thanks for noticing it. I was able to easily reproduce it and it should be fixed now.
Great suggestion! I implemented it in one of my last commits.
We'll see what users think about this UX.
Great catch! Although not related to the changes here (as you suspected), I took the opportunity to fix it as well. |
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.
Looks good now, no further comments. Thanks!
Since the failure in our tests was already fixed by PR #22100, I'm going to merge this one. |
Description of Changes
View > Panes
, then it'll be automatically undocked when made visible again.Close
action to the Options menu of undocked plugins, so that this new functionality can be more easily discovered by users.Close
button of its window. This means that if users want to dock it again, they'll need to click on theDock
action of the respective plugin.Unlock position
in the Options menu of plugins toMove
. This is becauseUnlock
andUndock
differ by a single letter in English, so it's quite easy to click on one of those actions when you really want to click on the other (I made that mistake constantly while working on this PR).API changes
SpyderMenuMixin
to create main window menus. That allows to easily access and use them in other places (e.g. inEditorMainwindow
).render
method ofSpyderToolbar
public. This follows a similar change done forSpyderMenu
.toolbar_id
to the constructor ofApplicationToolbar
. That allows to more easily create those toolbars.ACTION_REGISTRY
to access them easily (e.g. for testing).Visual changes
New close when undocked functionality
New close action in undocked plugins
Changes in
EditorMainWindow
Issue(s) Resolved
Fixes #16265.
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: @ccordoba12.