Make ockam node delete
(no args) interactive by asking the user to choose from a list of nodes to delete (tuify)
#6450
Labels
Component: Command
hacktoberfest
Apply to issues you want contributors to help with
help wanted
Type: User Experience
Current behavior
When a user runs
ockam node delete
without any arguments, currently they are prompted to delete the default node. Here's a screenshot of this.Desired behavior
Instead of deleting the default node, change the behavior of this command so that it becomes interactive with the user. Note that this can only be allowed to happen if:
--no-input
or--quiet
flags have not been passed, and,This what the user flow should look like in interactive mode.
Use the tuify crate's
select_from_list()
function to ask the user to select from a list of node names. They should be able to make multiple selections. If there are none, then simply display a message saying that none exist (not an error) and exit.Once the user has made their selection(s), display a confirmation prompt letting the user know that that a destructive operation is about to take place with the node names they have selected. Use
select_from_list()
to display this prompt. They should be able to make a single selection.If they choose "YES", then delete each selected node, and display a success / failure message for each node that got deleted.
Implementation details
Cargo.toml
file here by adding this liner3bl_tuify = "0.1.16"
to the[dependencies]
section.select_from_list()
in the tuify crate here. Here is an example that is very similar to the steps you might have to take for this issue.ockam node delete
command is implemented.We love helping new contributors! ❤️
If you have questions or need help as you explore, please join us on Discord. If you're looking for other issues to contribute to, please checkout our good first issues.
The text was updated successfully, but these errors were encountered: