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
[tuify] API change the return type of select_from_list()
#200
Comments
@Harshil-Jani I removed both of us from this issue for the time being (since we weren't working on this issue immediately) because I wanted to post it to Rust user forum to invite contributors to work on some issues. But my account is still on hold with them and I wasn't able to post them 😀. Trying to get my account "unblocked". |
select_from_list()
select_from_list()
select_from_list()
select_from_list()
select_from_list()
select_from_list()
Cool, can I give it a shot? |
Just a quick question: Why is the default value an empty string instead of None? |
Great! I have assigned you to the issue. Let us know if you need any help on Discord https://discord.com/invite/rkBsNK83. |
@zoo868e You are correct. The default should be None 👍🏼 |
The commit addresses issue r3bl-org#200 in the Tuify, focusing on changing the return type of the `select_from_list()` function. The modification include updating function parameters and return types, adapting related code in various files, and ensuring compatibility with the new `SelectModeResult` enum. Additionally, adjustments are made to handle single and multiple selection modes, improving code clarity and maintainability. Moreover, add Ctrl + C keybinding.
The commit addresses issue r3bl-org#200 in the Tuify, focusing on changing the return type of the `select_from_list()` function. The modification include updating function parameters and return types, adapting related code in various files, and ensuring compatibility with the new `SelectModeResult` enum. Additionally, adjustments are made to handle single and multiple selection modes, improving code clarity and maintainability. Moreover, add Ctrl + C keybinding.
Note - this is breaking change for existing dependents of this crate. We should have a migration strategy in place for them. Either preserve the existing API and add a new one, instead of this breaking change, or just submit a PR w/ the use of the new API to their repo (eg: ockam).
File:
state.rs
https://github.com/r3bl-org/r3bl-open-core/blob/main/tuify/src/state.rs#L23-L49
selected_items
type to beSelectModeResult
. Please see below.select_from_list
function should return aSelectModeResult
and notOption<Vec<String>>
.Also add support to detect Ctrl+C. The behavior of pressing Ctrl+C is the same as pressing Esc.
The text was updated successfully, but these errors were encountered: