Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

autocompleteMultiselect: contextual ESC to clear filter before cancelling

オープン
#519 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript
領域
cli

調査の方向性

@clack/prompts と @clack/core の autocompleteMultiselect および autocomplete エントリーポイントから開始し、フィルターにテキストがある場合と空の場合で ESC がどのように処理されるかを追跡してください。関連する既存のテストを確認し、ESC で空でないフィルターを選択状態を失わずにクリアでき、フィルターが空の場合は引き続きキャンセルされれば、作業完了とみなしてください。

索引モデルが issue の本文から書いたものです。

説明

Hey, small UX suggestion for autocompleteMultiselect (and autocomplete).

When you've typed a long filter string and want to clear it, the only option right now is holding backspace until it's gone. Pressing ESC bails out of the prompt entirely, which loses the work in progress (any tab-toggled selections, etc).

Could ESC be made contextual? Something like:

  • If the filter input has text → clear it
  • If the filter input is already empty → cancel (current behavior)

This is what fzf does, and it's also how browser address bars and most "type-ahead" UIs handle it — a single ESC tap to clear is intuitive and saves you from holding backspace through a 30-character query you no longer want.

Backspace-per-char is fine for short stuff but starts to grate when you're refining filters across a long list. In my use case I'm pruning 150 git branches via autocompleteMultiselect, and being able to filter, tab a few items, clear, filter again would feel a lot more natural than holding backspace each time.

Happy to look at a PR if it's a direction you're open to. Mostly wanted to surface the suggestion first since changing ESC semantics could surprise people who rely on the current behavior.

Versions: @clack/[email protected] / @clack/core@latest

主要言語
TypeScript
スター
8.1k
フォーク
218
平均マージ
1日 23時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bombshell-dev/clack のほかの issue

bombshell-dev/clack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。