Commit graph

352 commits

Author SHA1 Message Date
Marc Durdin
a918cc182f fix(developer): keyboard that targets only web can cause crashes and other problems
Fixes #10655.
Fixes #10663.

If a .kmn file had only a .js target, then Keyman Developer would return
an empty string for the target (based on .kmx). This meant that the path
for the compiler was an empty string, the path for opening the build
folder was an empty string.

Refactored the relevant code to simplify the logic a little.
2024-02-07 13:15:51 +07:00
Marc Durdin
1b88ab99be fix(core): make km_core_state_get_actions() idempotent
Fixes #10582.

Returned struct from the `km_core_state_get_actions()` API is now owned
by the state object. This is a change in API contract. The corresponding
`km_core_actions_dispose()` API has been made private, because there is
never any need for API consumers to call it. As this change is happening
in alpha, we won't bump the ABI version.

`state->app_context` is now guaranteed to be in sync with
`state->context` after `km_core_process_event()`, with the actions
struct populated at that point.

The next and final step in this refactor is to remove the actions queue
altogether from the Core and make that a kmn-only concept, but that will
wait until 18.0. The only consumers of the actions queue are the
kmn-specific interactive debugger in Keyman Developer, and kmn-specific
Input Method eXtensions in Keyman Engine for Windows.
2024-02-01 11:28:08 +07:00
Marc Durdin
f546c44048
Merge pull request #10390 from keymanapp/epic/core/9999-normalization
epic: Keyman Core normalization 🌱
2024-01-31 10:45:51 +11:00
Marc Durdin
868247e9fe chore(core): address review comments 2024-01-30 07:36:52 +07:00
Marc Durdin
8501f2aa6d feat(core): add deleted_context to km_core_actions struct
Fixes #10530.

Adds the deleted_context member to the km_core_actions struct, and
associated unit tests. Simplifies integration by providing the consumer
with all the data they need in order to execute the transform,
specifically around number of delete operations required, without
needing to query the target application context again. The number of
delete operations will vary according to application compliance and
selected encoding; for example a UTF-16 string may require 2
delete-backs for surrogate pairs in the text buffer for a compliant app,
whereas there will be a single delete-back key event for a non-compliant
app.

The deleted_context member should also be used for debug assertions.
2024-01-29 13:21:25 +07:00
Marc Durdin
0e16d7218b fix(developer): support surrogate pairs in ldml debugger
Fixes #10501.
2024-01-29 10:57:58 +07:00
Marc Durdin
95d3261a8a
Merge pull request #10473 from keymanapp/fix/developer/10469-use-keyboard3-tag
fix(developer): use keyboard3 tag rather than DTD to identify LDML keyboard xml files 🌱
2024-01-26 15:31:14 +11:00
Marc Durdin
c5e9a8ce35
Merge branch 'refactor/developer/10214-debugger-app-context' into feat/developer/10416-10458-ldml-debugger-markers 2024-01-26 09:50:06 +11:00
Marc Durdin
4f25e80ccb
Merge branch 'fix/developer/10456-ldml-keyboard-editor-font' into refactor/developer/10214-debugger-app-context 2024-01-24 19:39:45 +11:00
Marc Durdin
d6a9c74762
Merge branch 'fix/developer/10457-ldml-keyboard-editor-xml-mode' into fix/developer/10456-ldml-keyboard-editor-font 2024-01-24 19:39:30 +11:00
Marc Durdin
49b0c826ce
Merge branch 'feat/developer/10420-ldml-keyboard-test' into fix/developer/10457-ldml-keyboard-editor-xml-mode 2024-01-24 19:39:15 +11:00
Marc Durdin
5111e5b32b
Merge pull request #10359 from keymanapp/chore/developer/10357-ngrok-v3
chore(developer): upgrade ngrok to v3
2024-01-24 19:29:02 +11:00
Marc Durdin
e8cf7bf89c
Merge branch 'epic/core/9999-normalization' into feat/developer/10420-ldml-keyboard-test 2024-01-24 18:12:43 +11:00
Marc Durdin
11359737f3 chore(developer): remove ngrok region entirely 2024-01-24 12:16:10 +07:00
Marc Durdin
de4897213d
Merge pull request #10436 from keymanapp/feat/developer/10135-create-ldml-keyboard-project
feat(developer): New LDML Keyboard Project form 🌱
2024-01-24 15:41:18 +11:00
Marc Durdin
7b0406d64d fix(developer): use keyboard3 tag rather than DTD to identify LDML keyboard xml files
Fixes #10469.
2024-01-23 13:37:57 +07:00
Marc Durdin
ebccb23c41 chore(developer): remove old proc reference 2024-01-23 13:34:41 +07:00
Marc Durdin
7e41ecb358 feat(developer): LDML keyboard test window marker support
Fixes #10458.

