Commit graph

76 commits

Author SHA1 Message Date
Marc Durdin
21c5cdb111 chore(common): make first parameter required 2022-04-01 16:47:56 +11:00
Marc Durdin
b7ce99480f feat(web): prediction casing follows current layer
Fixes #6455.

This involved adding an extra hint to the data passed into the lexical
model layer, being the CasingForm that the current layer wants to use.

Given there are several entry points to the lexical model layer, this
meant a few places where we needed to check the current layer.

I refactored the very long function `InputProcessor.processKeyEvent` to
extract out the `buildAlternates` function. There should be no
functional changes to the `buildAlternates` code. But it makes
`processKeyEvent` significantly easier to read.
2022-04-01 16:20:50 +11:00
Marc Durdin
d33401c033 chore(web): fixup InputProcessor tests 2022-04-01 08:55:55 +11:00
Marc Durdin
c0f29861ac fix(web): track stateKeys changes with layer changes
Fixes #6405.

If the layer is reset to default, e.g. by switching fields, then the
state key bitmask was not always kept in sync with the layer change.
2022-03-31 14:08:33 +11:00
Marc Durdin
b23df3fbc8 feat(web): &newLayer and &oldLayer
Fixes #6364.

Removes `&layerChanged` and adds `&newLayer` and `&oldLayer` system
stores with the additional nuances around values as described in #6364.
2022-03-13 08:29:15 +11:00
Marc Durdin
addcad9f76 fix(web): further selection tweaks to mocks 2022-02-23 15:12:23 +11:00
Marc Durdin
ac2cc93f2a fix(web): add readonly mode for rule behavior finalization
Relates to #5853.

Two things happened here:

1. Construction of Mocks made an assumption that the selection should
   always be deleted (outputTarget.ts:363). However, for NewContext and
   PostKeystroke processes, we don't want to change anything.

2. Even if nothing is changed, the transcription would emit what is
   in theory a no-op ruleTransform (insert="", deleteLeft=0,
   deleteRight=0). But apps would treat this as deleting the selection.

This fix goes a little broader than I would have preferred, but adds a
readonly mode to the transcription and mock model, so that we can
control explicitly when changes are applied to the text store.
2022-02-22 10:42:20 +11:00
Marc Durdin
5e65120b3f fix(web): call postKeystroke on banner touch
Relates to #3621.

Ensures that the `begin postKeystroke` entry point is called when the
user accepts a suggestion.
2021-12-03 14:13:43 +11:00
Marc Durdin
1683998999
Update common/core/web/input-processor/src/text/inputProcessor.ts
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2021-11-30 12:54:31 +11:00
Marc Durdin
ce2aa9a166 feat(web): support for &layerChanged
Relates to #3621.

Add support for `&layerChanged` system store. This store is set to `1`
before a `begin postKeystroke`, if the keystroke it follows resulted in
a layer change, either programatically through a keyboard rule, or
through a `nextlayer` property of the touched key.
2021-11-24 06:45:20 +11:00
Marc Durdin
f5fc41712d feat(web): add support for begin postKeystroke
Relates to #3621.

This adds support for `begin postKeystroke` to KeymanWeb. This is now
close to final, apart from support for `&layerChanged`.
2021-11-23 16:56:16 +11:00
Marc Durdin
dcedb15b69 chore: cleanup comments and defines 2021-11-23 16:08:19 +11:00
Marc Durdin
bbbf1afce7 feat(web): basic support for newContext
Relates to #3621.

