Commit graph

47 commits

Author SHA1 Message Date
Marc Durdin
a3129adedc refactor(common): rename builder_has_action and document
* `builder_has_action` renamed to `builder_start_action`
* `builder_report` renamed to `builder_finish_action`
* `builder_has_action` created to be a silent test for the action
* Added reasonably comprehensive documentation.
2022-09-21 10:21:35 +10:00
Marc Durdin
93a03acb9f chore(common): builder script :target and --option support
Adds support for :target and --option to the builder_() functions in
build-utils.sh, along with a consistent way of describing command line
parameters in short-hand form, so we can avoid the display_usage getting
out of sync with actual command line parameters.

I opted to tweak the existing usage slightly, reversing parameter order
for `builder_report`, so that we could extend `builder_report` cleanly
to support targets.

The new builder_() functions are `builder_describe` and `builder_parse`,
which should be used in place for `builder_init` where you want to
provide more detailed command-line options (for many scripts, the
defaults provided through `builder_init` may suffice).

`builder_describe` lets you set a single-line description of the script,
along with a list of parameters: `actions`, `:targets` and `--options`.
Options may also specify a shorthand form, e.g. `--option,-o`. Each
parameter may optionally include a short description, separated by
space(s) from the parameter name.

build-utils.test.sh tests the functionality of the various functions,
and provides some examples of using them.

Defaults:
* If a target is not specified in `builder_describe`, a standard target
  of `:project` will be available.
* If the user does not pass an action on the command line, then `build`
  will be used.
* If the user does not pass a target on the command line, all targets
  will have the actions applied.

Note, it is possible to have targets which do not use all actions. These
may be still be specified, but can be ignored. For example, `test:tools`
may not be an action:target that you handle in the script. At this time,
the builder_() functions do not attempt to check for this.
2022-07-25 14:31:58 +10:00
jahorton
75964b0077 chore(web): drops non-pred text dependence on es6-shim 2022-05-31 09:11:20 +07:00
jahorton
f20759f26a chore(web): eliminates web-environment package 2022-05-23 13:40:29 +07: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
4f87aad344 chore(web): bulk renderer tsc cleanup
Changes the bulk renderer build script to the new standard build script
format and updates to use tsc -b. Cleans up final external <reference>s.
2022-05-16 05:50:11 +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
9f153ecc17 chore(common): cleanup sh global color variables
Some of the global color variables in shellHelperFunctions.sh were a
little dangerously named. This cleans that up and removes a couple of
redundant functions from other locations.

