Commit graph

473 commits

Author SHA1 Message Date
Steven R. Loomis
d552a46104
Merge pull request #7630 from keymanapp/feat/core/7532-layr-epic-ldml 2023-01-06 17:40:06 -06:00
Steven R. Loomis
9f8b0352a2 fix(developer): ldml: updates per code review 🙀
- …/key2/flicks.xml deleted empty test file
- test-key2.ts: reinstated an assert

For #7532
2023-01-06 15:51:56 -06:00
Steven R. Loomis
564f98cc30
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-01-06 11:46:17 -06:00
Steven R. Loomis
015e7185a6 chore: merge master into feature-ldml 2023-01-02 13:44:21 -06:00
Steven R. Loomis
ac461e97b8 fix(developer): ldml: merge fixes: fix scope of JSZip in the test 🙀
- JSZip() needs to be in an inner function otherwise the single zip grows and grows
- also don't read the kps version when building the kmp

For #7042
2022-12-22 14:31:49 -06:00
Steven R. Loomis
ec9a5952fc fix(developer): ldml: merge fixes: fix scope of JSZip 🙀
- JSZip() needs to be in an inner function otherwise the single zip grows and grows

For #7042
2022-12-22 14:20:39 -06:00
Steven R. Loomis
80b764174a
Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-12-22 13:56:08 -06:00
Steven R. Loomis
05656ac499 feat(core): ldml: fix off-by-one on section count 🙀
- yes, sect was counting itself. Too much automation!
- disable layr/key2/list loading in C++ for now

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-12-22 13:12:08 -06:00
Marc Durdin
905fcd1913
chore: Apply review comments 2022-12-22 08:07:42 +11:00
Steven R. Loomis
343f234a8e feat(core): ldml: updates to basic.txt and builders 🙀
- strs and ALL TESTS pass

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-12-20 19:16:41 -06:00
Steven R. Loomis
63fa53a028 feat(core): ldml: updates to basic.txt and builders 🙀
- layr now passes comparison

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-12-20 17:05:29 -06:00
Steven R. Loomis
47a9d16be9 chore(core): updates to kmc-package after merge 🙀
Try to get this to pass tests again

test data:
- put withfolders.qaa.sencoten.model in the right spot
- add kmp.json as it seems to be included
- remove copyLocation: 0 as kmp-compiler drops it

test-package-compiler:
- improve the jszip-contents test
- assume kmp.json is included in the zip
- bug: withfolders.qaa.sencoten.model.js and example.qaa.sencoten.model.js show up in an unrelated KPS. But, include for now.

KmpCompiler
- attempt to pull version from kps.info.version: comments to the contrary, some kps files do not have kmxes.
- map backslash to forward slash so that relative path resolution works

For #7042
2022-12-19 19:50:19 -06:00
Marc Durdin
74f0fe2d08 fix(developer): force ES3 code generation for LMs
Fixes #7926.

Android 5.0 (Chrome 37) only supports ES3. Thus, we should transpile our
lexical models to ES3 rather than ES2015, for now at least.

For example, this forces constructs such as `const` to be replaced with
`var`.
2022-12-19 14:48:05 +11:00
Steven R. Loomis
b036fc5840 feat(core): ldml: basic: updates to basic.txt for layr 🙀
- key2 now passes!
- starting on layr

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #753
2022-12-16 17:53:14 -06:00
Steven R. Loomis
bc14f18460 Merge remote-tracking branch 'origin/master' into chore/core/mergemaster4-epic-ldml 2022-12-15 17:55:13 -06:00
Steven R. Loomis
eb8c4dea7a feat(core): ldml: basic: updates to basic.txt for layr 🙀
- more key2 chan ges

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #753
2022-12-15 15:27:58 -06:00
Steven R. Loomis
a126a83f6a Merge branch 'feature-ldml' into feat/core/7532-layr-epic-ldml 2022-12-12 10:00:53 +07:00
Marc Durdin
2375a81941 fix(developer): kmc-model esbuild node_modules path 2022-12-10 08:43:06 +07:00
Steven R. Loomis
30761fec01 feat(core): ldml: basic: updates to basic.txt for layr 🙀
- doc fix also
- key2 still to go

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #753
2022-12-03 04:55:52 +08:00
Marc Durdin
eaae1c3774
Merge pull request #7820 from keymanapp/fix/developer/7810-encodeurl-broken
fix(developer): EncodeURL was not handling spaces
2022-12-01 10:55:48 +11:00
Marc Durdin
1208bf599f
Merge pull request #7830 from keymanapp/fix/developer/7829-onlineupdate-shutdown-thread
fix(developer): OnlineUpdate crash on shutdown
2022-12-01 10:23:53 +11:00
Steven R. Loomis
f150a96a63 feat(core): ldml: basic: WIP 🙀
For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-11-29 18:33:13 -06:00
Marc Durdin
182a1fcb41 chore: rename tike internally 2022-11-28 19:52:00 +07:00
Marc Durdin
529278c045 fix(windows): lower case filenames for projects
Fixes #7828.

