Pattern dialogs: Quantity fields get up/down step arrows (#4260) (#4264)

A new kit control, `ui_kit::count_field` / `count_row`, is an expression field for a
whole-number count with stacked step arrows at its right edge. An arrow steps the
evaluated count by one within the field's limits: a plain number is replaced, an
expression keeps its parameters and gains or adjusts a trailing `+ n`. The text
changes as typing changes it, so the live preview follows.

Used by the Quantity rows of the sketch Rectangular (1-500, both directions together
at most 500) and Circular (2-500) patterns, and the solid Rectangular, Circular and
Path patterns (1-1000).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Frank
2026-10-24 04:13:39 +00:00
committed by GitHub
parent fc3e3b6c8d
commit 1fa0371c75
9 changed files with 308 additions and 20 deletions
+2
View File
@@ -24,6 +24,7 @@ preferences, manager cards, prompts, context menus and the sketch palette. Impor
- `expr_row`, `hint_row`, `text_row` and `choice_row` compose `row` with the existing
expression, hinted expression, plain text and dropdown controls. They preserve row order,
labels, focus IDs and completion; callers keep Enter/change ownership and explicit dropdown IDs.
`count_row` composes `row` with `count_field` for pattern quantities.
- `Panel` owns bounded windows, feature/palette composition, scrolling bodies,
pinned actions, compute status and keyboard routing. `wide()` uses three card
widths. `feature_frame` and `palette_frame` retain docked/floating surfaces.
@@ -88,6 +89,7 @@ table. Panel/Window/Confirm compositions also have dedicated geometry and intera
| `text`, `Text` | Hint, note, report, inline or cell text; see variants below | `font_small/label`, `text/dim/error`, `control_height`, `space_4` |
| `text_lines` | Virtualized read-only licence/report lines, horizontal overflow | `font_small`, `text`, `control_height` |
| fields: `field`, `hint_field`, `focused_field` | Expression editors, optional empty hint or retained focus; returns accepted Enter | `control_height/fill`, `form_inset`, `font_label` |
| `count_field`, `Count` | Expression editor for a whole-number count (a pattern's quantity) with up/down step arrows at its right edge. `Count` gives the limits and the evaluator (the design's parameters); an arrow steps the evaluated count by one within them, replacing a plain number or adjusting an expression's trailing `+ n`, and is dimmed when it can't step. Handles `dialog:<row> up` / `down`; returns accepted Enter | field tokens, `control_border`, `control_radius`, `selected_bg`, `form_ink/dim`, `space_4` |
| `text_field`, `focused_text_field` | Plain name editor, optionally retaining focus | field tokens |
| `multiline_text_field` | Three-line plain-text row with stable focus ID | field/row tokens |
| `password_field` | Stable secret editor; excludes the secret from scenario/accessibility metadata | field tokens |