An arrow atom names the arrows and nothing else
Surveying every popup dialog's hint turned up three that said the arrows were something they aren't. The yes/no confirm's "←→/Y/N choose" put a key inside the arrow atom that does not choose at all — Y/N answers outright — and the autocomplete's "↑↓ Tab complete" did the same with Tab, which completes rather than moves. Several keys may share an atom, but only when they do the same thing: "↑↓ PgUp/PgDn scroll" and "Home/End ends" are the shape that is fine. The composer's "←→ cursor" named the wrong thing rather than too much. The cursor in this app is the row ❯ points at, which is what ↑↓ moves there; the arrows move the insertion slot along the path, and "slot" is the word the rest of the app already uses for it. The confirm takes the ButtonDialog hint verbatim rather than a longer one of its own — a yes/no prompt is a button row like any other, and its y/n accelerators are already hinted by the Yes/No labels. It reads the same everywhere now, and the Esc verb stops falling off the end of the box on a 53-column console. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
7407358ede
commit
d28240f658
3 files changed
+20
-3
No files matched your search
@@ -193,6 +193,15 @@ as a grouped list does. Filling a page in is editing its `.md`; no Python follow
|
||||
both platforms.
|
||||
- Key notation: `↑↓ move` (include the verb), `^R`/`^End` for Ctrl chords, `⌫` for
|
||||
backspace, `⇧` for shift.
|
||||
- An **arrow atom** leads the hint and names only the arrows: what they do (`↑↓ move`,
|
||||
`←→ choose`, `↑↓ newer/older`) or what they move (`←→ slot`). Several keys share one
|
||||
atom only when they do the same thing — `↑↓ PgUp/PgDn scroll`, `Home/End ends`; a key
|
||||
that does something *else* gets its own, which is what `←→/Y/N choose` and `↑↓ Tab
|
||||
complete` had wrong (Y/N answers, Tab completes, neither is what those arrows do). The
|
||||
subject must be the right one, too: *cursor* is the row `❯` points at, so the composer's
|
||||
←→ moves its `slot`. Every button dialog carries the same hint,
|
||||
`←→ choose · Enter select · Esc cancel` — a yes/no prompt is a button row like any
|
||||
other, so its y/n accelerators ride its `Yes`/`No` labels rather than the line.
|
||||
|
||||
### Dialogs
|
||||
|
||||
|
||||
@@ -142,7 +142,11 @@ class PathComposerScreen(Screen):
|
||||
|
||||
#: The composing keys, in the hint grammar's navigation-then-actions-then-Esc order.
|
||||
#: Esc's verb is the only part that moves — see :attr:`footer_hint`.
|
||||
_HINT = "↑↓ move · ←→ cursor · Enter add · type to filter · ⌫ remove · Esc cancel"
|
||||
#: ``←→ slot``, not ``←→ cursor``: this app's *cursor* is the row the ❯ points at,
|
||||
#: which is what ↑↓ moves here — the arrows move the **insertion slot** along the path
|
||||
#: being built, the app's own word for it (and the one thing besides the row cursor
|
||||
#: that wears the selection white).
|
||||
_HINT = "↑↓ move · ←→ slot · Enter add · type to filter · ⌫ remove · Esc cancel"
|
||||
|
||||
@property
|
||||
def footer_hint(self) -> str: # type: ignore[override]
|
||||
|
||||
@@ -432,7 +432,11 @@ class ConfirmScreen(_KeylessDialog):
|
||||
title: str,
|
||||
*,
|
||||
default: bool = True,
|
||||
footer_hint: str = "←→/Y/N choose · Enter select · Esc cancel",
|
||||
# The ButtonDialog hint verbatim: a yes/no prompt is a button row like any other,
|
||||
# and the row is what differs, not the keys. The y/n accelerators stay unwritten —
|
||||
# the Yes/No labels are their own hint, and naming them cost the Esc verb its
|
||||
# cells inside a PicoCalc-width box.
|
||||
footer_hint: str = "←→ choose · Enter select · Esc cancel",
|
||||
) -> None:
|
||||
"""Build a confirm prompt.
|
||||
|
||||
@@ -757,7 +761,7 @@ class AutocompleteScreen(_KeylessDialog):
|
||||
prompt: str = "",
|
||||
default: str = "",
|
||||
validate: Optional[Validator] = None,
|
||||
footer_hint: str = "type · ↑↓ Tab complete · Enter accept · Esc cancel",
|
||||
footer_hint: str = "↑↓ move · Tab complete · Enter accept · Esc cancel",
|
||||
) -> None:
|
||||
"""Build an autocomplete prompt.
|
||||
|
||||
|
||||
Reference in new issue
Block a user