framework
framework copied to clipboard
Don't use a select widget to select from >10 projects
This should help when deploying projects to workspaces with many projects.
Can I see a screenshot of what this looks like?
| first step | second step |
|---|---|
I'm not sure we need to list all the names like this, as the list might expand into the hundreds or thousands. If we do list them, they should be ordered alphabetically.
This PR allowed me to redeploy a project, so fixes the issue I had. 👍
The UI that I'd really like to have (for both cases) would show a partial list, and allow filtering it by typing. Then once you've narrowed it down you could use arrow keys to select one. Sort of like fzf.
Given that we require them to type a valid slug, I wanted some way to convey the available options. I agree that this version of the UI definitely isn't very elegant in that regard. Maybe we could print the URL to the workspace's project listing instead?
Sorting them would be a good improvement. If we want to keep the list in the CLI, I'll add that.
I just noticed this appears to be fixed in the top-of-trunk version of clack, but that version has not yet been published to npm?
https://github.com/bombshell-dev/clack/pull/174
But despite not happening automatically, it looks like in the latest released version we are using, it can be set manually, so maybe we should just set it to Math.max(process.stdout.rows - 4, 0) as above?
https://github.com/bombshell-dev/clack/releases/tag/%40clack%2Fprompts%400.7.0
Thanks for the review! I didn't realize that was a built-in Clack option. It might take me a little bit to get back to this though.
All good @mythmon. I put up #1618 and if you don’t have time, hopefully @Fil can review.
Closing in favor of #1618