Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(developer): add user interface for kmc copy to TIKE #13076

Open
wants to merge 3 commits into
base: fix/developer/13072-make-kmc-log-options-consistent
Choose a base branch
from

Conversation

mcdurdin
Copy link
Member

@mcdurdin mcdurdin commented Jan 30, 2025

Adds a new set of 'New Project' dialogs to allow authors to easily copy keyboards from local filesystem, Keyman Cloud (including a keyboard search web page, implemented in keymanapp/keyman.com#536), and directly from a GitHub URL. Adds related documentation.

Clone from local filesystem:
image

Clone from Keyman Cloud:
image

Clone from GitHub:
image

Fixes: #13073
Depends-on: keymanapp/keyman.com#536

User Testing

Please note that user test of TEST_CLONE_CLOUD is blocked until keymanapp/keyman.com#536 is merged.

For each of these tests, follow the steps to clone the project, using a new keyboard/lexical model id of your choice, and then make sure that the newly created project builds successfully.

Adds a new set of 'New Project' dialogs to allow authors to easily copy
keyboards from local filesystem, Keyman Cloud (including a keyboard
search web page, implemented in keymanapp/keyman.com#536), and
directly from a GitHub URL. Adds related documentation.

Fixes: #13073
Depends-on: keymanapp/keyman.com#536
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Jan 30, 2025

User Test Results

Test specification and instructions

Test Artifacts


Projects can also be cloned from the command line with [`kmc copy`](kmc).

Only keyboard projects can be cloned from Keyman Cloud at this time via this
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the user tries to clone

  • a legacy keyboard where the source isn't available?
  • a multi-keyboard package?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good questions. The legacy keyboard would generate an error in the kmc-copy log, so the user would get feedback that way. An open source multi-keyboard package should copy fine -- the .kpj and .kps would get the new id, but the keyboards within would retain their original names. Would be worth a test for each of these, and so I'll give that a go.

developer/docs/help/context/new-project.md Outdated Show resolved Hide resolved
@dinakaranr
Copy link

dinakaranr commented Jan 30, 2025

Test Results

I tested this issue with the attached "Keyman-18.0.178-alpha-test-13076" build(30/01/2025) on Windows 10. I'm sharing my observation here.

  • TEST_CLONE_LOCAL (Passed):
  1. Open the Keyman Developer application.
  2. Open the "Clone local project" dialog by clicking the project -> New Project --> Clone local project.
  3. "Source project filename": Select the keyboard *.kpj file from the Local GitHub clone directory.
  4. Enter the project name in the "New project ID" text box.
  5. Click the "Ok" button on the dialog.
    It works well. Thank you.
  • TEST_CLONE_MODEL_LOCAL (Failed):
  1. Open the Keyman_Developer application.
  2. Open the "Clone local project" dialog by clicking the project -> New Project --> Clone local project.
  3. "Source project filename": Select the keyboard *.kpj file from the local GitHub clone directory.(lexical-models)
  4. Enter the project name in the "New project ID" text box.
  5. Click the "Ok" button on the dialog.
    Actual Results: Here, an Error line appeared in the message box. (I have entered the project name in lowercase. but still, I am getting an error)
    Please take a look below screenshot
  • TEST_CLONE_CLOUD (Failed):
  1. Open the Keyman_Developer application.
  2. Open the "Clone project from Keyman Cloud" dialog by clicking the project -> New Project --> Clone project from Keyman Cloud.
    Actual Results: Here, the Search box does not appear instead of "Not Found" message appears.
    Please take a look below screenshot
  • TEST_CLONE_GITHUB (Passed):
  1. Open the Keyman_Developer application.
  2. Open the "Clone project from GitHub" dialog by clicking the project -> New Project --> Clone project from GitHub.
  3. "GitHub URL": Paste the keyboard's GitHub URL
  4. Enter the project name in the "New project ID" text box.
  5. Click the "Ok" button on the dialog.
    It works well. Thank you.
  • TEST_CLONE_MODEL_GITHUB (Failed):
  1. Open the Keyman_Developer application.
  2. Open the "Clone project from GitHub" dialog by clicking the project -> New Project --> Clone project from GitHub.
  3. "GitHub URL": Paste the keyboard's GitHub URL(Lexical model)
  4. Enter the project name in the "New project ID" text box.
  5. Click the "Ok" button on the dialog.
    Actual Results: Here, an Error line appeared in the message box. (I have entered the project name in lowercase. but still, I am getting an error)
    Please take a look below screenshot

@keymanapp-test-bot keymanapp-test-bot bot added user-test-failed and removed user-test-required User tests have not been completed labels Jan 30, 2025
Copy link
Contributor

@darcywong00 darcywong00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcdurdin
Copy link
Member Author

@dinakaranr thank you for running these tests. I have updated the user interface to clarify that lexical model IDs should match the pattern author.bcp47.uniq

The test TEST_CLONE_CLOUD was dependent on keymanapp/keyman.com#536 being merged, and that has now been merged.

Can you please re-test all given the changes that I have implemented? Thank you!

@keymanapp-test-bot retest

@keymanapp-test-bot keymanapp-test-bot bot added user-test-required User tests have not been completed and removed user-test-failed labels Jan 31, 2025
Copy link
Contributor

@rc-swag rc-swag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dinakaranr
Copy link

Test Results

I tested this issue with the attached "Keyman-18.0.178-alpha-test-13076" build(31/01/2025) on Windows 10. I'm sharing my observation here.

  • TEST_CLONE_LOCAL (Passed):
  1. Open the Keyman Developer application.
  2. Open the "Clone local project" dialog by clicking the project -> New Project --> Clone local project.
  3. "Source project filename": Select the keyboard *.kpj file from the Local GitHub clone directory.
  4. Enter the project name in the "New project ID" text box.
  5. Click the "Ok" button on the dialog.
  6. Verified that the project copied and local directory. It opened in a new window.
    It works well. Thank you.
  • TEST_CLONE_MODEL_LOCAL (Passed):
  1. Open the Keyman_Developer application.
  2. Open the "Clone local project" dialog by clicking the project -> New Project --> Clone local project.
  3. "Source project filename": Select the keyboard *.kpj file from the local GitHub clone directory.(lexical-models)
  4. Enter the project name in the "New project ID" text box.
  5. Click the "Ok" button on the dialog.
  6. Verified that the project copied and local directory. It opened in a new window.
  7. It works well. Thank you.
  • TEST_CLONE_CLOUD (Passed):
  1. Open the Keyman_Developer application.
  2. Open the "Clone project from Keyman Cloud" dialog by clicking the project -> New Project --> Clone project from Keyman Cloud.
  3. "Clone project from Keyman Cloud" appeared.
  4. Enter the keyboard in the search box.
  5. Enter the project name in the "New project ID" text box.(in lowercase)
  6. Verified that the project was downloaded and copied in the local directory. It opened in a new window.
  7. It works well. Thank you.
    Note: I tried six projects. four projects succeeded and two projects failed.(Message: could not be downloaded)
    Please refer to the attached text file.
    Scenario3and5.txt
  • TEST_CLONE_GITHUB (Passed):
  1. Open the Keyman_Developer application.
  2. Open the "Clone project from GitHub" dialog by clicking the project -> New Project --> Clone project from GitHub.
  3. "GitHub URL": Paste the keyboard's GitHub URL
  4. Enter the project name in the "New project ID" text box.
  5. Click the "Ok" button on the dialog.
  6. Verified that the project was downloaded and copied in the local directory. It opened in a new window.
    It works well. Thank you.
  • TEST_CLONE_MODEL_GITHUB (Passed):
  1. Open the Keyman_Developer application.
  2. Open the "Clone project from GitHub" dialog by clicking the project -> New Project --> Clone project from GitHub.
  3. "GitHub URL": Paste the keyboard's GitHub URL(Lexical model)
  4. Enter the project name in the "New project ID" text box.
  5. Click the "Ok" button on the dialog.
  6. Verified that the project was downloaded and copied in the local directory. It opened in a new window.
    It works well. Thank you.
    Note: I tried six projects. four projects succeeded and two projects failed. (Message: could not be downloaded)
    Please refer to the attached text file.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Jan 31, 2025
@darcywong00 darcywong00 removed this from the A18S20 milestone Feb 1, 2025
@darcywong00 darcywong00 added this to the B18S1 milestone Feb 1, 2025
@mcdurdin
Copy link
Member Author

mcdurdin commented Feb 3, 2025

7. Note: I tried six projects. four projects succeeded and two projects failed.(Message: could not be downloaded)
Please refer to the attached text file.

These messages had the following pattern

info KM0B01B: The Keyman binary file 'keymanapp/keyboards/tree/master//release/rac/rac_marwari/build/rac_marwari.kmx' could not be downloaded: Error downloading https://raw.githubusercontent.com/keymanapp/keyboards/refs/heads/master/release/rac/rac_marwari/build/rac_marwari.kmx HTTP error 404: Not Found. This is not normally a problem

The important thing to note is 'This is not normally a problem'. Looking up the reference for the error message KM0B01B shows us:

$ kmc message b01b

INFO_CannotDownloadBinaryFileFromGitHub
* Code:      KM0B01B
* Module:    kmc-copy.CopierMessages
* Message:   The Keyman binary file '<param>' could not be downloaded: <param> <param>. This is not normally a problem
* Reference: https://kmn.sh/km0b01b

In most repositories, Keyman binary files such as .kmx, .kmp, .js are not included.
This is not normally a problem, as the files can be built from the source. Check
the provided error details for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

feat(developer): add kmc copy UI to Keyman Developer
4 participants