Commit graph

1177 commits

Author SHA1 Message Date
Joshua Horton
7baf8d0b69 change(web): address engine/attachment linter errors 2025-04-29 11:28:28 +07:00
Joshua Horton
f839810cc0 change(web): address engine/osk/gesture-processor linter errors 2025-04-29 11:03:59 +07:00
Joshua Horton
f6134244f2 change(web): address engine/osk linter errors 2025-04-29 11:02:23 +07:00
Joshua Horton
6ba37bc61b change(web): address engine/interfaces linter errors 2025-04-29 10:57:52 +07:00
Joshua Horton
f1ca263da2 change(web): address engine/events linter errors 2025-04-29 10:57:28 +07:00
Joshua Horton
63f6216774 change(web): address engine/element-wrappers linter errors 2025-04-29 10:55:30 +07:00
Joshua Horton
db6b61e8fc change(web): address engine/js-processor linter errors 2025-04-29 10:54:37 +07:00
Joshua Horton
7b1cfe94ff change(web): address engine/dom-utils linting errors 2025-04-29 10:52:35 +07:00
Joshua Horton
e601d59b59 change(web): replace USVString with string in predictive-text engine
Fixes: #12046

It was only ever an alias (for `string`!) for its intended use, with actual `USVString` typing being unavailable in the browser.
2025-04-29 10:47:20 +07:00
Joshua Horton
43eb195ee1 fix(web): patch up detected behavior change 2025-04-29 10:19:38 +07:00
Joshua Horton
e8125898e5 Merge branch 'chore/web/add-string-handling-unit-tests' into refactor/web/eliminate-kmwstring-side-effects 2025-04-29 10:18:54 +07:00
Joshua Horton
b3633ec4d0 feat(web): add additional edge-case unit tests
Co-authored-by: Eberhard Beilharz <eberhard_beilharz@sil.org>
2025-04-29 10:12:10 +07:00
Joshua Horton
a701b97888 fix(web): add robustness for bad touch-layout fontsize specs
Fixes: #13766
Fixes: KEYMAN-WEB-QX

It seems that at some point, Developer has been compiling raw "12" values in the touch-layout JSON as a numeric 12 for the fontsize field.  This clearly happened for the inuktitut_pirurvik keyboard; we should also inspect urdu_phonetic, which has the same raw "12".

This change ensures that Web can handle this case without spewing tons of warning/error messages.  It also adds error-logging to help with diagnosis for any related issue in the future.
2025-04-28 13:25:28 +07:00
Marc Durdin
365bfa48b9
Merge branch 'epic/autocorrect' into chore/merge-master-into-autocorrect 2025-04-24 19:07:47 +07:00
Marc Durdin
9d4214c54c chore: Merge remote-tracking branch 'origin/master' into chore/merge-beta-to-master-release-prep 2025-04-22 13:16:21 +07:00
Joshua Horton
eb7bd3adba chore(web): remove artifacts re: potential method renames 2025-04-22 11:59:16 +07:00
Joshua Horton
9993a33f1b chore(web): remove side-effect field from web-utils package.json 2025-04-22 11:52:44 +07:00
Joshua Horton
dc450cde9e chore(web): finalize removal of side-effect KMWString implementation 2025-04-22 11:40:57 +07:00
Joshua Horton
f8ea902fd9 refactor(web): refactor _kmwCharAt 2025-04-22 11:40:57 +07:00
Joshua Horton
70c1920854 refactor(web): refactor _kmwSlice, _kmwSubstr, _kmwSubstring 2025-04-22 11:40:57 +07:00
Joshua Horton
2cb6e5a191 refactor(web): refactor _kmwIndexOf, _kmwLastIndexOf 2025-04-22 11:40:57 +07:00
Joshua Horton
a53f2dcd10 chore(web): refactor _kmwCharCodeAt 2025-04-22 11:40:39 +07:00
Joshua Horton
418f3d6aec chore(web): update all Web engine uses of kmwLength, kmwCodePointToCodeUnit, kmwCodeUnitToCodePoint 2025-04-22 10:17:07 +07:00
Joshua Horton
4863e95c46 refactor(web): refactor _kmwCodePointToCodeUnit, _kmwCodeUnitToCodePoint 2025-04-22 10:17:01 +07:00
Joshua Horton
f934de23b5 refactor(web): refactor _kmwLength 2025-04-22 10:16:54 +07:00
Joshua Horton
b368f5fe6a refactor(web): refactor _kmwNextChar, _kmwPrevChar helpers 2025-04-22 10:16:47 +07:00
Joshua Horton
e5a5305946 chore(web): drop .only from test suite 2025-04-22 09:12:35 +07:00
Joshua Horton
be15fc1c3f chore(web): add unit tests for SMP-aware string-handling helper methods 2025-04-21 13:09:01 +07:00
Joshua Horton
cdda6e8ce5
Merge pull request #13646 from keymanapp/fix/web/match-osk-and-banner-font-scaling
fix(web): match banner font scaling to osk font scaling
2025-04-21 09:10:48 +07:00
Joshua Horton
5b14b858fb chore(web): replace kmwFromCharCode with its ES6 equivalent 2025-04-21 08:36:59 +07:00
Marc Durdin
4f829f5c8f chore: Merge remote-tracking branch 'origin/master' into chore/merge-beta-to-master-b18s5 2025-04-21 07:13:35 +07:00
Joshua Horton
34a58ca9f9 fix(web): base key should emitted even if at reset-recentering trigger 2025-04-07 13:31:00 +07:00
Joshua Horton
b96cdf1e0f chore(web): remove dead methods regarding keyboard state 2025-04-04 15:07:08 +07:00
Eberhard Beilharz
c1683b4be2
chore(web): improve error logging
Previously logging an error resulted in two Sentry issues to be created.
This change now combines the log message and the error into one call to
`console.error`, thus resulting in only one Sentry issue being created.
2025-04-03 16:35:09 +02:00
Joshua Horton
970db6f823 chore(web): one more clean-up nit 2025-04-03 15:49:39 +07:00
Joshua Horton
41106a1d85 chore(web): code cleanup per review 2025-04-03 15:47:03 +07:00
Joshua Horton
8a6f5ac8ab fix(web): prevent div-by-zero potential from prior commit 2025-04-03 08:12:02 +07:00
Marc Durdin
cafa503124 chore: use explicit node: prefix on more module imports 2025-04-03 08:10:50 +07:00
Joshua Horton
831ca4eeaf fix(web): add banner font downscaling
Fixes: #13644