mac/bashHelperFunctions.sh should be removed and replaced with
references to shellHelperFunctions.sh -- but I wanted to leave that for
a separate branch.
2022-03-10 10:12:09 +11:00
jahorton
7fd62c51f4 refactor(web): centralizes element-oriented OSK display logic, polish for prior commits 2021-09-01 09:44:02 +07:00
Marc Durdin
a7be4f089b fix(web): bulk rendering docs 2021-01-22 16:07:45 +11:00
Marc Durdin
21ee5c4900 fix(web): bulk renderer using video stream capture
Instead of using html2canvas which is only an approximation of the DOM,
we now use the video capture API to get an exact capture of the OSK.
2021-01-22 15:51:38 +11:00
jahorton
126a15e120 refactor(web/engine): renames DeviceSpec, moves to utils 2020-05-18 08:31:32 +07:00
jahorton
d2b6a1bec8 refactor(web): full KMW now uses web-utils package 2020-05-15 13:34:31 +07:00
jahorton
ac3661b2d4 chore(web/engine): Merge branch 'change/web/engine/keyboard-processor-package' into change/web/engine/input-processor-package 2020-04-29 13:11:43 +07:00
jahorton
67ff4a2036 chore(web/engine): Merge branch 'change/web/engine/keyboard-processor-package' into change/web/engine/input-processor-package 2020-04-27 14:01:38 +07:00
jahorton
8a31e0b29a chore(web/engine): Merge branch 'feat/common/init-lerna' into change/web/engine/keyboard-processor-package 2020-04-27 13:52:12 +07:00
jahorton
0b12f6dabc fix(web): better build script header uniformity 2020-04-27 12:44:00 +07:00
jahorton
5c709f9468 chore(web/engine): post-rebase cleanup 2020-04-24 14:35:52 +07:00
jahorton
251257b7f3 fix(web): Fixes resource builds, polishes core builds 2020-04-24 14:35:50 +07:00
jahorton
1eed004296 change(web): package rename + patchup 2020-04-24 13:53:39 +07:00
jahorton
22f1a1208d fix(web): ensures keyboard-processor build, patches tool builds 2020-04-24 13:45:15 +07:00
jahorton
879a4b5e4a feat(common): lerna now npm-installed locally 2020-04-21 15:55:43 +07:00
jahorton
3f330029a4 fix(web): patches up a few utility scripts 2020-04-17 15:10:49 +07:00
jahorton
7a04baa9a5 change(web/engine): kbdProcessor.core => core.keyboardProcessor 2020-04-06 13:17:32 +07:00
jahorton
55998fa1e1 refactor(web/engine): Processor now controls layer 2020-03-31 10:48:53 +07:00
jahorton
135993773c fix(web): missing chmod +x on mac machine 2020-03-21 15:42:20 +07:00
jahorton
9d9f96dc7b refactor(web/engine): catches a bulk-renderer reference to property 2020-03-21 15:28:12 +07:00
jahorton
e6788e2ad9 refactor(web/engine): wraps active keyboard 2020-03-21 14:30:33 +07:00
jahorton
6ba4c8dd69 refactor(web/engine): a few missed details, ensures embedded works 2020-03-20 22:09:43 +07:00
jahorton
1cee4615e4 fix(web): fixes mobile form for bulk-renderer tool 2020-03-13 15:05:55 +07:00
jahorton
6f8b93aa87 fix(web): fixes internal reference for validation tool 2020-03-13 13:50:17 +07:00
jahorton
ecddb73862 change(android): gets API 23 working again, but not 19 or 21 (yet) 2019-12-02 07:55:37 +07:00
Joshua A. Horton
86c88f2120 Fixes a scoping issue on the final render step - device notes. 2018-12-18 11:47:56 +07:00
Joshua A. Horton
7899278ace A little bit of tidying. 2018-12-18 08:36:26 +07:00
Joshua A. Horton
27af75f342 Fixes the touch bug - CSS 'opacity' settings were to blame. 2018-12-18 08:32:52 +07:00
Joshua A. Horton
91c38ced75 Extra bit of desktop vs mobile distinction. 2018-12-17 14:23:05 +07:00
Joshua A. Horton
8d581c7436 Fixes some mobile issues, polishes the basic page structure. 2018-12-17 14:06:19 +07:00
Joshua A. Horton
ded43f3c80 Mild refactor of new code for better organization + readability. 2018-12-17 12:24:16 +07:00
Joshua A. Horton
968c2b8ec1 init() now works with Promises, fixes test regression. 2018-12-17 12:00:03 +07:00
Joshua A. Horton
286e2c4ba1 Removes file used during prototyping the bulk-renderer. 2018-12-17 10:23:29 +07:00
Joshua A. Horton
25ab64ab86 Improves the bulk-renderer's OSK-hijacking approach. 2018-12-17 10:19:12 +07:00
Joshua A. Horton
7784611168 Successful keyboard render chaining! 2018-12-17 09:31:05 +07:00
Joshua A. Horton
9561537101 setActiveKeyboard is now Promise-compatible! 2018-12-17 09:09:53 +07:00
Joshua A. Horton
c95ba33739 Establishes proper Promise fulfillment for one full keyboard. 2018-12-14 15:16:33 +07:00
Joshua A. Horton
e8cc2a7c7b Prototyping's going well; even IE renders here. One kbd, one layer. 2018-12-14 14:14:02 +07:00
Joshua A. Horton
e955c16777 Start of development on a 'bulk rendering' engine for KMW validation. 2018-12-14 10:02:50 +07:00