Refactors the LDML keyboard test window significantly, in order to be
able to support markers. Cleans up the state machine for the debug
window in the process, as that was complicating the changes. Removes
a lot of extraneous code in the debug window.
2024-01-23 12:42:28 +07:00
Marc Durdin
39b64be67a refactor(developer): use km_core_state_get_actions for LDML keyboard debugger
Relates to #10416.

Moves from using action queue to action struct for the LDML keyboard
debugger. Does not do the same for the KMX keyboard debugger, because
that relies on action items to do single-step debugging.
2024-01-23 12:42:27 +07:00
Marc Durdin
aee59db892 refactor(developer): update app context as well as cached context for KMN keyboard debugger
Fixes #10214.
2024-01-22 08:42:00 +07:00
Marc Durdin
fe88d04bdf refactor(developer): update app context as well as cached context for LDML keyboard debugger
Relates to #10214.
2024-01-22 08:30:17 +07:00
Marc Durdin
0c3b153ca0 fix(developer): support for char + code font in LDML keyboard editor
Fixes #10456.
2024-01-22 07:45:37 +07:00
Marc Durdin
ee9763d43a fix(developer): Use XML mode for LDML keyboard editor
Fixes #10457.
2024-01-22 06:50:53 +07:00
Marc Durdin
236865f046 feat(developer): LDML Keyboard Test Window
Fixes #10420.

Implements a basic LDML keyboard test window. Press F5 or Keyboard/Test
to start test. Shows a character grid for each character in the text.

