-
Notifications
You must be signed in to change notification settings - Fork 18
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
Custom Status Values for ItemSelector (NCurses part) #84
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shundhammer
changed the title
WIP: Custom Status Values for ItemSelector (NCurses part)
Custom Status Values for ItemSelector (NCurses part)
Nov 13, 2019
wfeldt
approved these changes
Nov 13, 2019
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.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trello
https://trello.com/c/dcDDFwGy/1405-5-allow-additional-status-values-in-multiitemselector
Description
NCurses implementation for the CustomStatusItemSelector and greatly improved keyboard input handling for all variants of the ItemSelector.
Screenshot
Details
Input Handling
The cursor keys scroll by items, not by lines.
The
End
key scrolls to the last item, not to the last line.For scrolling by line there are vi-like key combinations:
j
,k
.PgDn
andPgUp
scroll by a page full of lines.Space
andReturn
cycle through the possible status values.+
selects an item and moves to the next one.-
deselects an item and moves to the next one.In custom status mode, both
+
and-
check if that status transition is allowed according to the custom status definitions; i.e. if the custom status nextStatus field of the current status (whatever that is right now) is1
for+
or0
for-
.That makes it possible to still use
+
and-
just like in a plain ItemSelector if the status transitions0 -> 1
and1 -> 0
are defined; or evenn -> 0
for custom status #n. That way the-
key can be made to work even with a custom status install because it's recommended to move directly to0
(don't install) if the custom status transitions are set up that way.Other Stuff
A SingleItemSelector will automatically make the selected item (if there is one) the current item and scroll to that position.
That does not affect the MultiItemSelector or the CustomStatusItemSelector.