imperative
imperative copied to clipboard
Interactive Selection Implementation
Added support for interactive menu selection
I tried this out and it seemed pretty straight forward to use:
A couple ideas:
- can you help with formatting? in the gif, i was struggling to get things to align, and i think other api users would as well
- it might be cool if the api could accept an array of objects where the key became the headers
Thanks for trying it Dan!
can you help with formatting?
To help with the alignment, I believe I've exposes some of the console.format private functions (like formatOutput and such)
Feel free to check out the `interactive-entries-2 branches 😋
it might be cool if the api could accept an array of objects where the key became the headers
Cool idea. One question for you is how to handle missing keys, like:
[ { header1: 123, header2: 456 }, { header1: 234, header3: 789} ]
To help with the alignment, I believe I've exposes some of the console.format private functions (like formatOutput and such) Feel free to check out the `interactive-entries-2 branches 😋
😢 ok I'll go searching for it
Cool idea. One question for you is how to handle missing keys, like: [ { header1: 123, header2: 456 }, { header1: 234, header3: 789} ]
ImperativeError!
To help with the alignment, I believe I've exposes some of the console.format private functions (like formatOutput and such) Feel free to check out the `interactive-entries-2 branches 😋
😢 ok I'll go searching for it
Cool idea. One question for you is how to handle missing keys, like: [ { header1: 123, header2: 456 }, { header1: 234, header3: 789} ]
ImperativeError!
Hey @dkelosky,
I removed the interactive-entries-2 branches. however object[]
is now supported 😋
Here is an example of how to use the API both ways 😋
https://github.com/zowe/zowe-cli/blob/interactive-entries/packages/cli/src/zosjobs/view/interactive-jobs/InteractiveJobs.handler.ts#L36-L57
Very cool feature! Thanks for sharing an example - it looks clean.
Also, I never knew the ??
existed before!
I believe that there are too many changes required for this PR to become ready for review. It might be best to close this and create a new one when/if there's any interest. Also, this could be moved to a plug-in that introduces interaction and animations to the terminal