Commit graph

2362 commits

Author SHA1 Message Date
Marc Durdin
2f42dd41f0
Merge pull request #9937 from keymanapp/chore/common/npm-prepublish-remove
chore(common): remove prepublish step from package.json
2023-11-06 14:57:43 +11:00
Marc Durdin
3e3fb92d59
Merge pull request #9924 from keymanapp/chore/developer/remove-CompileErrorCodes
chore(developer): remove compile.pas and CompileErrorCodes.pas
2023-11-06 14:57:35 +11:00
Marc Durdin
c5c5b35415 chore(common): remove prepublish step from package.json
Given we've just run a build, this (a) seems unnecessary, and (b) seems
to go wrong in some circumstances anyway, e.g.
https://build.palaso.org/buildConfiguration/Keyman_Developer_Release/421326?buildTab=log&focusLine=19936&linesState=18839&logView=flowAware:

```
07:01:29   > @keymanapp/kmc@17.0.205-alpha prepublishOnly
07:01:29   > npm run build
07:01:29
07:01:31
07:01:31   > @keymanapp/kmc@17.0.205-alpha build
07:01:31   > tsc -b
07:01:31
07:01:35   ../../../common/web/types/build/src/kmx/kmx.d.ts(1,1): error TS1036: Statements are not allowed in ambient contexts.
07:01:35   ../../../common/web/types/build/src/kmx/kmx.d.ts(1,2): error TS1345: An expression of type 'void' cannot be tested for truthiness.
...
```
2023-11-04 07:34:18 +07:00
Marc Durdin
7878864c44
Merge pull request #9935 from keymanapp/chore/developer/9929-common-include-dep-for-kmcmplib
chore(developer): common/include dep for kmcmplib
2023-11-03 18:50:45 +11:00
Marc Durdin
0605d48c94
Merge pull request #9934 from keymanapp/chore/developer/9925-remove-obsolete-settings
chore(developer): remove obsolete 'Allow Multiple Instances' and 'Use Legacy Compiler' options
2023-11-03 18:50:38 +11:00
Marc Durdin
fa30924b54 chore(developer): common/include dep for kmcmplib
Fixes #9929.
2023-11-03 13:31:45 +07:00
Marc Durdin
3336539ec5 chore(developer): remove obsolete 'Allow Multiple Instances' and 'Use Legacy Compiler' options
Fixes #9925.

Allow Multiple Instances is now always true.
Use Legacy Compiler did nothing (there is no legacy compiler!).
2023-11-03 13:24:05 +07:00
Marc Durdin
186132dcb9 fix(developer): kmc code generation for context(n) in context
Fixes #9930.

* Fixes the index offset calculation, with +1 for >=v10.0 keyboards and
  -1 for <v10.0 keyboards (difference is because older version keyboards
  have context offsets calculated in the opposite direction). Note that
  this happened because the `CODE_CONTEXTEX` index is stored in memory
  as 0-based in kmc, but was 1-based in kmcomp.

* Adds unit tests for v9.0 and v10.0 keyboards for `context(n)` in
  context.

* Adds unit tests for v9.0 and v10.0 keyboards for `context(n)` in
  output. These were already correct but now we can be assured that
  they are being tested.

* Enables code coverage for kmw-compiler, and sets a lower threshold for
  pass because coverage is still just over 70%.
2023-11-03 12:29:56 +07:00
Marc Durdin
cd5be3d819
Merge pull request #9917 from keymanapp/fix/developer/9845-server-no-osk-always-visible-on-touch
fix(developer): don't use osk-always-visible on touch devices
2023-11-03 12:22:41 +11:00
Marc Durdin
1ffa3e2494
Merge pull request #9913 from keymanapp/fix/developer/8147-use-KeymanWeb.Codes
fix(developer): use KeymanWeb.Codes for 17.0+
2023-11-03 12:21:34 +11:00
Marc Durdin
6f6e07975b chore(developer): remove compile.pas and CompileErrorCodes.pas
Fixes #9923.

These are no longer used because we now use kmc for builds. This also
means that the kmcomp-x64-structures test is no longer required, because
that was used to keep the Delphi and C++ structures in sync.

