Skip to content
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

Split the question type and the application #14

Open
curry684 opened this issue Jun 5, 2020 · 4 comments
Open

Split the question type and the application #14

curry684 opened this issue Jun 5, 2020 · 4 comments

Comments

@curry684
Copy link

curry684 commented Jun 5, 2020

Given that this is the only inquirer plugin afaics that provides a tree based question - how about splitting it up in 2 packages inquirer-tree-selection and on top of that a thin layer for the filesystem?

There are many more applications of trees than just filesystems.

@anc95
Copy link
Owner

anc95 commented Jun 10, 2020

@curry684 thx for your nice advice
I guess sometimes using cascade may work better than tree selection.
but it will be greatly appreciated if you can provide me some situation when you what to use a tree selection in terminal.

@curry684
Copy link
Author

My use case is quite specific, I have a bunch of nested objects which can all be selected (leaves and nodes). Given a simple tree like this:

Root #1
    Child #1
        Subchild #1
    Child #2
Root #2
    Child #3
    Child #4
        Subchild #2

Selecting a target here is just more practical to present in a tree than with up to 3 consecutive questions, especially given that the user may not know beforehand where Subchild #2 resides in my case.

@anc95
Copy link
Owner

anc95 commented Jun 11, 2020

ok, I WILL wrok on it soon.

@curry684
Copy link
Author

That would be awesome :) It was just a suggestion because it seems you've already done all the hard work on showing a tree, splitting it out to have the file tree just as a "data source" to a generic tree handler shouldn't be hard methinks 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants