-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Refactor Main Window status bar to improve information presentation #5451
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5451 +/- ##
==========================================
- Coverage 89.31% 89.27% -0.04%
==========================================
Files 600 600
Lines 51019 51060 +41
==========================================
+ Hits 45566 45584 +18
- Misses 5453 5476 +23
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thsi is great! I tried to do this myself, but got completely lost very fast :P This solves #5177 too right? |
# magical nuber +2 is from superqt code | ||
# magical number +6 is from experiments |
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.
What do these magic numbers do? Increase the base width a bit?
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.
What do these magic numbers do? Increase the base width a bit?
Yes, It it is to prevent eliding text if there is enough space.
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.
Ah, makes sense :)
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.
except there is no +6 in the code, only +8! 😂 Could you maybe elaborate in the comments based on this discussion?
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 need to bump the value to 12 after merging main. I hate this, and I do not know how to do it in a proper way...
Exploding windows, yes. Blinking, I do not know. |
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.
Yup, I tested it and it works!
It would be nice if someone with another OS (MacOS, Windows) could test it. @psobolewskiPhD @andy-sweet ? |
Nice @Czaki! Just did a quick test, and on macOS the data occludes the start of the help message sometimes, and the text baseline alignment is a bit off between the two messages: Screen.Recording.2023-01-14.at.1.09.34.am.movTo be honest I'm not 100% sure that this is the best experience... The jittery text is disconcerting... But I don't have a strong opinion, and it solves real issues, so that's 👍. |
@jni Maybe for another PR, but I think the help message regarding Tools keybinds shouldn't show all the time, especially when hovering over data. Maybe only show when the mouse is outside the canvas? or just inside the LayerControls? Or just when the layer is created and then once the user does something, drop it? |
@jni Could you test the current version? Jitter should be fixed. |
hide help text is easy and could be done in this PR. The question is what we want. |
@Czaki On my mac there is a subtle visual glitch when hovering the bottom rectangle: Note that when I hover the top two boxes, the help stuff is gone 👍 |
This is connected with |
I agree on dumping the help rather than truncating it. I think we should handle help better anyways (perhaps with a modal dialog if someone presses |
if coordinates_width: | ||
help_width = 0 |
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.
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 love it. Works great.
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.
Maybe help text should be shown if there are only coordinates but no properties?
Either way is fine for me.
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 consistency is better. Keep it simple:
- Mouse in canvas: data/properties info.
- Mouse in layers/tools: tools help.
During the community meeting, I got positive feedback on the current state. Let's start 24 hours clock. |
* main: (38 commits) Fix `test_worker_with_progress` by wait on worker end (napari#5548) Un-set unified title and tool bar on mac (Qt property) (napari#5533) Set PYTHONEXECUTABLE as part of macos fixes on (re)startup (napari#5531) Fix key error issue of action manager (napari#5539) Clean dangling widget in test (napari#5544) Use pytest-pretty for better log readability (napari#5525) Update vendoring tool to check on matplotlib colormap (napari#5181) MAINT: add time limit for CI. (napari#5495) Add show_debug notification (napari#5101) Overlays 2.0 (napari#4894) Clarify layer's editable property and separate interaction with visible property (napari#5413) ci(dependabot): bump docker/build-push-action from 3 to 4 (napari#5523) Fix opening file dialogs in PySide (napari#5492) [pre-commit.ci] pre-commit autoupdate (napari#5518) Replace flake8, isort and pyupgrade by ruff, enable additional usefull rules (napari#5513) MAINT: Don't format logs in log call (napari#5504) Fix conda avaliability check (napari#5496) Handle case when QtDims play thread is partially deleted (napari#5499) Bugfix: Add missing Enums and Flags required by PySide6 > 6.4 (napari#5480) Refactor Main Window status bar to improve information presentation (napari#5451) ...
Description
In this PR I implemented a custom layout for status bar messages to ensure that as much information as possible will be presented.
napari_statusbar-2022-12-28_17.47.55.mp4
In this PR I ensure that a minimal part of every label, except help, will be presented. If enough space is available, then also help text is presented.
Type of change
References
closes #5417
How has this been tested?
as there are small differences between the two Qt bindings.
Final checklist:
trans.
to make them localizable.For more information see our translations guide.