Does not yet support display of markers (#10458). Does not support
interactive debugging, nor any more detailed status information.
2024-01-22 06:41:13 +07:00
Marc Durdin
cb6968b1c0 chore(developer): fixup generated xml to valid sample keyboard 2024-01-19 11:47:20 +07:00
Marc Durdin
2b02d73347 feat(developer): New LDML Keyboard Project form
Fixes #10135.

Adds a new LDML Keyboard Project template and form, and allows
instantiation from kmconvert command-line and from the New Project
dialog in Keyman Developer IDE.
2024-01-18 15:19:41 +07:00
Marc Durdin
83f80c061a refactor(core): remove unused context APIs
Fixes #10431.

The `km_core_` prefix has been removed from internal-only functions, and
these function declarations moved to context.hpp.

The functions have not been moved from km_core_context_api.cpp at this
stage.

Rewrote the function documentation in Javadoc style comments for the
internal use functions.
2024-01-18 12:18:07 +07:00
Eberhard Beilharz
67cf76362d
Merge pull request #10354 from keymanapp/refactor/linux/10212_set-context
refactor(linux): Use `km_core_state_context_set_if_needed`
2024-01-12 08:54:21 +01:00
Marc Durdin
9830f9ea24 refactor(core): use km_core_state_context_clear where possible
Relates to #10365.

Use `km_core_state_context_clear()` instead of `km_core_context_clear()`
as part of eliminating use of `km_core_state_context()`.
2024-01-12 12:05:00 +07:00
Marc Durdin
33f0faf4f7
Merge pull request #10323 from keymanapp/fix/developer/10276-new-file-for-2.0-projects
fix(developer): new file support for project 2.0
2024-01-11 18:40:26 +11:00
Marc Durdin
ade94d67ca
Merge pull request #10322 from keymanapp/fix/developer/10315-fill-from-layout-handle-new-file
fix(developer): cleanly handle filling a new osk file from layout
2024-01-11 18:40:14 +11:00
Marc Durdin
c5e3309c9a chore(developer): upgrade ngrok to v3
Fixes #10357.
2024-01-11 09:29:46 +07:00
Marc Durdin
070ead74cf fix(developer): new file support for handle project 2.0
Fixes #10276.

Adding new files to a v2.0 project was unsupported. This requires a
little bit of a logic change to the two new File New dialogs:

1. The New File Details dialog does not allow changing from the
   SourcePath of the project.
2. The New File dialog does allow changing to any path. If you select a
   path outside the project path, it will open in a new window.
2024-01-05 14:19:02 +07:00
Marc Durdin
beddf05afa fix(developer): cleanly handle filling a new osk file from layout
Fixes #10315.

When filling from layout, if the .kvks file did not exist, an obscure
error was generated:

    Error: 2908 Error encountered parsing eo_plus.kvks: TypeError: Cannot read properties of null (reading 'byteLength')

Fixed this by checking for file existence before attempting to process,
which then reports a more understandable error of 'file not found'.

Then, needed to tweak the caller in Keyman Developer IDE to remove the
reference to the .kvks file before attempting to build
(chicken-and-egg).
2024-01-05 13:35:43 +07:00
Marc Durdin
84ff0424c3 fix(developer): remove unused tools/customise menu 2024-01-05 12:49:39 +07:00
Marc Durdin
69a11c9ceb chore(developer): Merge branch 'master' into feat/developer/10161-developer-settings-in-rc 2023-12-13 05:05:53 +07:00
Marc Durdin
2f59e8d38b
Merge pull request #10211 from keymanapp/fix/developer/10091-10194-touch-layout-builder-errors
fix(developer): two errors in touch layout editor
2023-12-13 08:46:04 +11:00
Marc Durdin
1b45c6b8e9
Merge pull request #10155 from keymanapp/feat/developer/10138-new-project-new-process
feat(developer): New Project opens in new process 🦕
2023-12-13 08:45:53 +11:00
Marc Durdin
0b05013fc8
Merge pull request #10154 from keymanapp/feat/developer/10149-window-menu
feat(developer): Add Window menu 🦕
2023-12-13 08:45:43 +11:00
Marc Durdin
1f06224c6e
Merge pull request #10151 from keymanapp/fix/developer/10144-10145-10146-10148
fix(developer): various project fixes 🦕
2023-12-13 08:45:30 +11:00
Marc Durdin
ee7d6e67d9 chore(developer): refactor IsTemporaryProject 2023-12-13 04:43:34 +07:00
Marc Durdin
59cb7b25d3 chore(developer): Merge branch 'master' into feat/developer/10161-developer-settings-in-rc 2023-12-11 21:13:33 +07:00
Marc Durdin
01fe68a66d feat(developer): Move options to ~/.keymandeveloper/options.json
Fixes #10161.

Includes transition of existing options from registry to options.json,
and once options.json exists, will always read from that and ignore
registry. Was able to eliminate some of the legacy datatype usage for
several options. Reader/writer includes naive file lock retry to avoid
contention, which I am hopeful will be sufficient for our needs, given
the low chance of contention.
2023-12-11 15:31:21 +07:00
Marc Durdin
3a91c7d197 chore(developer): move IDEOptions key responsibility into KeymanDeveloperOptions
First part of addressing #10161 is to refactor the existing usage of the
registry values into the common KeymanDeveloperOptions unit. This was
mostly straightforward except for the changes to KeymanSentryClient,
which happens to be the most important part of this particular fix.
2023-12-11 13:48:43 +07:00
Marc Durdin
39a53d439a fix(developer): error when rescaling touch layout editor keys
Fixes #10194.
2023-12-11 12:39:33 +07:00
Marc Durdin
61a0155435 fix(developer): touch layout editor wedges don't scroll
Fixes #10091.
2023-12-11 12:39:01 +07:00
Marc Durdin
22b7f5bf07 fix(developer): crash loading a project when referenced .xml is missing
Fixes #10181.
2023-12-11 12:05:56 +07:00
Marc Durdin
40b5828263 feat(developer): New Project opens in new process
Fixes #10138.

If the current instance of Keyman Developer already has a project open,
then the New Project dialog will now open the new project in a new
instance of Keyman Developer.

Note: this also moves a couple of functions out of dmActionsMain and
into UfrmMain, as their functionality belongs more closely there. The
`TmodActionsMain.OpenProject` function has been renamed to
`TfrmMain.OpenProjectInCurrentProcess` to clarify its usage and context.
2023-12-06 12:10:12 +07:00
Marc Durdin
86e1728f97 feat(developer): Add Window menu
Fixes #10149.
2023-12-06 11:45:16 +07:00
Marc Durdin
fe772e1008 fix(developer): Validate SourcePath and BuildPath in Project Settings
Fixes #10148.

We now force the SourcePath and BuildPath project properties to be a
direct subfolder of the project folder, in order to avoid issues with
paths in the future. This is only applied to v2.0 projects, and only
enforced via the UI at this point.
2023-12-06 09:55:26 +07:00