build-trust / ockam

Orchestrate end-to-end encryption, cryptographic identities, mutual authentication, and authorization policies between distributed applications – at massive scale.
https://ockam.io
Apache License 2.0
4.43k stars 560 forks source link

Make `ockam tcp-outlet show` (no args) interactive by asking the user to choose from a list of tcp-outlets to show (tuify) #6477

Open nazmulidris opened 11 months ago

nazmulidris commented 11 months ago

Current behavior

When a user runs ockam tcp-outlet show without any arguments, currently they are shown an error message & help text. Here's a screenshot of this.

Image

Desired behavior

Change the behavior of this command so that it becomes interactive with the user when no arguments are passed. Note that this can only be allowed to happen if:

This what the user flow should look like in interactive mode.

1) Use the tuify crate's select_from_list() function to ask the user to select from a list of tcp-outlet aliases, at the default node. 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.

2) Once the user has made their selection(s), then run show for each selected tcp-outlets, and display the results of the show command for each tcp-outlets that they've selected.

The following is a video showing a generic user flow that shows the user experience when a user is asked to choose a from a list of "things". Then an action is performed on each "thing". Finally status information is reported for each action that is performed on each "thing". Please note that this flow is not specific to this issue. Image https://asciinema.org/a/612547

Implementation details


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.

Himanshu-370 commented 11 months ago

hey, I would like to try this. Pls assign me!

nazmulidris commented 11 months ago

@Himanshu-370 That's awesome, this is all yours. Please let us know if you have any questions as you explore. You can also ask questions on the contributors discord https://discord.gg/RAbjRr3kds

nazmulidris commented 11 months ago

@Himanshu-370 Since you started working on this issue here's some new information that help you w/ your PR:

Himanshu-370 commented 11 months ago

@Himanshu-370 Since you started working on this issue here's some new information that help you w/ your PR:

Thanks, working on it:)

nazmulidris commented 10 months ago

@Himanshu-370 We made a minor UX (user experience) update to the issue today. Instead of asking a user for confirmation once they've made their selection, we can just skip that and allow them to perform the action. Since the action is not destructive, it results in a better UX for the user.

Lumexralph commented 10 months ago

If this issue is not yet done, please, can you assign it to me?

nazmulidris commented 10 months ago

@Lumexralph It is all yours 👍🏽

Lumexralph commented 9 months ago

@Lumexralph It is all yours 👍🏽

got a PR in for this issue #6968, my next focus will be on the other assigned issue.