There are some minor details around error message identifiers that are
still present in a handful of places, but they are work for another
time.
2023-11-02 13:12:28 +07:00
Marc Durdin
a1c1658880
Merge pull request #9906 from keymanapp/fix/developer/9444-line-breaks-in-debugger
fix(developer): enable line breaks in debugger
2023-11-02 15:09:27 +11:00
Marc Durdin
38d2c92ecf
Merge pull request #9922 from keymanapp/fix/developer/7851-restore-selection-to-same-key-in-layout-builder
fix(developer): restore selection in layout builder even with duplicate ids
2023-11-02 15:06:32 +11:00
Marc Durdin
6be9fe6012
Merge pull request #9921 from keymanapp/fix/developer/8000-warn-if-layer-switch-key-missing-id
fix(developer): warn if layer switch key is missing ID
2023-11-02 15:06:23 +11:00
Marc Durdin
328f80847f
Merge pull request #9920 from keymanapp/chore/developer/rename-compiler-messages
chore(developer): rename messages.ts for clarity
2023-11-02 15:06:15 +11:00
Marc Durdin
e052178231
Merge pull request #9910 from keymanapp/feat/developer/7891-compile-button-in-toolbar
feat(developer): Compile button in TIKE toolbar
2023-11-02 15:06:03 +11:00
Marc Durdin
a98e5f6837
Merge pull request #9908 from keymanapp/fix/developer/7880-error-if-virtual-key-in-context
fix(developer): raise error if virtual key in context string
2023-11-02 15:05:54 +11:00
Marc Durdin
d9e759a8d2 chore(developer): address review comments 2023-11-02 11:05:23 +07:00
Marc Durdin
4341fc00b0
Merge pull request #9859 from keymanapp/feat/developer/9858-kmc-keyboard-info-extract-font-family
feat(developer): extract font family from .ttf in kmc-keyboard-info
2023-11-02 15:03:09 +11:00
Marc Durdin
c01a37145a chore(developer): address review comments 2023-11-02 11:02:20 +07:00
Marc Durdin
0dac92da57
Merge pull request #9914 from keymanapp/fix/developer/7852-layout-builder-maintain-presentation-during-undo
fix(developer): layout builder - maintain presentation during undo
2023-11-02 14:54:50 +11:00
Marc Durdin
539cfc18d3
Merge pull request #9907 from keymanapp/fix/developer/enable-and-update-tests
fix(developer): enable and update unit tests
2023-11-02 14:53:52 +11:00
Marc Durdin
067b7767c7
Merge pull request #9905 from keymanapp/fix/developer/9849-open-editor-links-in-new-window
fix(developer): open editor links in new window
2023-11-02 14:53:36 +11:00
Marc Durdin
7fec53af81
Merge pull request #9904 from keymanapp/chore/developer/9853-related-package-id-label
chore(developer): change field label to 'Related Package ID' in Related Packages dialog
2023-11-02 14:53:15 +11:00
Marc Durdin
edde4ed76d
Merge pull request #9902 from keymanapp/fix/developer/9899-project-mru
fix(developer): Project MRU now saves correctly
2023-11-02 14:51:33 +11:00
Marc Durdin
45b5db1974
Merge pull request #9844 from keymanapp/chore/developer/verify-kmp-json-output-from-kmc-package
chore(developer): verify kmp.json output from kmc-package
2023-11-02 14:50:50 +11:00
Marc Durdin
bb23a53678
Merge branch 'fix/developer/9885-debug-flag-not-working-in-tike' into fix/developer/8147-use-KeymanWeb.Codes 2023-11-02 14:48:13 +11:00
Marc Durdin
e2ecf5726c
chore: Apply suggestions from code review 2023-11-02 14:17:49 +11:00
Marc Durdin
bd2315dbac fix(developer): restore selection in layout builder even with duplicate ids
Fixes #7851.

Note that this fixes the selection pop issue with duplicate ids in some
scenarios but not all. For example, the undo stack doesn't have enough
detail at this point to be able to track this. This fix addresses the
most egregious issue relating to key size adjustment and similar.
2023-11-01 10:43:48 +07:00
Marc Durdin
15523dfe11 fix(developer): warn if layer switch key is missing ID
Fixes #8000.

In earlier versions of KeymanWeb, it was assumed that layer switch keys
would not necessarily need an identifier, as they would not be
generating a standard KeymanWeb key event. However, this assumption does
not really hold, so we should be warning on missing identifiers for
layer switch keys.
2023-11-01 09:48:13 +07:00
Marc Durdin
0ec76f0761 chore(developer): rename messages.ts for clarity
Renames two messages.ts to kmn-compiler-messages.ts and
kmw-compiler-messages.ts, as otherwise confusion reigns.

Also a minor cleanup of the error messages from touch layout processing,
to clarify message names and return appropriate message for missing
layout file.
2023-11-01 09:30:31 +07:00
Marc Durdin
4ce16a08fc fix(developer): don't use osk-always-visible on touch devices
Fixes #9845.

It seems that the logic for `osk-always-visible` is not quite right on
touch devices -- the OSK disappears on blur but remains touchable -- so
presses in the OSK region emit key events. For Keyman Developer Server,
the simple workaround is to only use `<body class="osk-always-visible">`
when on desktop devices.

We should review the logic for `osk-always-visible` in KeymanWeb, so
that this issue does not arise on touch devices. This patch addresses
the issue in Keyman Developer Server, and matches the behaviour we want
on touch devices in any case, as we don't really want the OSK visible
when blurred, unlike on desktop.
2023-11-01 05:57:13 +07:00
Marc Durdin
c759414e71 fix(developer): layout builder - maintain presentation during undo
Fixes #7852.

When undo is run in the layout builder, it is better to keep the user's
selected presentation if possible. (The selected presentation is not
stored in the undo stack, but is a view property affected by the
currently selected platform.)
2023-11-01 04:59:40 +07:00
Marc Durdin
b26b6a37d7 fix(developer): use KeymanWeb.Codes for 17.0+
Fixes #8147.

