-
-
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 of PaneEmptyWidget
, show message on panes connected to dead consoles and improve About dialog UI
#21134
PR: Improve UI of PaneEmptyWidget
, show message on panes connected to dead consoles and improve About dialog UI
#21134
Conversation
@dalthviz, could you test that the changes I did to the About dialog work as expected on Windows and Mac? Thanks! |
PaneEmptyWidget
and show message using that widget on panes connected to dead consolesPaneEmptyWidget
and show message on panes connected to dead consoles
19fb3d5
to
e756a46
Compare
Thanks @dalthviz! I think the dialog looks good on Windows but I'm not sure about Mac. Could you post a single screenshot per OS of how things look in |
@ccordoba12 using master I got this:
|
Ok, thanks for checking! I'll make the necessary adjustments on Windows so that things look the same. But could you give me a hand in Mac? Please use different values in |
Or better yet, just give me the default interface font size on Mac and I'll adjust the |
Is this what you need?: Or is there some other place where macOS defines that @ccordoba12 ? |
Yep, that's it. Thanks @dalthviz! I'll make the necessary changes right away. |
c149ee8
to
b6f4a36
Compare
The About dialog should have the same font sizes again on Windows and Mac, but please check on Mac to be sure (I already did on Windows). |
Ok, it looks as in master, which is good. So, that's working fine now. |
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 ! Left a comment regarding the TODO
about the icon to use with the errored console.
Also, while checking I noticed that there is an issue with the Variable Explorer when it is not connected to a console since the toolbar buttons are still enabled and you can't open the hamburger menu. Trying to interact with those you get errors like:
- Interacting with the hamburger menu:
Traceback (most recent call last):
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\api\widgets\main_widget.py", line 441, in _update_actions
self.update_actions()
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\plugins\variableexplorer\widgets\main_widget.py", line 429, in update_actions
save_data_action.setEnabled(nsb.filename is not None)
AttributeError: 'PaneEmptyWidget' object has no attribute 'filename'
- Interacting with the
Import data
:
Traceback (most recent call last):
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\plugins\variableexplorer\widgets\main_widget.py", line 181, in <lambda>
triggered=lambda x: self.import_data(),
File "e:\acer\documentos\spyder\spyder otros\carlos\spyder\spyder\plugins\variableexplorer\widgets\main_widget.py", line 488, in import_data
nsb.refresh_table()
AttributeError: 'PaneEmptyWidget' object has no attribute 'refresh_table'
Probably when detecting the console errored, besides the new message, we should also disable the Variable Explorer buttons and review the update_actions
logic to not trigger logic that could need the current namespacebrowser widget?
Thanks for checking @dalthviz! I went through all buttons and menu entries in the Variable Explorer, Plots and Debugger and fixed the errors I found related to these changes. So, please test again. |
60cb321
to
0eff218
Compare
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 ! Left a couple of comments about the order of the validations for the empty widget vs the line where the current widget gets referenced. Besides that, could it be worthy to disable the buttons in the Variable Explorer? Now there are no errors, but is kind of strange to be able to push buttons or toggle them:
By disabling the buttons the behavior would be closer to the Plots pane which seems logic to me (if a functionality that a button provides is not available the button gets disabled):
The debugger partially does the same thing (except for the search button):
- Make the text label bigger. - Use the interface font size for the description label. - Make description label appear at the bottom.
- This is useful to display a meaningful message in plugins whose content depends on being connected to an active console. - We use PaneEmptyWidget for the message.
This way ShellConnectMixin can be used for objects that are not plugins (like the MatplotlibStatus widget) and the API is clearer for external developers.
This is achieved by: - Preserving the aspect ratio of the svg corresponding to the file. - Scaling it according to the factor declared by users in Preferences.
This broke in commit 5747ba6.
- Correctly align buttons to the right of the tab pages. - Make tabs font size match the one used for content. - Remove white area at the bottom of unselected tabs.
…mpty Also, introduce a new method to ShellConnectMainWidget to easily check if the current widget is an empty one.
0eff218
to
369effe
Compare
Great suggestion @dalthviz! I implemented that in my last commit. |
PaneEmptyWidget
and show message on panes connected to dead consolesPaneEmptyWidget
, show message on panes connected to dead consoles and improve About dialog UI
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 ! This LGTM 👍
But, just in case, this is how the Variable Explorer buttons look when no console is available:
Seeing that for a bit, It's kind of difficult to distinguish the disabled filter button 🤔 Not sure at all if there is something to do there but letting you know.
I'm going to approve this but what do you think about the way the filter button looks? Feel free to merge this or ping me to merge if the way the filter button looks is okay for you 👍
Co-authored-by: C.A.M. Gerlach <[email protected]>
Thanks @dalthviz! I'm testing things in the light theme and there the disabled and checked button doesn't look bad. But I'll take a look at it because in the dark theme that definitely doesn't work, as you pointed out. |
- Make it bigger. - Increse size of the "Spyder IDE" text in the Overview tab and fix spacing on it. - Remove repeated "Spyder IDE" text below the icon.
@dalthviz, I think I fixed the last issue you found, so please test again. I also made some additional changes to the About dialog agreed on with @conradolandia and @CAM-Gerlach (see the OP). |
One thing I noticed when I recorded the video in #21145 (comment) is that the minimum size of an empty pane is quite big, certainly larger than when the pane is not empty. It is not possible to make the Variable Explorer pane any smaller at the start of the video, when the pane is empty, |
Thanks for pointing that our @jitseniesen. Since this is almost ready and @conradolandia needs it to do more improvements on top of it, I think we could merge it and address your concern later. So, could you open a new issue about it? |
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 !
Description of Changes
For
PaneEmptyWidgets
: show description at the bottom and increase size of main text (these changes were suggested by @conradolandia); and load their icons in a way that doesn't make them appear pixelated at scale factors greater than one.For dead consoles: show an appropriate message using a
PaneEmptyWidget
on panes that depend on the console to work. This needs an additional icon that @conradolandia is going to design and add in a follow-up PR.This also includes some improvements to the About dialog: use font sizes relative to the interface one, correctly align buttons to the right, increase font size for its tabs, remove white pixels below tabs and make it bigger.
Before
After
Fix color of links in Qt widgets, which was broken in PR: Make the font used by the application configurable and other UI fixes #20933.
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