Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Request] text: Add 'help' key to provide prompt description to the user

Aperta
#135 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Inizia tracciando l’implementazione del prompt di testo e il modo in cui vengono renderizzate le relative opzioni di messaggio e segnaposto; l’issue non indica file o test del repository. Il lavoro è completato quando un’opzione di aiuto dedicata fornisce testo attenuato e allineato al prompt, con righe a capo che mantengono l’allineamento, senza usare i caratteri di nuova riga del messaggio né il comportamento del segnaposto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Could you suggest the best way to provide a legend/help text under the main prompt? Could be that it already exists, but I wasn't able to find it. I tried with a new line within message, which probably would work for small things:

name: () => text({message: 'What is your name?\nDon\'t lie!'}),

but is not really a good solution for a couple of reasons.

image

I tried the placeholder option, but it is definitely meant for editable inputs, and not for what I'm after

image

Would be best to have a hassle-free way of:

  • aligning the hint with the main prompt
  • wrapped text should also stay aligned with the main prompt
  • dimmed style by default

The placeholder key is half-way there, I'd say - first line nicely aligned, dimmed out text.

image

It could be under a new key in the options object (help):

name: () => text({
  message: 'What is your name?',
  help: 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque eaque error eum ex, fugiat harum labore laboriosam libero magnam maiores modi natus optio quae quod recusandae repellendus sapiente vero voluptatum.'
}),

Motivation: in extensive flows for which the package might be used, explaining the step and the consequences of user decision, is essential, so that's why it was my first thing I tested here.

Lingua principale
TypeScript
Stelle
8.1k
Fork
217
Merge medio
1g 11h
PR unite (30g)
5

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bombshell-dev/clack

Tutte le issue di bombshell-dev/clack

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.