Skip to content

feat: add auto-capitalization toolbar and JSON toggles - #578

Merged
LeanBitLab merged 1 commit into
LeanBitLab:mainfrom
AsafMah:asafmah-auto-cap-toolbar-toggles
Oct 1, 2026
Merged

LeanBitLab merged 1 commit into
LeanBitLab:mainfrom
AsafMah:asafmah-auto-cap-toolbar-toggles

Conversation

@AsafMah

@AsafMah AsafMah commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Add optional Auto-capitalization and Force auto-capitalization controls for the toolbar, pinned keys, and custom JSON layouts/popups:

  • {"label":"auto_cap"} / TOGGLE_AUTO_CAP (-10079)
  • {"label":"force_auto_caps"} / TOGGLE_FORCE_AUTO_CAPS (-10080)

Both toggle the existing saved Text correction preferences through the common keyboard action listener. The controls immediately refresh automatic shift and toolbar/pinned state while preserving explicit one-shot Shift, Caps Lock, selection, the composing word, pending correction, and per-app autocorrect overrides. Existing toolbar order/remaps are retained and the new entries start disabled. Keywords follow toolbar remaps; explicit numeric codes retain their fixed actions. The force keyword is plural only.

All three icon styles are supported. Highlights reflect effective enablement; accessible state descriptions distinguish off, on, saved-on while the master Auto-capitalization setting is off, and saved-on in a language without uppercase letters. Turning the master off does not clear the saved force preference.

This exposes existing settings; it does not change capitalization policy, correction ranking, or the existing autocorrect action. No dependency, minimum-SDK, branding, or unrelated feature changes. The feature/keycode guide is updated.

Validation

  • Test-first: all 20 new cases failed on missing controls before implementation, then passed on API 32 and 35. They exercise real toolbar/pinned click dispatch, immediate state/shift refresh, manual Shift/Caps Lock preservation, input/selection/correction preservation, icons, saved/effective accessibility states, toolbar preference upgrades, JSON keywords/numeric codes/popups/remaps, and keycode uniqueness.
  • Final :app:testStandardDebugUnitTest selecting all helium314.keyboard.latin.InputLogicTest cases plus helium314.keyboard.ParserTest.caps*: 110 tests, 109 passed, 0 failed, 1 pre-existing ignored Hangul test (insertLetterIntoWordHangulFails).
  • :app:externalNativeBuildStandardDebug passed for arm64-v8a and armeabi-v7a; :app:compileOfflineDebugKotlin passed.
  • Broader run of both complete affected classes: 156 tests, 147 passed, 8 failed, 1 ignored. All eight failures are existing parser layout-asset lookup failures (LayoutUtils.getContent, NoSuchElementException) on this Windows/Robolectric host. A clean run on unchanged upstream 65a6e782276b25ff1065e66e9dda7a60f31cfd71 reproduced the same eight test names and errors (46 baseline parser tests versus 50 after this change). No production asset workaround or additional test skip was added.

The new integration cases run against Robolectric views and the common action path; no device installation or full APK handoff was performed.

Toggle the existing saved capitalization preferences from optional toolbar, pinned and custom layout controls. Refresh effective state immediately while preserving manual Shift, Caps Lock, composition and selection. Add accessible saved-but-inactive states and regression coverage.

Adapted from 0e8232e33a6e3043839fa0c1c2cfddfda02926f0 onto current upstream without fork-only feature dependencies.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@LeanBitLab

Copy link
Copy Markdown
Owner

i can do some of it, but not all, ill check again

@LeanBitLab

Copy link
Copy Markdown
Owner

i can do some of it, but not all, ill check again

hmm actually i completely understand the scenario where it helps

@LeanBitLab

Copy link
Copy Markdown
Owner

ill merge it on 4.2.8 beta

@LeanBitLab
LeanBitLab merged commit d988e49 into LeanBitLab:main Oct 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants