-
-
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: Improve UI/UX of how repositioning panes work #17813
Conversation
- Use "open hand" as the cursor shape when hovering over the title bar. Before it was "size all", which is a bit strange. - Make the invisible close button in the title bar behave exactly the same as the rest of it. Before it was showing the arrow cursor on hover and it was not possible to drag the widget from it. - Change the cursor shape to "closed hand" when dragging the widget to indicate that the operation is still in place (i.e. that it won't end until the mouse is released). - Prevent dock widgets to be left floating. - Remove mouseMoveEvent, which was doing nothing.
- Increase buttons size, which increases vertical size too. - Change background color on hover and pressed states.
This removes some flickering at startup
- Use lock/unlock icon - Make it behave as a regular button (i.e. change hover and pressed states according to the theme). - Don't make it share color state with the drag region so users understand that is different from it. - Add tooltip.
Also adjust width of close button to be the same one of other buttons in that toolbar.
Hello @ccordoba12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2022-06-29 18:09:18 UTC |
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.
Thanks @ccordoba12 ! Checking locally on Windows and the CI tests I noticed a couple of things:
- The new
Unlock position
is disabled for Plots:
- Seems like the Options menu now positions different if there is no space to show all the actions. For example with the IPython Console options menu it overlaps the console instead of being shown at the top of the pane:
- Some tests are failing due to the new action (
spyder/plugins/history/tests/test_plugin.py::test_init
) or due to missing setup code in the test at the end of the files like for theEditorPluginExample
:spyder/spyder/plugins/editor/widgets/editor.py
Lines 3559 to 3585 in 504e7c7
def test(): from spyder.utils.qthelpers import qapplication from spyder.config.base import get_module_path spyder_dir = get_module_path('spyder') app = qapplication(test_time=8) test = EditorPluginExample() test.resize(900, 700) test.show() import time t0 = time.time() test.load(osp.join(spyder_dir, "widgets", "collectionseditor.py")) test.load(osp.join(spyder_dir, "plugins", "editor", "widgets", "editor.py")) test.load(osp.join(spyder_dir, "plugins", "explorer", "widgets", 'explorer.py')) test.load(osp.join(spyder_dir, "plugins", "editor", "widgets", "codeeditor.py")) print("Elapsed time: %.3f s" % (time.time()-t0)) # spyder: test-skip sys.exit(app.exec_()) if __name__ == "__main__": test()
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.
Hey there! I've seen this work a few times, and it looks like what I expected. Thank you so much for listing everything changed as a list.
I think this is good to merge from my end, I'd just like to suggest a minor change to the tool tips for specificity.
@dalthviz, about your comments above:
Fixed in one of my latest commits
That's most probably due to the addition of the new Lock/Unlock action because I didn't change that specifically (you can check the code about it). Other than this (which we could try to address in another PR), this should be ready. |
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.
Thanks @ccordoba12 ! Checking locally on WIndows seems like the issues with the undock action for plots and even the options menu position error are gone so this LGTM 👍
Description of Changes
Add new action to the Options menu of all dockable plugins called
Unlock position
, so that users can more easily find how to reorganize plugins in the interface.Improve UI of title bar that is shown when
Unlock position
is clicked: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: