Commit graph

83 commits

Author SHA1 Message Date
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
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
Darcy Wong
37c42e7dee chore(web): Merge branch 'feat/web/alert-option' into feat/web/error-stubs 2021-06-25 09:24:19 +07:00
Darcy Wong
c14443d798 chore(web): Cleanup console logging 2021-06-25 08:45:00 +07:00
Darcy Wong
c8f7a4cdf4 fix(web): Use util.internalAlert() wrapper 2021-06-24 13:02:49 +07:00
Darcy Wong
36acc16927 fix(web): Check useAlerts on internal calls 2021-06-24 11:42:02 +07:00
Darcy Wong
63e01e8d0b chore(web): Cleanup keymanCloudRequest type 2021-06-24 10:39:11 +07:00
Darcy Wong
246e0cd250 fix(web): Clean up Error returns 2021-06-24 10:07:00 +07:00
Marc Durdin
38fc826fbf feat(web): spacebar text controls
Relates to #949.

* Adds optional `displayName` property to keyboard stubs: if present,
  this will override the name on the spacebar.

* Adds optional `spacebarText` member to `keyman.options`. This defaults
  to `SpacebarText.LANGUAGE_KEYBOARD`, and can be one of:

  ```
  SpacebarText.LANGUAGE
  SpacebarText.KEYBOARD
  SpacebarText.LANGUAGE_KEYBOARD
  SpacebarText.BLANK
  ```

* Sets the display pattern for LANGUAGE_KEYBOARD to be
  "language - keyboard" instead of "language (keyboard)", which
  reduces the number of parentheses visible on the spacebar.
2021-06-24 08:44:23 +10:00
Darcy Wong
f46d06907a fix(web): Update ErrorStub type 2021-06-23 21:32:17 +07:00
Darcy Wong
359eabec2f feat(web): Merge keyboard stub with error stub 2021-06-23 16:19:37 +07:00
Darcy Wong
9bbd8035e0 fix(web): Start addressing review comments 2021-06-18 15:26:54 +07:00
Darcy Wong
d1b76684a2
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-06-18 14:51:37 +07:00
Darcy Wong
d762c80125 chore(web): Adjust call in languageUnavailable 2021-06-17 13:08:44 +07:00
Darcy Wong
b2636603d8 feat(web): Add option useAlerts to control alerts() 2021-06-17 13:03:56 +07:00
Darcy Wong
8633c07516 chore(web): More cleanup
* Clarify TODO
* Consolidate addKeyboardsForLanguage() call in commonHeader.js
2021-06-17 10:53:58 +07:00
Darcy Wong
d599a406f3
Apply suggestions from code review
Co-authored-by: Joshua Horton <joshua_horton@sil.org>
2021-06-17 08:58:08 +07:00
Darcy Wong
e81a7c1611 fix(web): Fix return of nested promises 2021-06-16 17:57:17 +07:00
Darcy Wong
59f26a0e64 chore(web): Remove Error return type 2021-06-16 09:26:59 +07:00
Darcy Wong
2c0f8e8566 chore(web): Minor cleanup 2021-06-15 12:59:00 +07:00
Darcy Wong
083d2ba711 fix(web): Use async/await for getting language list catalog 2021-06-15 12:27:27 +07:00
Darcy Wong
6899a52616 fix(web): Add nested promises 2021-06-14 15:10:43 +07:00
Darcy Wong
2e9cbc58dd fix(web): Add catch for errors 2021-06-13 08:24:50 +07:00
Darcy Wong
9c93f31861 fix(web): Cleanup params 2021-06-11 12:14:52 +07:00
jahorton
3fc120ffed fix(web): fixes keymanCloudRequest 2021-06-11 09:52:30 +07:00
Darcy Wong
61f3a8dd5b feat(web): Initial try for addLanguageKeyboards to return a Promise 2021-06-10 15:02:57 +07:00
jahorton
afe6950062 chore(web): final? PR polish 2021-05-24 10:03:50 +07:00
jahorton
d8af0c6acd docs(web): fixes comment typo 2021-05-24 08:23:56 +07:00
jahorton
f74eda8867 chore(web): another PR review revision round 2021-05-24 08:22:19 +07:00
jahorton
65b3564ca7 feat(web): resolve/reject mapping for cloud API. Fixes #535 2021-05-21 13:01:12 +07:00
jahorton
c17c78ab1c change(web): adjustments re: PR review 2021-05-21 11:42:28 +07:00
jahorton
9cdf867830 docs(web): notes for future enhancement 2021-05-20 16:03:06 +07:00
jahorton
1c1ccb5d63 feat(web): basic promise wrapper on cloud api call 2021-05-20 15:59:38 +07:00
jahorton
60def978ed change(web): removes now-redundant SMP enablements 2021-04-22 11:50:42 +07:00
jahorton
3b902369ef change(web): SMP processing now always enabled 2021-04-21 10:53:11 +07:00
jahorton
00debdbb28 change(web): SMP enablement always on in embedded mode 2021-04-20 16:02:55 +07:00
Marc Durdin
34568b3e8e fix(web): toolbar and loading optimisations
There are a number of changes here to improve the performance of
KeymanWeb and the toolbar and reduce unnecessary requests:

1. (kmwbase.ts and kmwkeyboards.ts) Added option `setActiveOnRegister`,
   default `'true'`; if set to `'false'` then will never attempt to
   activate the first registered keyboard. Note that this property is a
   string because the `options` object currently supports only string
   types, which is not ideal, but out of scope for this PR.

2. (kmwuitoolbar.ts) fixed issue with toolbar not matching correctly on
   full BCP 47 code (line 960) after keyboard change notification.

3. (kmwuitoolbar.ts) fixed issue with toolbar not showing active
   keyboard if the keyboard is activated before init is complete
   (see `ui.lastSelectedKeyboard` references).

4. (kmwuitoolbar.ts) avoided re-entrancy for `ui.changeKeyboardEvent`
   by ensuring that `ui.selectKeyboard` does not attempt to set the
   active keyboard again for keymanweb; note that this was being caught
   by the event dispatcher in keymanweb but it was still not ideal.

5. (kmwuitoolbar.ts) with above changes, able to remove appalling two
   second timeout on load (yay!)

These changes will be useful immediately with keymanweb.com.
2021-01-21 12:07:15 +11:00
jahorton
89da78acf0 fix(web/engine): proactive prevention for swapped keyboards 2020-11-20 10:53:32 +07:00
jahorton
0eec1dd5fd change(web): addresses PR review comments (#3122) 2020-05-15 15:50:36 +07:00
jahorton
164bdfbd33 feat(web): uses keyboard error code for testing, new-code reorg 2020-05-13 12:10:29 +07:00
jahorton
373196dded change(web/engine): splits off the core/web/keyboard-processor module 2020-04-24 13:45:04 +07:00
jahorton
9f9f2774cd refactor(web/engine): drops OSK pre-req for 'alternate' computation 2020-04-08 14:59:07 +07:00
jahorton
5140642005 change(web/engine): general cleanup 2020-04-08 14:37:55 +07:00
jahorton
d7870f07d9 refactor(web/engine): better KeyEvent preanalysis 2020-04-08 14:31:27 +07:00
jahorton
a06dc6e894 refactor(web/engine): popup-key adjustments, key.id null check 2020-04-08 09:16:52 +07:00
jahorton
e447a5a1da refactor(web/engine): fully centralizes keyEvent generation on key spec 2020-04-07 17:28:36 +07:00
jahorton
11da216cf3 refactor(web/engine): starts keyEvent generation on key spec object 2020-04-07 16:30:15 +07:00
jahorton
6779cca412 chore(web/engine): Merge branch 'refactor/web/engine/processor-split' into refactor/web/engine/headless-inner-core 2020-04-06 13:21:24 +07:00