Moves all projects to lower case filenames so that we don't end up with
filename conflicts in symbol servers.
2022-11-28 19:28:14 +07:00
Marc Durdin
2c6c6f107b fix(developer): OnlineUpdate crash on shutdown
Fixes #7829.

The online update check could crash on shutdown because the thread
destructor would run from the wrong thread. This caused the main form
destruction, which happens if the user chooses to install the update,
to be triggered from the worker thread, leading to much pain.
2022-11-28 09:56:27 +07:00
Marc Durdin
d2e1a41d06 fix(developer): remove missing files from MRU list
Fixes #7808.

If a project is moved, then the MRU, which has absolute path names, will
probably have references to files that don't exist. Rather than leave
these in the list, to be opened and potentially recreated in the wrong
place, we should just remove them entirely.
2022-11-26 07:31:16 +07:00
Steven R. Loomis
e98835d35b feat(core): ldml: updates to layr 🙀
- re-redo of layr
- most tests now pass
- updated layr builder

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-11-25 18:17:45 -06:00
Marc Durdin
6eefb3a771 fix(developer): EncodeURL was not handling spaces
Fixes #7810.

This addresses a regression introduced in #7631, where URL parameters
with spaces would be encoded into `+` instead of `%20`. Looking a bit
deeper at the Delphi `TNetEncoding.URL.Encode` function I realised that
it was entirely inadequate. Some guy named Marc Durdin wrote a blog a
good few years ago about the problem, and that's what I ended up using.

This encoding issue caused filenames with spaces (by default, project
paths in Developer have spaces) to give a 404 when editing a touch
layout, which meant that the touch keyboards could not be saved.

Also fixes KEYMAN-DEVELOPER-74, where the + encoding caused multiple
entries to appear in the filename cache.

Amusing to Google this problem, find solid answer on SO, which pointed
to my very own blog. Embarrassing that my own code didn't already
include my own fix.

A secondary issue is also fixed here, where request parameters were
double-decoded for formencoded POST requests. The fix for broken URL
encodings was only required for GET requests.

This also showed up in KEYMAN-DEVELOPER-74, with double-encoded paths
being registered as source files.
2022-11-26 07:09:53 +07:00
Steven R. Loomis
273075c1f3 feat(core): ldml: updates to layr compiler 🙀
- layr compiler working

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-11-25 15:55:11 -06:00
Steven R. Loomis
00442f5edd feat(core): ldml: updates to key2 and other stuff 🙀
- passes all but fixtures

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-11-23 18:48:45 -06:00
Steven R. Loomis
c6b1be4ed7 feat(core): ldml: updates to key2 and other stuff 🙀
- compiles again

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-11-23 18:43:35 -06:00
Steven R. Loomis
156c737a9a feat(core): ldml: updates to key2 and other stuff 🙀
- adding compareTo to some classes

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-11-23 18:33:09 -06:00
Steven R. Loomis
9e21fe1a74 feat(core): ldml: updates to list and other stuff 🙀
- list is probably in good shape for the builder (not yet the writer).
Other stuff TBD.

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-11-23 16:47:00 -06:00
Steven R. Loomis
3496939073 feat(core): ldml: steps for list/key2 🙀
- update kmx-plus.ts for key2 and list sections
- add tests for key2
- TODO: binary write, basic fixture, layr

