Skip to content

fix(input,l10n): follow up on the merged input and l10n pull requests - #2480

Open
houko wants to merge 7 commits into
mainfrom
fix/followup-ui-input-text-2
Open

houko wants to merge 7 commits into
mainfrom
fix/followup-ui-input-text-2

Conversation

@houko

@houko houko commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Follow-up review of the input and l10n pull requests the merge train landed. Each section says whether the PR landed intact on main and what this PR changes.

#2041 feat(input): add mapping contexts and vector actions

OK. Code, tests, docs and note are on main; every Actions path that evaluates bindings goes through liveBindings. No change.

#2102 fix(input): select Steam Deck prompt glyphs

Landed, and a later PR extended the fallback chain to Deck, Xbox, generic, keyboard with its own ### Steam Deck section. The merge left a top-level # Steam Deck heading in docs/en/input.md and docs/zh/input.md over a second copy of #2380's SetPaused paragraph. This PR removes the heading and the duplicate paragraph; the Haptic feedback section already documents SetPaused. The one-line # Steam Deck prompts addition to gameui.md was dropped by the merge and is not restored, since input.md covers it.

#2201 feat(input): expose pointer and touch snapshots

Not intact: Actions.Pointer, Actions.Touches and their docs were dropped, and TestPointerAndTouchSnapshots fails on main. Left to the open #2472 (fix/input-snapshots-1702), which restores them; this PR does not touch them.

#2376 feat(input): expose two-finger pan deltas

Landed intact, but GestureRecognizer.Pan was set on each TouchMove and never cleared. A camera reading it each fixed step kept moving by the last delta while the fingers rested, and when two moves arrived between steps only the second was counted. Pan now adds up the moves since the previous Update and is promoted on Update, like the pinch events. Resting fingers give a valid zero delta, and a finger touching down or lifting restarts the accumulation. The test, docs and note are updated, and the new test covers resting fingers, several moves per step and one finger down.

#2378 feat: add pause-aware haptic presets

Landed. The exported PresetHit, PresetHeavyHit, PresetExplosion and PresetEngine had no doc comments; this PR adds them.

#2380 feat(input): suppress haptics while paused

A duplicate of #2378's SetPaused, which merged into the same function. Its test only checked that a rumble emitted before pausing, so it passed with pausing removed. The test now checks that pausing stops the motors, that Play, Rumble and Update emit nothing while paused, and that feedback comes back after SetPaused(false).

#2432 fix(input): restore Actions.WatchLifecycle after integration merge

OK. WatchLifecycle and its regression test are on main.

#2303 feat: add localization pseudo locale

PseudoLocale was documented as preserving placeholders but accented the vowels inside them: "Save {name}" became "[SÅvË {nÅmË}]", and the test asserted that. It now copies {name} placeholders and the escaped braces {{ and }} unchanged, using the rules StripPlaceholders and Catalog.T use, and the test checks the result with ValidatePlaceholders. The docs also claimed the function expands text, which it does not; they now say what it does. The PR said Closes #1423, but it covers none of that issue's acceptance items (expansion ratio, RTL pseudolocale, game check -pseudo, translator notes and maxLength).

#2304 feat(l10n): add locale formatting helpers

FormatNumber grouped Spanish with dots but kept a decimal point (1.234.5), matched locales by string prefix, and grouped the letters of +Inf into +,Inf. It now picks the separators by the language subtag: de, es, it, nl, pt and tr use a decimal comma, and fr uses a space and a comma. NaN and the infinities are written as NaN, ∞ and -∞. FormatDuration wrote a negative duration as -1m -5s and now writes -1m 5s. The tests cover these cases.

#2306 feat: add rtl layout primitives

MirrorRect(containerWidth, x, width) duplicated the existing MirrorX(x, width, containerWidth, dir) with the arguments in another order. Nothing used it, so it is removed; the docs and note point to MirrorX. ReadingOrder panicked on a negative count and now returns nil. The merge dropped the gameui pointer to these helpers, so it is restored as a short section that says gameui does not mirror yet. On the l10n page, the RTL sentence had landed under CSV exchange and a heading was glued to the end of a paragraph; both are fixed. The PR said Closes #1426, but the issue asks for Root.Direction and mirrored containers in gameui, and none of that is done.

Verification

  • go tool nsgo test ./pkg/l10n/... ./pkg/input/... on the remote build host: every test passes except TestPointerAndTouchSnapshots, which already fails on main and is fixed by fix(input): repair pointer and touch snapshots #2472.
  • go tool nsgo check ./pkg/l10n/... and go tool nsgo check ./pkg/input/... pass.
  • go tool nsgo test ./internal/repocheck/... passes.
  • go run ./tools/changelog check and bun run verify-notes pass.

Screenshots

None.

… paragraph

The merge of #2380 left a top-level "# Steam Deck" heading over a second copy of the Haptics.SetPaused paragraph in docs/en/input.md and docs/zh/input.md, splitting the page under a wrong title; the Haptic feedback section already documents SetPaused and the Game controllers section documents the Steam Deck.
…ses feedback

The RumblePreset constants from #2378 had no doc comments. The pause test from #2380 only checked that a rumble emitted before SetPaused, so it passed with pausing removed; it now checks that pausing stops the motors and that Play, Rumble and Update emit nothing until SetPaused(false).
GestureRecognizer.Pan, added in #2376, was set on each TouchMove and never cleared, so a camera reading it every fixed step kept moving by the last delta while the fingers rested, and when two moves arrived between steps only the second was counted. Pan now adds up the moves since the previous Update and is promoted on Update, like the pinch events, with a valid zero delta for resting fingers; a finger touching down or lifting starts the accumulation again.
PseudoLocale from #2303 was documented as preserving placeholders but accented the vowels inside them, so "Save {name}" became "[SÅvË {nÅmË}]" and the test asserted it. It now copies {name} placeholders and escaped braces with the rules StripPlaceholders and Catalog.T use, and the test checks the result with ValidatePlaceholders.
#2306 added MirrorRect(containerWidth, x, width), which computes what the existing MirrorX(x, width, containerWidth, DirRTL) does with the arguments in another order; nothing uses it, so it is removed. ReadingOrder panicked on a negative count and now returns nil. The gameui pointer to these helpers, lost in the merge, is restored as a short section that says gameui does not mirror yet.
…ormatNumber

FormatNumber from #2304 grouped Spanish with dots but kept a decimal point, matched locales by string prefix, and grouped the letters of "+Inf" into "+,Inf". It now picks the separators by the language subtag (de, es, it, nl, pt and tr use a decimal comma, fr a space and a comma) and writes NaN and infinities as NaN, the infinity sign and its negative. FormatDuration wrote a negative duration as "-1m -5s" and now writes "-1m 5s".
The l10n page had a heading glued to the end of a paragraph, the RTL helpers under CSV exchange, a PseudoLocale paragraph that claimed it expands text, and no final newline. The gesture pan note now records the per-step Pan contract, and the changelog fragment records the fixes in this branch.
@github-actions github-actions Bot added documentation Improvements or additions to documentation pkg/input pkg/l10n area/agents bug Something isn't working size/M labels Nov 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agents bug Something isn't working documentation Improvements or additions to documentation pkg/input pkg/l10n size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant