From a06d8afa579d60bbb98d5a0f80dc602c81969fd8 Mon Sep 17 00:00:00 2001 From: tshino Date: Fri, 27 Jan 2023 23:32:35 +0900 Subject: [PATCH] Update DESIGN.md --- DESIGN.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index 01f7f3c9..29fd9bbe 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -53,7 +53,7 @@ Why don't we use the wrapper keybindings always to simplify things? Because we w This extension defines a large set of keybindings to capture all the default keyboard shortcuts of VS Code. -The list of default keybindings wrappers is defined in the [`package.json` of this extension](package.json). The list is automatically generated by a script [`generator/gen_wrapper.js`](generator/gen_wrapper.js). The script takes three keybindings JSON files where each one contains the default keybindings of VS Code for Windows, Linux, and macOS respectively, and combines all the keybindings in them with additional context such as `isWindows`, `isLinux`, or `isMac` as needed, and convert them to wrappers and write them into `keybindings` section of the `package.json`. +The list of default keybindings wrappers is defined in the [`package.json` of this extension](package.json). The list is automatically generated by a script [`generator/gen_wrapper.js`](generator/gen_wrapper.js). The script takes three keybindings JSON files where each one containing the default keybindings of VS Code for Windows, Linux, and macOS respectively, and combines all the keybindings in them with additional context such as `isWindows`, `isLinux`, or `isMac` as needed, and convert them to wrappers and write them into `keybindings` section of the `package.json`. | Related files | | | ------------- | --- | @@ -119,7 +119,7 @@ As far as I know, an extension is allowed to override the `type` built-in comman It was not clear whether overriding the `type` command to capture typed characters is a good way for this extension. Especially if you use this extension combined with another extension that is overriding the `type` command too, there would be a conflict, and likely they will not work correctly. See [vscode#13441](https://github.com/Microsoft/vscode/issues/13441). -So this extension took another way to capture typed characters. That is to listen to the events on changes on the text document. Basically this is possible through the `vscode.workspace.onDidChangeTextDocument` event. +So this extension took another way to capture typed characters. That is to listen to the events on changes on the text document. Basically, this is possible through the `vscode.workspace.onDidChangeTextDocument` event. This is implemented in [`src/typing_detector.js`](src/typing_detector.js). @@ -150,7 +150,7 @@ These command patterns are implemented in [`src/reentrant_guard.js`](src/reentra ## API -This extension provides an experimental API that other extensions could use to realize custom keyboard automation in a different manner than this extension. [Dynamic Macro](https://marketplace.visualstudio.com/items?itemName=tshino.dynamic-macro) is an extension that uses this API. You can find some details and the background information at [#176](https://github.com/tshino/vscode-kb-macro/issues/176). +This extension provides an experimental API that other extensions could use to realize custom keyboard automation in a different manner than this extension. [Dynamic Macro](https://marketplace.visualstudio.com/items?itemName=tshino.dynamic-macro) is an extension that uses this API. You can find some details and background information at [#176](https://github.com/tshino/vscode-kb-macro/issues/176). ## Testing @@ -161,7 +161,7 @@ test/ suite/ *.test.js ``` -They can be categorized roughly into two types. One is unit tests, and the other is integration tests. A test that has the name `playback_*.test.js` is an integration test, which checks the recording and playback functionality focusing on a certain category of target commands/keybindings or on a functionality of this extension. +They can be categorized roughly into two types. One is unit tests, and the other is integration tests. A test that has the name `playback_*.test.js` is an integration test, which checks the recording and playback functionality focusing on a certain category of target commands/keybindings or on a particular functionality of this extension. The following command runs the tests: ``` @@ -171,7 +171,7 @@ And it's [running on GitHub Actions](https://github.com/tshino/vscode-kb-macro/a ### End-to-end tests -Unfortunately, we don't have any end-to-end tests which are critical for this kind of extension. Because we use [`vscode-test`](https://github.com/microsoft/vscode-test) and it doesn't provide UI level testing functionalities such as sending keystrokes to VS Code. +Unfortunately, we don't have any end-to-end tests which are critical for this kind of extension. Because we use [`vscode-test`](https://github.com/microsoft/vscode-test) and it doesn't provide UI-level testing functionalities such as sending keystrokes to VS Code. The lack of end-to-end tests means we can't test the validity of the keybindings defined in the `package.json` through the test based on `vscode-test`.