From 730d7159e3b9b3adfba2c3779893fdb4e107647a Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Sat, 19 Sep 2026 22:49:06 +0200 Subject: tui: form fields on the row-table screen; home/end/pgup/pgdn navigation --- docs/TUI-GUIDELINES.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'docs/TUI-GUIDELINES.md') diff --git a/docs/TUI-GUIDELINES.md b/docs/TUI-GUIDELINES.md index 276cfd9..e02fade 100644 --- a/docs/TUI-GUIDELINES.md +++ b/docs/TUI-GUIDELINES.md @@ -73,13 +73,21 @@ written compactly as `^N`, `^A`, `^C`, `^R` to save width. - Row tables: always exactly one empty trailing row; entering data appends a new empty row; an empty row followed by another empty row collapses. `Ctrl+X` clears the selected row. `Tab` walks the editable cells and wraps - to the next row's first cell (`Shift-Tab` back). A dim footer callback may - show derived lines (balance, attachment list) directly under the table. + to the next row's first cell (`Shift-Tab` back). A dim footer callback + shows one derived line (balance, attachment list) on its own row above the + hints (`LINES-2`), never over a table row; `\n` in the text becomes a + space. - Fields with `mask` set are shown as `*` (`tui_form_field.mask`); used for passwords. ACTION fields show their `value` when set, else `(lista)`. -- Header fields plus rows: the header is a `tui_form_run`, the rows a - `tui_rt_run`. Editing a header field hands over to the row table; `Esc` in - the table goes back to the header. `F5`/`Ctrl+Enter` work in both stages. +- Header fields plus rows: one `tui_rt_run` with `tui_rt_set_fields` draws + the fields above the table on the same screen. Focus starts on the first + field; `Tab`/`Shift-Tab` walk fields, then the cells row by row, and wrap + back to the first field. `Up`/`Down` move between fields (in the table + they change row). `Enter` opens the field's editor (text/date/amount/ + choice) and advances to the next field; `Esc` cancels the editor without + changing anything. Typing a printable character hands the focus to the + first table cell and inserts it there, so rows can be entered without + touching the header. `F5`/`Ctrl+Enter`/`Esc` work the same from both. - Validation: `F5` validates without writing and reports exactly what is wrong (field, row number). Server `dry_run` is used where available. - Saving: `Ctrl+Enter` writes, shows a confirmation message, and returns to -- cgit v1.3