feat(cli/unstable): add visibleLines and indicator options to promptMultpleSelect, and show ... above the options when appropriate#6699
Conversation
... with up and down arrows... more content indication with up and down arrows
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6699 +/- ##
=======================================
Coverage 94.14% 94.15%
=======================================
Files 585 585
Lines 42262 42361 +99
Branches 6654 6681 +27
=======================================
+ Hits 39788 39883 +95
- Misses 2425 2429 +4
Partials 49 49 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Is this way of indicating 'more content' common in general? What do other tools do for this situation? cc @WasixXD |
|
Some tools just loop over (like Inquirer select) and others don't even bother, but I find the arrows a nice fit |
|
I personally prefer ↑ and ↓ in this context feel confusing to me. (I don't remember the use case where ↑ and ↓ indicating 'more contents') |
The arrows have the additional benefit of not just indicating |
I think that situation can be covered by showing |
... more content indication with up and down arrowsvisibleLines and indicator options to promptMultpleSelect, and show ... above the options when appropriate
kt3k
left a comment
There was a problem hiding this comment.
Confirmed this nicely wraps the options. LGTM
|
Added some examples to demonstrate both patterns (full and partial) of displaying options |
…omptMultpleSelect`, and show `...` above the options when appropriate (denoland#6699)
…omptMultpleSelect`, and show `...` above the options when appropriate (denoland#6699)
After trying the api,
...seems not too intuitive, nothing indicates if there is more content above.This PR changes the more content indication
...to a↓arrow and additionally it indicates if moving up is possible with a↑arrow. It also addsindicatorandvisibleLinesproperties topromptMultipleSelect().What country are you from? ❯ Brazil United States Japan ↓...
What country are you from? ↑ United States Japan ❯ China ↓...
What country are you from? ↑ China Canada ❯ Spain