Commit graph

1990 commits

Author SHA1 Message Date
Marc Durdin
e1f3eca82d chore(web): add comment for sentry-manager 2022-05-27 13:13:00 +10:00
Marc Durdin
fcf78bcd94 chore: merge master into branch 2022-05-27 13:11:23 +10:00
Marc Durdin
f1c98cf707 chore(web): add sentry-manager as project ref for embedded 2022-05-27 09:50:31 +10:00
Marc Durdin
323fcb875b
Merge pull request #6668 from keymanapp/chore/web/cleanup-sourceroot-and-polyfills
chore(web): reintroduce sourceRoot and revert types 🎡
2022-05-27 09:05:49 +10:00
Marc Durdin
66efed172b
Merge branch 'chore/web/no-more-lerna' into chore/web/move-common-core-web-to-common-web 2022-05-27 09:04:52 +10:00
Marc Durdin
f8a7430538
Merge pull request #6617 from keymanapp/chore/web/move-web-environment
chore(web): move web-environment to common/web 🎡
2022-05-27 08:51:36 +10:00
Marc Durdin
17a536d705
Merge pull request #6606 from keymanapp/chore/web/embedded-build-cleanup
chore(web): embedded web cleanup 🎡
2022-05-27 08:48:45 +10:00
Marc Durdin
566c7f12bd chore(web): reintroduce sourceRoot in tsconfig 2022-05-27 07:46:30 +10:00
Marc Durdin
e60083a800
Update web/source/tsconfig.embedded.json
Co-authored-by: Joshua Horton <joshua_horton@sil.org>
2022-05-24 12:49:40 +10:00
Marc Durdin
1d7c329973 chore: address review comment 2022-05-23 07:41:04 +10:00
Marc Durdin
05a4c33200 chore(web): move common/core/web to common/web
Relates to #5816.

Moves folders under common/core/web to common/web:

* input-processor -> common/web/input-processor
* keyboard-processor -> common/web/keyboard-processor
* tools/recorder -> common/web/recorder
* tools/sentry-manager -> common/web/sentry-manager
* utils -> common/web/utils

Updates scripts and configuration to point to new folders.
2022-05-18 06:01:03 +10:00
Marc Durdin
af44c0687f chore(web): move web-environment to common/web 2022-05-16 08:29:46 +10:00
Marc Durdin
8efcb5d64a chore(web): embedded web cleanup 2022-05-12 07:37:10 +10:00
Marc Durdin
4f0185dd1e chore(web): cleanup unit tests
Fixes the build for unit tests (and fixes corresponding bug in KMW
build) to eliminate Lerna dependencies.
2022-05-11 12:05:44 +10:00
Marc Durdin
d2b86c90d1 chore(web): fix predictive text module concatenation 2022-05-10 10:50:33 +10:00
Marc Durdin
21744d0ed6 chore(web): fixup test paths
Fixes some of the test paths required for core tests.
2022-05-09 13:29:41 +10:00
Marc Durdin
843cde9611 chore(web): fixup npm path ref in build.sh 2022-05-04 10:20:07 +10:00
Joshua Horton
784cb74884
Merge pull request #6526 from keymanapp/fix/web/subkey-fat-fingering
fix(web): fixes fat-finger distrib when subkey selected
2022-05-03 10:14:28 -05:00
jahorton
0f051edee0 change(web): addresses PR concerns 2022-04-29 10:08:24 -05:00
Joshua Horton
a0df12247b
Merge pull request #6566 from keymanapp/change/web/touch-alias-followup
change(web): touch alias optimization followup
2022-04-26 17:08:21 -05:00
Joshua A. Horton
d4464b92e5 fix(web): fixes fat-finger distrib when subkey selected 2022-04-26 10:10:21 -05:00
Joshua Horton
95c7cc2675
chore(web): applies code suggestion
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-04-26 06:53:49 +07:00
jahorton
782d2ae07a feat(web): adds .getKeyboard().IsRTL, .HasLoaded 2022-04-25 13:27:57 -05:00
jahorton
7990cdc1dd feat(web): caret placement fine-tuning 2022-04-25 11:53:36 -05:00
jahorton
509fbb02e8 change(web): clarifies caret positioning logic 2022-04-25 11:18:02 -05:00
jahorton
efcc4276a3 change(web): performCaretSearch now member of TouchAliasElement 2022-04-25 09:25:13 -05:00
jahorton
56b4c5ac50 fix(web): caret position when page is scrolled 2022-04-20 15:28:35 -05:00
jahorton
d3900fce47 docs(web): documents some optimizing blocks 2022-04-20 15:06:32 -05:00
jahorton
a355f2ecff chore(web): minor polish 2022-04-20 15:05:03 -05:00
jahorton
48fb1371c0 docs(web): better comments & var naming 2022-04-20 15:02:57 -05:00
jahorton
94edc5c9da fix(web): mobile device caret positioning 2022-04-20 14:52:33 -05:00
jahorton
1c394c2744 change(web): further clarifies performCaretSearch 2022-04-20 13:03:32 -05:00
jahorton
cd666d0346 fix(web): major performance boost, fixes search bound logic bug 2022-04-20 12:29:00 -05:00
Joshua Horton
1ff699d221
Merge pull request #6535 from keymanapp/fix/web/5730-keyboardchange-event-promise-wait
fix(web): keyboardchange event should defer until successful
2022-04-19 20:50:09 -05:00
jahorton
189e6a77d9 change(web): implements PR suggestions, includes test-page-UI-code move 2022-04-19 09:41:46 -05:00
Marc Durdin
2eb10663ba
chore(web): Apply suggestions from code review
Co-authored-by: Joshua Horton <joshua_horton@sil.org>
2022-04-19 06:47:31 +10:00
jahorton
d65e933d9d fix(web): keyboardchange event defers until loaded 2022-04-14 18:01:35 -05:00
Marc Durdin
2f2d3c72c9 chore(web): move lm-worker into its own folder
This starts the reorg required for splitting the lm worker into its own
module. Tests are still not working. But builds are going.