For feat(developer): ldml: include all LDML data in kmx+ 🙀 #7532
2022-11-22 18:39:25 -06:00
Joshua A. Horton
94c0e69985 feat(common/models): directional quotes now match against nondirectional ones 2022-11-18 14:15:53 +07:00
Steven R. Loomis
bccb64c911 feat(core): ldml: kmx-plus.ts for layr/key2/list 🙀
- update kmx-plus for layr/key2/list

For #7532
2022-11-17 15:37:25 -06:00
Marc Durdin
c18f1a7e63
Merge pull request #7631 from keymanapp/fix/developer/7628-utf8-urls
fix(developer): URL parameters should be UTF-8
2022-11-11 08:03:00 +11:00
Marc Durdin
31513d657e fix(developer): handle utf-8 paths safely 2022-11-10 15:26:27 +11:00
Marc Durdin
3dbd11939f
Merge pull request #7650 from keymanapp/fix/core/7649-emit-keystroke-writing-action-to-wrong-queue
fix(core): emit keystroke was writing to wrong queue
2022-11-09 20:24:26 +11:00
Marc Durdin
d1ab61eac1
Merge pull request #7659 from keymanapp/fix/developer/7658-handle-unpaired-surrogate-in-token-command
fix(developer): handle unpaired surrogate
2022-11-09 16:46:21 +11:00
Marc Durdin
6ebba9deb1
Merge pull request #7655 from keymanapp/fix/developer/4757-6928-handle-shutdown-on-update-better
fix(developer): handle shutdown cleanup more cleanly
2022-11-09 16:46:04 +11:00
Marc Durdin
5d41e7a36e fix(developer): handle unpaired surrogate
Fixes #7658.

When manipulating text that contains an unpaired surrogate, the text
editor could throw an exception trying to encode the text to send
through to the token command. This simply masks that error.
2022-11-09 09:43:55 +11:00
Marc Durdin
03ae8582db fix(developer): handle shutdown cleanup more cleanly
Fixes #4757.
Fixes #6928.

Three separate ways shutdown is more robust:

1. Destroy main form before web server -- this ensures that all main
   form routines have deregistered app sources from web server.
2. In some situations, `FormClose` can be skipped by shutdown routines,
   for example, if you call `Application.Terminate`. This change ensures
   that we get a second chance to cleanup in the form destructor with
   `DoCloseCleanup`.
3. In the Online Update Check, instead of `Application.Terminate`, we
   now use `Application.MainForm.Close`, which is much more polite, as
   it ensures that changed files are saved, etc, and does proper
   cleanup. This particular change may make the other two somewhat
   irrelevant but they are still sensible as they will cover us for
   other potential form destruction sequences.
2022-11-09 08:18:41 +11:00
Marc Durdin
d2fe2a61f9 fix(developer): patch from previous commit 2022-11-09 07:36:28 +11:00
Marc Durdin
b76eb41a06 fix(developer): handle edge cases for app sources
Relates to #6928 and KEYMAN-DEVELOPER-74.

Fixes one more potential pathway for assertions being raised, and adds
some extra debugging in case there are additional pathways we are not
capturing.
2022-11-09 07:32:05 +11:00
Marc Durdin
d7fbdfc59a
Merge pull request #7617 from keymanapp/fix/developer/7616-inferred-key-text-stability
fix(developer): improve support for inferred key cap text
2022-11-09 05:14:44 +11:00
Marc Durdin
5eb006864b fix(developer): kmlmc has runtime dependency on keyman-version 2022-11-08 16:53:10 +11:00
Marc Durdin
42a9f2ca72 fix(core): emit keystroke was writing to wrong queue
Fixes #7649.

emit_keystroke code path in kmx processor was writing directly to the
core queue instead of to the internal kmx processor queue. This caused
it to be out-of-order in the actions sent to the engine/debugger.

Engines didn't really care but it broke the debugger, for example if
only a deadkey was in the buffer and backspace was pressed, Developer
would assert as it would get unexpected context for the deletions.
2022-11-08 16:31:30 +11:00
Marc Durdin
cbc63c42b2
Merge pull request #7642 from keymanapp/fix/developer/7641-prevent-compile-if-no-project
fix(developer): disable Keyboard|Compile if no project loaded
2022-11-08 14:42:19 +11:00
Marc Durdin
094050ec90
Merge pull request #7635 from keymanapp/fix/developer/7634-handle-encoding-error
fix(developer): handle EEncodingError loading text file
2022-11-08 14:41:35 +11:00