Commit graph

129 commits

Author SHA1 Message Date
jahorton
edef613dc8 change(web): implements arrow-func suggestion from #6567 2022-06-14 15:16:00 +07:00
jahorton
0601f682b0 chore(web): a bit more cleanup 2022-05-31 09:11:19 +07:00
Marc Durdin
fcf78bcd94 chore: merge master into branch 2022-05-27 13:11:23 +10: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
189e6a77d9 change(web): implements PR suggestions, includes test-page-UI-code move 2022-04-19 09:41:46 -05:00
jahorton
d65e933d9d fix(web): keyboardchange event defers until loaded 2022-04-14 18:01:35 -05:00
Marc Durdin
e0b308b983 chore(web): cleanup for ts projects 2022-04-13 15:19:55 +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
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
f633174f9f fix(web): stop masking error
We are seeing this error thrown in some logs but it masks the underlying error.
2022-03-04 11:44:54 +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
Marc Durdin
db7f7e1f4b
Merge branch 'master' into fix/web/5353-uncaught-in-promise-error 2021-11-19 13:11:59 +11:00
Marc Durdin
fc8d1b3e72 fix(web): avoid error if timerid not valid
Relates to #5904.

If a call to api.keyman.com takes longer than 10 seconds, the timerid
would no longer be valid, even if the call returns successfully. This
threw a cascade of errors.

There was a secondary issue where keymanweb.com was passing in an
invalid timerid, causing the same error cascade. This is fixed in
keymanapp/keymanweb.com#38.
2021-11-15 11:17:59 +11:00
Marc Durdin
a7c050d71b fix(web): resolve unhandled exception in promise
Fixes #5353.

I made the promise usage consistent in the relevant addKeyboards
functions, instead of mixing promise and async/await style code, which
made it easier to spot the place(s) where promises had not been returned
as we needed.
2021-11-14 15:43:43 +11:00
jahorton
595984c813 fix(web): desktop sil_euro_latin patchup 2021-09-22 09:20:09 +07:00
jahorton
f070df079d refactor(web): osk._Hide -> osk.startHide 2021-09-01 09:44:34 +07:00
jahorton
fe797fe657 refactor(web): osk now controls own display state 2021-09-01 09:44:30 +07:00
jahorton
7fd62c51f4 refactor(web): centralizes element-oriented OSK display logic, polish for prior commits 2021-09-01 09:44:02 +07:00
jahorton
6971f09c4d refactor(web): activeElement, lastActiveElement as properties 2021-09-01 09:44:01 +07:00
Darcy Wong
786c223b98 chore(web): Cleanup per review comments 2021-07-26 20:59:08 +07:00
Darcy Wong
5d1a652314 Merge remote-tracking branch 'origin/master' into feat/web/add-keyboard-promise 2021-07-23 13:12:40 +07:00
Darcy Wong
0d50ff04c6 chore(web): Clarify comment about ignoring RegionCode 2021-07-23 13:12:33 +07:00
jahorton
b723d8c51b chore(web): Merge branch 'refactor/web/osk-keyboard-view' into refactor/web/osk-cleanup-and-init 2021-07-21 09:13:27 +07:00
Darcy Wong
bf9dd55853 chore(web): Merge remote-tracking branch 'origin/master' into feat/web/add-keyboard-promise 2021-07-09 16:22:03 +07:00
Darcy Wong
e01f6bf201 fix(web): Add wrapper to convert one-to-many keyboard stubs 2021-07-09 16:16:41 +07:00
Darcy Wong
ec092ba1e3 chore(web): Change syntax for clone 2021-07-08 14:14:40 +07:00
Darcy Wong
3770b69692 fix(web): Copy the keyboard stubs for registration 2021-07-08 10:00:17 +07:00
jahorton
dbded0dd23 refactor(web): osk.prepare -> constructor, sync _Load 2021-07-07 11:46:12 +07:00
jahorton
e2ba78582e feat(web): prevents crash on null keyman.osk field 2021-07-07 11:45:27 +07:00
Darcy Wong
082ed9bd9c chore(web): Add button to test keyboard stub
* Per review comment, have separate button to add keyboard  involving keyboard stub with languages Object and no filename.
2021-07-07 10:45:53 +07:00
Darcy Wong
20fa22dab6 fix(web): Move code to registerStub 2021-07-05 13:52:16 +07:00
Darcy Wong
d37e48c0cc fix(web): Start fixing registeruStub return 2021-07-02 16:53:23 +07:00
Darcy Wong
6af2831c23 chore(web): Merge branch 'master' into feat/web/add-keyboard-promise 2021-07-02 09:04:58 +07:00
Marc Durdin
55c2192171
Merge pull request #5348 from keymanapp/feat/web/949-spacebar-text-controls
feat(web): spacebar text controls
2021-07-02 08:17:59 +10:00
Darcy Wong
2215452d20 chore(web): Rename to mergeAndResolveStubPromises 2021-07-01 10:11:56 +07:00
Darcy Wong
cbfc9b9f6b
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-07-01 09:53:35 +07:00
Darcy Wong
53b21d877a chore(web): Add keyboard ID to error message 2021-06-30 11:17:12 +07:00
Darcy Wong
144125080b feat(web): Handle deferment of adding keyboards 2021-06-30 10:26:19 +07:00
Darcy Wong
c68251bd23 fix(web): Fix adding single language element 2021-06-30 08:54:22 +07:00
Darcy Wong
da7a5b0f2e chore(web): Minor cleanup 2021-06-30 08:37:00 +07:00
Darcy Wong
55bcdc5429 fix(web): Refactor merge of stubs 2021-06-29 16:50:10 +07:00
Darcy Wong
f706540165 feat(web): Fix handling of keyboardStubs and errorStubs 2021-06-29 13:28:31 +07:00
Darcy Wong
2622171456 feat(web): Update registerDeferredStubs to return a Promise 2021-06-29 10:32:03 +07:00
Darcy Wong
f5e7343d35 chore(web): Handle args in kmwbase 2021-06-29 08:51:57 +07:00
Darcy Wong
1d6ed84155 feat(web): Start updating addKeyboards to return Promise 2021-06-28 23:39:15 +07:00
Marc Durdin
e56f377d69
Merge branch 'master' into feat/web/949-spacebar-text-controls 2021-06-28 16:01:26 +10:00
Marc Durdin
5fe40f70a5 fix(web): allow addKeyboards to set displayName
While `registerStub` supported `displayName`, `mergeStub`, as used by
`addKeyboards`, also needs to support it.
2021-06-28 10:31:27 +10:00
Darcy Wong
972d6920b4 chore(web): Update languageListPromise type 2021-06-25 12:38:19 +07:00