Harden UI layout for font scale and long strings
Full build / Import + headless tests (push) Successful in 36s
Full build / Full desktop build + optional release (push) Skipped

- Measure and cap the HUD target chip after each font-scale change; clip HUD top labels.
- Ellipsize long action-button labels so panels cannot grow past the viewport.
- Add accessibility/button layout assertions and refresh the gallery captures.
- Record the font/layout pass in TODO, docs, changelog and memory.
This commit is contained in:
Gig Line Dev committed 2026-11-02 16:23:46 +01:00
1 parent 26e6dd6413
commit f6aa26e6ca
20 files changed
+69 -7

No files matched your search

+18 -3
View File
@@ -1,6 +1,6 @@
# UI copy and button inventory
Status: dialogue, button-state, focus and modal-close passes complete; layout/end-to-end audit in progress for 0.9.3.
Status: dialogue, button-state, focus, modal-close and font/layout passes complete; destructive-action and end-to-end audit in progress for 0.9.3.
## Screen inventory
@@ -88,7 +88,7 @@ silent profiles can still return an empty context line.
| Tutorial / Help | The wheel verb is **Ask**, but help and the HUD key strip called it “polite direction”. | Both now say **Ask**; the tutorial tells the player to choose Ask after closing the panel. |
| Review / campaign | Continue/return/quit labels and campaign-next copy checked. | No ambiguity found; no change. |
| Repetition | Shared tourist/confused/delivery lines recur across venues by design; role-specific reason lines prevent every archetype sounding alike. | Accepted for the shared-archetype model. |
| Localization length | Longest authored NPC/door line is 56 characters; longest UI string is `hud.controls` at 172 characters. | Dialogue fits the HUD log; the 1.5–2× string/font-scale layout test remains a separate 0.9.3 task. |
| Localization length | Longest authored NPC/door line is 56 characters; longest UI string is `hud.controls` at 172 characters. | Dialogue fits the HUD log; long-string/font-scale layout is covered below. |
## Button state audit
@@ -152,10 +152,25 @@ resumes; `_show_start_menu()` keeps the pointer visible at the menu.
The session smoke now covers menu → Settings → Cancel → menu, Help closing on
right-click, and Settings cancel from pause leaving the guard unfrozen.
## Font-scale and long-string layout
The HUD scale is tested at its **0.75×** and **1.75×** bounds. HUD top/time labels
clip instead of crossing into each other, and the target chip now measures the
scaled target text: normal long names widen the chip, while an extreme synthetic
name is capped at 420 px and ellipsized. Action-button labels use `clip_text` and
ellipsis in `UiStyles`, so a 1.5–2× pseudo-string cannot push a panel beyond the
viewport. The menu shell intentionally keeps its own fixed typography; the HUD
scale setting only changes HUD text.
Regression coverage lives in `test_accessibility.gd` (target-chip width/cap) and
`test_ui_buttons.gd` (long action-label minimum width). The pseudo-locale
translator workflow remains a 0.10.0 task; this pass uses deterministic long
strings and the maximum supported HUD scale.
## Remaining audit work
- Player-facing labels are now routed through `content/strings.en.json`; numeric
values, empty-state clears and debug-only text remain in code by design.
- Focus/hover/pressed/disabled states and keyboard/gamepad rings are recorded above.
- Test long strings and 1.75x HUD font scale.
- Long strings and 0.75×/1.75× HUD scale are covered above.
- Capture every dialog/button state and run `screen_designs.py compare` plus the pinned judge.