Giter VIP home page Giter VIP logo

Comments (8)

mikaelmello avatar mikaelmello commented on May 31, 2024 1

I thought it was a great idea and extended a bit: moving the rows one column to the right and putting simple ascii characters (v and ^ to indicate if there are more items below or above. Up until now I've avoided using non-ascii characters in the interface.

It looks good if the page size is large enough but a bit cluttered with small page sizes and the difference in size between "v" and "^" bothers me, here are some examples: https://asciinema.org/a/PUfZvHkio1YWve9lRbxC2cqff

On the other hand, using unicode triangles makes it look a bit better: https://asciinema.org/a/yQtrRCrUqXMhr7IM4t1M8SSAH

Still not feeling really good with the layouts though

from inquire.

VladimirMarkelov avatar VladimirMarkelov commented on May 31, 2024 1

If you even add theming feature, anybody would able to change "arrow" chracters :) Now I am agree that sticking to ASCII makes everything work everywhere and with any font.

I used unicode arrows to emphasize my idea.

from inquire.

VladimirMarkelov avatar VladimirMarkelov commented on May 31, 2024

At this moment I can only suggest this: there is always a space between cursor > and an item. What if replace the space with (for top line) and (for bottom line) when the item is not the very first/last one? E.g, we have list ['First', 'Second', 'Third', 'Fourth', 'Fifth'] and display only 3 items at a time:

>↑Second
  Third
 ↓Fourth

> First
  Second
 ↓Third

It can be done for all lists: regular and checkbox ones.

from inquire.

shimarulin avatar shimarulin commented on May 31, 2024

In my opinion, one column also look good. When we are at the top of the list, there is no "up" triangle, and this place can be occupied by a pointer to an item in the list:

▶ Banana                                                                                                 
  Apple                                                                                                  
  Strawberry                                                                                             
  Grapes
▼ Lemon
  Banana                                                                                                 
  Apple                                                                                                  
▶ Strawberry                                                                                             
  Grapes
▼ Lemon
▲ Apple                                                                                                  
  Strawberry                                                                                             
▶ Grapes
  Lemon                                                                                                  
▼ Tangerine
▲ Grapes
  Lemon                                                                                                  
▶ Tangerine                                                                                              
  Watermelon                                                                                             
  Orange

from inquire.

mikaelmello avatar mikaelmello commented on May 31, 2024

That's an awesome idea, I've implemented it and it looks great.

from inquire.

VladimirMarkelov avatar VladimirMarkelov commented on May 31, 2024

One question: How does it look in case of Banana is not the first and there is something above it?
As far as I understand the idea, If there is anything hidden above or below, the cursor is always in the middle of the list? Correct? If so, that's neat. Good idea!

from inquire.

mikaelmello avatar mikaelmello commented on May 31, 2024

As far as I understand the idea, If there is anything hidden above or below, the cursor is always in the middle of the list? Correct?

Exactly :)

If so, that's neat. Good idea!

Completely inspired on similar libs from other languages!

from inquire.

mikaelmello avatar mikaelmello commented on May 31, 2024

Closed by 5a74c48

from inquire.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.