-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix vertical selection of neighbors #152
base: v0.1.5-develop
Are you sure you want to change the base?
Conversation
I just updated RecoverPy demo GIF too. Better quality + I make a better use of PyCUI. Better showcase of PyCUI overall 😉 |
Hey @PabloLec, |
Hi! Sorry for the delay, the fix did work so no further testing needed but the same fix needs to be applied to horizontal selection though. |
@PabloLec Fixed some merge conflicts created by merging the formatting PR, but not 100% sure if the expected behavior is retained. Could you please double check? Also, if you could add some additional unit tests that account for the newly fixed vertical selection that would be great - basically just adding a new test file that tests vertical selection as it is expected to behave, in cases of successful upwards, successful downwards, unsuccessful downwards, unsuccessful upwards, and bottom/top of the UI as well. |
Good to know your still around @jwlodek @PabloLec for example: when attempting to navigate using the new code, the user will not be able to move from widget_a to widget_c, using the arrow keys. I gather this has something to do with line 1133 I have yet to work out how to rectify this. any thoughts @PabloLec.
|
@PabloLec I tried to fix the horizontal navigation, but it doesn't seem to work. |
Quick summary of pull request...
What this pull request changes
This PR only modifies the
_get_vertical_neighbors
method forPyCUI
object.And... (sorry for that, I just noticed it) a few auto removal of useless whitespaces, sorry for the commit readability.
This is about issue #151.
I modified the method in order to:
Issues fixed with this pull request
Optionally, what changes should join this PR
I didn't test it but I think left and right arrow key navigation also allow to select non selectable widgets.
By the way, noticing my auto removal of useless whitespaces, I'd like to refactor some lines in
py_cui
, like unnecessary nesting, casting, etc. So, not replacing explicit code by unreadable smart code but essentially shorten some small parts in order to improve readability.The thing is I see multiple possible lines I could refactor in the whole codebase. I could do it and make a PR of a few commits, not a monstrosity, probably a diff of around 150 lines.
I think it would be a good idea, I'm just wondering if the timing is good or if you're working on something right now and prefer to avoid blocking merges.