Keyboards debug-compiled for web 17.0+ will use `KeymanWeb.Codes.`
instead of `keyman.osk.`.
2023-11-01 04:43:42 +07:00
Marc Durdin
5b9608438e feat(developer): Compile button in TIKE toolbar
Fixes #7891.
2023-10-31 14:20:18 +07:00
Marc Durdin
8c1f3c4783 fix(developer): raise error if virtual key in context string
Fixes #7880.

Virtual keys have never been allowed in context. This should be an error
in a keyboard. Note: virtual keys in output are officially unsupported
but still kinda sorta a little bit work in Windows -- but I doubt they
will ever be officially supported.

Also includes small side journey to tidy up names and constants for two
other tests (error_duplicate_group and error_duplicate_store).
2023-10-31 14:04:26 +07:00
Marc Durdin
236b1ebc54 fix(developer): enable and update unit tests
Several unit tests were not running as they were not referenced in
developer/src/test/auto/Makefile. This meant that some tests were
outdated:

* two keyboard fixtures needed recompiling with kmcomp in order to match
* some interfaces had changed slightly, necessitating updates to
  corresponding unit tests.
2023-10-31 13:50:34 +07:00
Marc Durdin
0d36fc0cf8 fix(developer): enable line breaks in debugger
Fixes #9444.
2023-10-31 12:59:51 +07:00
Marc Durdin
3d6c3c81eb fix(developer): open editor links in new window
Fixes #9849.
2023-10-31 12:44:07 +07:00
Marc Durdin
3db78a2244 chore(developer): change field label to 'Related Package ID' in Related Packages dialog
Fixes #9853.
2023-10-31 11:50:53 +07:00
Marc Durdin
b2d628dc79 fix(developer): Project MRU now saves correctly
Fixes #9899.

Several problems resolved here:
* project mru did not refresh the welcome screen on first load, so the
  welcome screen was often showing projects that were no longer relevant
* content saved to registry did not match expectations on load, so mru
  never worked between sessions (always flushed on reload)
* synchronization between simultaneous sessions did not work, because
  the list was only saved when Keyman Developer exited

Minor tidyup:
* WideString -> string -- legacy cleanup from when Delphi was
  non-Unicode.
* Reordered functions to group more clearly.

Note: the issue was not that there was both registry and xml content;
the source of truth is the registry for Project MRU, and project_mru.xml
is copied from that for the welcome screen. So instead of taking the
fix recommended in #9899, have addressed this by fixing the above points
in the registry code.
2023-10-31 10:46:35 +07:00
Marc Durdin
68c1bcd454 fix(developer): debug flag for compiling keyboards
Fixes #9885.

The 'Include Debug Info' flag was being ignored by the kmc wrapper.
2023-10-31 09:39:35 +07:00
Marc Durdin
f3e4507484 fix(developer): compiler crash when no project loaded
Fixes #9889.

This arises from a deprecated way of using Keyman Developer by starting
Keyman Developer by opening a keyboard .kmn file from Explorer, which
causes Developer to run in a 'projectless' mode. This was not tested in
the new compiler integration, and that has caused this crash.

In 'projectless' mode, there is still a global 'untitled' project, but
the files loaded do not 'belong' to it. The compiler settings are
inherited from the global 'untitled' project in this case.
2023-10-31 06:06:02 +07:00
Marc Durdin
83ca8783e3
Merge pull request #9861 from keymanapp/fix/developer/9851-fill-from-layout-displaymap-path
fix(developer): handle displayMap correctly with 'fill from layout'
2023-10-28 17:50:13 +11:00
Steven R. Loomis
d1bbdbf07a fix(developer): ldml improve key compiler 🙀
- shorten one line

For feat(developer): ldml re-sync with CLDR v44 spec 🙀  #9838
2023-10-26 21:45:32 -05:00
Steven R. Loomis
3176f88ba4 fix(developer): ldml only hint on normalization=disabled 🙀
For feat(developer): ldml re-sync with CLDR v44 spec 🙀  #9838
2023-10-26 21:42:21 -05:00
Steven R. Loomis
f72c571696
Merge branch 'master' into chore/developer/9838-cldr44-epic-ldml 2023-10-26 18:38:14 -05:00
Steven R. Loomis
a45dc5c345 chore(developer): ldml update to prefinal v44 🙀
-  fix binary size issue
- upstream: issue in abnt2 sample keyboard

For feat(developer): ldml re-sync with CLDR v44 spec 🙀  #9838
2023-10-26 18:21:56 -05:00
Steven R. Loomis
4d358cabda chore(developer): ldml update to prefinal v44 🙀
-  utilities for extracting key ids
-  more key validation and munging
-  touch layout
-  fix basic.txt

For feat(developer): ldml re-sync with CLDR v44 spec 🙀  #9838
2023-10-26 12:57:07 -05:00
Marc Durdin
e321e54458 fix(developer): handle displayMap correctly with 'fill from layout'
Fixes #9851.

Two fixes:

* errors from loading the displayMap from disk should be handled before
  passing result to next function
* temp compile of the .kmn for the 'fill from layout' function should be
  in the same path as the original .kmn, so that referenced files can be
  located
2023-10-26 14:47:53 +07:00