diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-28 00:03:26 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-28 00:03:26 -0500 |
| commit | 1288c2af084fb9ce09bd8807a30291821b39f7b3 (patch) | |
| tree | fd9b4bdb0b25ac474cc6fc3dd72be9be485b840c /tests/test-pearl-compose.el | |
| parent | 3c41d3b6fcfb3bfa3cff627535685b9ecfe82a00 (diff) | |
| download | pearl-1288c2af084fb9ce09bd8807a30291821b39f7b3.tar.gz pearl-1288c2af084fb9ce09bd8807a30291821b39f7b3.zip | |
feat(filter): show "[ None. ]" as the topmost option in builder prompts
The builder's state / project / team / labels / assignee prompts each relied on the "empty input means no constraint" convention, with a parenthetical hint in the prompt label ("Team (empty for any):"). The convention is invisible, has to be remembered, and reads as a non-choice rather than a choice. Now every prompt carries `pearl--filter-none` ("[ None. ]") as the first candidate and uses `require-match` so the user picks from the list. Selecting the sentinel is the same logical opt-out as empty input was, but the choice is on screen rather than in the user's head.
Two small helpers (`pearl--with-none`, `pearl--filter-none-value-p`) and one defconst keep the sentinel string in one place. The prompt labels lost their parenthetical hints since the affordance is now in the candidate list. Five unit tests cover the sentinel predicate and the list helper across the normal / boundary / "real value" cases.
The pattern generalizes well past the builder: any time pearl prompts the user to pick between a value and "no value," the no-value option belongs in the list, not hidden behind empty input.
Diffstat (limited to 'tests/test-pearl-compose.el')
0 files changed, 0 insertions, 0 deletions