Adds basic support for `begin newContext`.
2021-11-23 15:00:47 +11:00
Joshua Horton
a6c3e0a5fa
Merge pull request #5456 from keymanapp/fix/web/state-key-management
fix(common/core/web): OSK state-key management
2021-07-27 11:23:56 +07:00
jahorton
1125b368f8 change(common/core/web): removes conditional replacement of a now always-truthy 2021-07-22 10:39:32 +07:00
jahorton
fd940cb618 change(common/core/web): adjustments per review 2021-07-22 10:36:36 +07:00
jahorton
1c8689b404 fix(common/core/web): fixes likely root of problem 2021-07-22 08:22:28 +07:00
jahorton
b414455c23 fix(common/core/web): adds empty-array check for alternates 2021-07-21 11:36:09 +07:00
jahorton
3302ce56f1 chore(web): another PR suggestion 2021-07-12 05:32:13 +07:00
jahorton
b3c70bf724 fix(web): state key management 2021-07-09 14:59:33 +07:00
jahorton
d43c6c7f7b change(common/core/web): tweaks from PR comments 2021-06-24 08:28:10 +07:00
jahorton
10de0ae700 change(common/core/web): use of shorter arrow func from comment 2021-06-23 08:30:15 +07:00
jahorton
727f607827 change(common/core/web): thresholding Date.now() -> performance.now() 2021-06-23 08:28:37 +07:00
jahorton
2e0dff8594 feat(common/core/web): alternate generation uses windowed context, not full 2021-06-21 14:47:14 +07:00
jahorton
5e57840489 feat(common/core/web): adds basic time + prob thresholding for modeled fat-fingers 2021-06-21 11:04:07 +07:00
jahorton
b6424095ae docs(common/core/web): function docs improvement 2021-06-09 09:31:39 +07:00
jahorton
6c782705f2 refactor(web): removes Ltarg from KeyEvent, adjusts core to match 2021-05-28 12:44:03 +07:00
jahorton
fe90f3bb35 fix(common/core/web): prediction banner display's reliance on mayPredict 2021-03-18 08:24:08 +07:00
jahorton
355f1b4d82 fix(ios): invalidateContext no longer predicts when prediction deactivated 2021-03-18 08:08:20 +07:00
jahorton
28ed690fe2 chore(common/models): Merge branch 'beta' into feat/common/models/mid-context-suggestions 2021-02-25 09:16:45 +07:00
jahorton
4618dce6a0 docs(common/core/web): addresses PR review comment 2021-02-24 09:02:26 +07:00
jahorton
f20388d956 fix(common/core/web): core key-processing returns 2021-02-23 11:55:06 +07:00
jahorton
2b999d6274 fix(common/models): fixes reversion application 2021-02-05 09:33:28 +07:00
jahorton
b0f1046e40 change(web): minor polish tweaks 2021-01-29 11:34:21 +07:00
jahorton
78c7821f9f change(web): banner display no longer deferred 2021-01-29 11:31:56 +07:00
jahorton
531c6f76c8 change(web): set -eu for web scripts 2021-01-27 14:29:16 +07:00
jahorton
6d111783e3 fix(common/core/web): predictive context reset 2020-12-03 15:48:18 +07:00
jahorton
25277eaa0e chore(common/core/web): Merge branch 'master' into feat/common/core/web/input-processor-unit-tests 2020-11-10 08:27:15 +07:00
jahorton
69277feec1 feat(common/core/web): dynamically compiled model in auto test 2020-11-06 16:10:18 +07:00
jahorton
016b0587f2 feat(common/core/web): inputProcessor init tests 2020-11-06 09:57:46 +07:00
Joshua Horton
c929713bb5
Merge pull request #3726 from keymanapp/feat/common/core/web/simplify-corrective-distribution
feat(common/core/web): simplify corrective distribution
2020-10-26 10:39:45 +07:00
jahorton
aeb944a803 change(web): addresses PR reviews 2020-10-26 08:16:39 +07:00
Joshua Horton
e501f359fb
Merge pull request #3701 from keymanapp/feat/common/core/web/block-fat-finger-beeps
feat(common/core/web): fat-finger ignores inputs that beep
2020-10-22 15:12:55 +07:00
jahorton
aa5882536d fix(common/core/web): normalization at wrong nesting level 2020-10-20 09:59:25 +07:00
Joshua Horton
6efb6d23be
Merge pull request #3685 from keymanapp/feat/common/models/context-reversion
feat(common/models): context reversion modeling
2020-10-20 08:42:07 +07:00
Joshua Horton
207b6b85f4
Merge pull request #3663 from keymanapp/feat/common/models/acceptance-context-tracking
feat(common/models):  context tracking of accepted Suggestions
2020-10-20 08:41:46 +07:00
jahorton
219fdac677 fix(common/core/web): fixes revert event bug 2020-10-16 09:10:02 +07:00
jahorton
f272efdeca feat(common/core/web): selective wordbreak swallowing after accepted suggestion 2020-10-12 15:33:40 +07:00
jahorton
1ea426779b feat(common/core/web): fat-finger ignores inputs that beep 2020-10-12 13:13:56 +07:00
jahorton
934f594297 feat(common/models): adds LMLayer reversion unit tests 2020-10-09 15:47:46 +07:00