The banner should also double-check the height of its suggestions, applying downscaling where needed to ensure the suggestions' text does not flow out of bounds.  Additionally, if the main keyboard body's keys required downscaling due to text height, this will likely also result in similar scaling for the suggestions.
2025-04-02 13:15:24 +07:00
Joshua Horton
426e3d1d3a fix(web): apply layout font-scaling to banner
When a keyboard's layout specifies font-upscaling, that scaling should also be applied to the banner.  This was not previously being done, which could lead to font-size discrepancies between the two (as noted with `khmer_angkor` in the base issue).
2025-04-02 13:15:20 +07:00
Marc Durdin
0db2d7b7d6
Merge branch 'epic/autocorrect' into chore/merge-master-into-autocorrect 2025-03-31 12:13:34 +07:00
Joshua Horton
eae55e4fa1 fix(web): remove extra px offset from last OSK row
Fixes: #13620

Turns out there was actually a final-row pixel offset being applied for the OSK.  I _believe_ this was something originally done for touch-oriented OSKs that ended up applied to all during 17.0's OSK refactoring efforts.

kmwosk.css does define layer-group padding above and below (1 px each) for touch keyboards already.  Furthermore, things look fine when removing this extra 1px offset on the bottom from the last row.  I think we're fine to just drop this minor offset and move on for now.
2025-03-31 10:41:50 +07:00
Joshua Horton
71df37930f
Merge pull request #13360 from keymanapp/feat/web/gesture-error-traces
feat(web): adds gesture 'traces' for warning/error logging
2025-03-19 08:13:48 +07:00
Joshua Horton
a015fd0296 change(web): context-state logging now oldest to most recent
The gesture traces themselves, within their indentation, maintain stacktrace-style ordering.
2025-03-18 14:19:37 +07:00
Joshua Horton
76a5e067e9 fix(web): unload and load should use consistent, canEnable check
Fixes: #13512
Fixes: KEYMAN-WEB-QD
2025-03-18 14:07:07 +07:00
Joshua Horton
1b8c2d8776
Merge pull request #13359 from keymanapp/fix/web/bksp-auto-cancel-on-new-input
fix(web): cancel held backspace on new key input
2025-03-17 08:39:36 +07:00
Marc Durdin
29f0a20898
Merge branch 'epic/autocorrect' into chore/merge-master-into-autocorrect 2025-03-14 10:57:26 +07:00
Joshua Horton
fba9b236cc fix(web): cancel held backspace on new key input
As identified in the analysis for #13344, held backspaces have not been cancelled when receiving new inputs.  It's better and cleaner to have it act similarly to normal keystrokes - receiving a new key input autocompletes any currently-held output keys.

The current, existing behavior also has the potential to get particularly messy with multitaps, which restore the context at their start.  If a backspace is held and then a multitap begins, each new tap of the multitap would undo the backspaces that triggered since the first tap of the multitap.
2025-02-27 13:00:44 +07:00
Joshua Horton
94827b52b2 feat(web): adds gesture 'traces' for warning/error logging
To facilitate debugging cases where gestures don't work as intended, this adds sanitized logging for keystrokes resulting for gestures.  These are only to be output when a relevant error or warning is emitted.

This is primarily being added to facilitate investigation of #13344.
2025-02-27 12:50:35 +07:00
Joshua Horton
2db8fa089c chore(web): clean a few commented-out vars 2025-02-27 09:36:25 +07:00