Some decisions to be made around the final path for wrapping of the
code. I think it may be possible to do something a whole lot more
elegant by moving the wrapping process into the KMW build and leaving
the LM Worker output as a pure tsc output -- given only KMW wants the
wrapped worker anyway (tests aside). The actual wrapping code could
still be in the lm-worker folder.
2022-04-14 15:33:23 +10:00
Marc Durdin
8046c5304b chore(web): build order for deps 2022-04-14 10:40:36 +10:00
Marc Durdin
e0b308b983 chore(web): cleanup for ts projects 2022-04-13 15:19:55 +10:00
Marc Durdin
d2d6b4a12d chore: address review comment 2022-04-13 08:18:54 +10:00
Marc Durdin
0ac04d0530 chore(web): Merge branch 'beta' into chore/web/no-more-lerna 2022-04-12 21:17:15 +10:00
Marc Durdin
4d94786852 chore(web): replace lerna with npm workspaces and ts projects
Fixes #6320.

Part 1 of moving from lerna to a simpler, maintained monorepo solution,
using TypeScript Projects and NPM Workspaces.

There is more work to be done here. At this point, KeymanWeb builds and
runs without errors, but the built file is substantially different,
mostly in include order.

Using TypeScript Projects, we move away from the need to run build
scripts in various locations for almost all the Typescript modules.

TODO: Embedded versions and tests have not been verified.

TODO: developer/server is not yet verified.

TODO: developer/js (needs a rename!) is not yet verified.

TODO: Currently, the predictive-text folder needs refactoring to move
the construction of the worker wrapper out of the Predictive Text build
and into the final assembly of keymanweb.js (as it should be valid to
run it as a separate .js anyway).

TODO: Most of the `<reference>` paths need to be re-verified. Ideally
there should be no references outside the current module for any given
.ts.

TODO: The embedded vs browser vs node (headless) builds should be tidied
up for consistency so that it's obvious what depends on what. This is
currently messiest in the predictive-text folder, where the output names
diverge from the filenames and the various files are mixed in the same
folder (as evidenced by the exclusions listed in each tsconfig.json).

TODO: `npm install` should be removed from most build scripts and
instead `npm ci` (#6196) should be run only once from the top-level
folder for any given build. I've had eliminated side-effects from the
`install` action for npm, which makes it easier to reason about state.

TODO: verify_npm_setup and related functions can probably be eliminated.

TODO: most of the build scripts should be largely eliminated for web.

TODO: several ts projects use inconsistent output folders.

TODO: it may be possible to generate a .d.ts for models/types so that
we can use a consistent reference for those as well.

TODO: build.sh, tsconfig.json should always be in the module's top-level
folder, not in a subfolder such as src (e.g. see input-processor/src,
keyboard-processor/src, web/source).

TODO: resources/web-environment should be in common/web.

TODO: other js node_modules imports should be wrapped like es6-shim.

TODO: fix up the publish code for npm modules

TODO: eliminate version numbers from package.json if possible?

Whew, that's most of the stuff I noticed!
2022-04-12 21:02:33 +10:00
Marc Durdin
49eb062c65 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-08 16:14:01 +10:00
Marc Durdin
e616900cad
Revert "feat(web): prediction casing follows current layer" 2022-04-08 14:50:32 +10:00
Marc Durdin
0ad1d496d3 fix(android): key tip sticky with multitap
Fixes #6489.

The issue arose in multitap scenarios, where the tip display state
became desynchronised with the actual display state as maintained in
the Android code.

The fix I applied was to reduce some of the state checks into the js
wrapper android-host.js. This is not ideal. The state machine for key
tip display is scattered across four functions in three files:

* visualKeyboard.ts: VisualKeyboard.highlightKey
* visualKeyboard.ts: VisualKeyboard.showKeyTip
* embedded/keytip.ts: KeyTip.show
* android-host.js: oskShowKeyPreview / oskClearKeyPreview

I have moved the actual re-creation check for the tip to the lowest
level functions -- those in android-host.js. But a more detailed look at
the state machine and a refactoring would certainly be worthwhile.
2022-04-07 15:27:41 +10: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
a192803021 chore(web): address review comment 2022-03-30 16:39:49 +11:00
Marc Durdin
0cadb83383 fix(web): track load error detail
This is a follow-up for #6331. We still did not have enough detail to
be able to trace the root cause of the load errors. This adds a little
more diagnostics.
2022-03-30 06:44:03 +11:00
Marc Durdin
c0248bec1b
Merge pull request #6432 from keymanapp/fix/web/shifted-key-cap
fix(web): *Shifted* showed unshifted key cap
2022-03-29 12:36:12 +11:00