-
Notifications
You must be signed in to change notification settings - Fork 26
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
ENH: positioner row widget sizing usability fixes and tweaks #611
Conversation
…d fonts, only resize row widget limits
…nd stylesheet reloads
… big for square widget
I'm going to finish up the testing and documentation todo stuff and then I'm going to adjust how I implemented the dynamic sizing. I've realized some basic tricks for making these sorts of composite widgets cleanly rescaleable in all directions while maintaining proportions and while only needing specification in the ui file (rather than my current code here which does a lot of extra stuff in the py files that it shouldn't need to if the ui is set up correctly). In essence: the only sizing rule that we'll need to keep track of in code is the dynamic font resizing, which I plan to attach to all of the text widgets instead of just some of them. I might also take a stab at fixing the resizing for the square widget while I'm here if I'm feeling motivated. |
…ts more readable for large positions
I like where this is at now I didn't quite get to implementing the splitters idea, because the way the basic and composite signal panels are implemented (as a QWidget that is also itself a QGridLayout) makes this somewhat annoying to implement. There will need to be a sizable refactor to achieve this. (Now: add rows to a grid layout that is actually a typhos panel, later: add rows to a splitter area? And maintain the grid sizing? And only have splitters between subdevices, not between signals?) The splitters idea will become an issue for implementing later since I think it would be helpful in a lot of cases. I am going to clean up the description for documentation purposes but I don't plan on modifying the code again until next PR unless there are code quality issues or bugs. I think after this PR I'll switch to going through the most recent typhos issues. |
This is now reviewable so I'm going to mark as ready for review. I still will revise the pre-release notes one more time. |
I also want to make a companion PR on pcdsdevices, I'll try not to forget. This works by itself but there's a couple more things to tweak (such as the ??? rendering of the |
wowee this is a biggun A few notes from interactive testing:
I'll give the code a read through 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.
Hard to argue with the results here. I pointed out a few things I saw
I've tried using a VM for this in the past with mixed results. We have a new "like a hutch" test area coming online soon thankfully. I should double-check the final version of this in RIX before merging.
I need to investigate and resolve this prior to merging, this is a blocker.
This is related to #599 and I'm planning to fix it before the tag but not during this PR. There's a hotfix for it in dev_conda.
This is a valid concern and should be addressed before merging. Parenting the widgets properly actually made them disappear... which confused me.
Vincent also suggested this at some point and I agree. I had been intending to simply use the splitters but since I punted on it maybe I need to address that now. |
Text getting small is because pydm is manually resetting the style on certain metadata events. |
Setting the stylesheet fixed both the big big font and the tiny tiny font issues |
The only remaining fix I'm going to do here is to address:
After that, I'll round up the remaining items into tickets:
|
…efunt font-size warning
There's only one more situation where the sizing is wrong- when the signal panel has no entries in it at all. Maybe this becomes a ticket to fix later, too. (I'll try a bit before today ends) |
Remaining issue is that subdevices of subdevices don't collapse properly when vanished... my first try at that one caused more issues so this might be where I leave it for 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.
I think this looks good on the whole. We have some followups, but this is a clear improvement
Description
Rework the design, sizing, and font scaling of the positioner row widget to address concerns about readability in RIX for devices with large position numbers, and to address issues with poorly used space in state devices.
Full list of changes:
dynamic_font.py:
panel.py
positioner.py
reload_widget_stylesheet
call fromclear_error
to avoid an issue where clickingclear_error
would undo all dynamic font scaling and set it back to the default size.RowDetails
widget) on top of the screen instead of inside of the main layout, because adding a huge widget to the layout causes serious issues with resizing.test_dynamic_font.py
PositionerBase.embedded.ui
positioner.ui
positioner_row.ui
Motivation and Context
How Has This Been Tested?
Where Has This Been Documented?
Need to revise the pre-release notes one more time
Screenshots:
Before small:
Before wide:
After small:
After wide:
After default size with default size/location expansion pop-outs:
Pre-merge checklist
docs/pre-release-notes.sh
and created a pre-release documentation page