deno_std icon indicating copy to clipboard operation
deno_std copied to clipboard

BREAKING(cli/unstable): replace `...` more content indication with up and down arrows

Open timreichen opened this issue 6 months ago • 1 comments

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 adds indicator and visibleLines properties to promptMultipleSelect().

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

timreichen avatar May 30 '25 22:05 timreichen

Codecov Report

Attention: Patch coverage is 96.73913% with 3 lines in your changes missing coverage. Please review.

Project coverage is 94.15%. Comparing base (93d103f) to head (0772d51). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cli/unstable_prompt_multiple_select.ts 95.58% 3 Missing :warning:
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           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar May 30 '25 23:05 codecov[bot]

Is this way of indicating 'more content' common in general? What do other tools do for this situation?

cc @WasixXD

kt3k avatar Jun 02 '25 02:06 kt3k

Some tools just loop over (like Inquirer select) and others don't even bother, but I find the arrows a nice fit

WasixXD avatar Jun 02 '25 17:06 WasixXD

I personally prefer ... for indicating 'more contents' which feels more common to me.

↑ and ↓ in this context feel confusing to me. (I don't remember the use case where ↑ and ↓ indicating 'more contents')

kt3k avatar Jun 30 '25 00:06 kt3k

I personally prefer ... for indicating 'more contents' which feels more common to me.

↑ 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 more contents, but also the location. ... seems fine until one scrolls and content gets out of bounds above, which is not very intuitive to me.

timreichen avatar Jul 01 '25 09:07 timreichen

The arrows have the additional benefit of not just indicating more contents, but also the location. ... seems fine until one scrolls and content gets out of bounds above, which is not very intuitive to me.

I think that situation can be covered by showing ... above.

kt3k avatar Jul 02 '25 01:07 kt3k

Added some examples to demonstrate both patterns (full and partial) of displaying options

kt3k avatar Jul 04 '25 07:07 kt3k