Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into chore/common/1018…
Browse files Browse the repository at this point in the history
…3-unicode-version
  • Loading branch information
srl295 committed May 23, 2024
2 parents 4fc2e39 + 2772b8c commit 490b510
Show file tree
Hide file tree
Showing 566 changed files with 22,193 additions and 17,549 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body:
### Before you start
Before you submit this bug report, have you searched other reports for this bug?
https://github.com/keymanapp/keyman/issues?q=is%3Aopen+is%3Aissue+label%3Abug
https://github.com/keymanapp/keyman/issues?q=is%3Aissue+label%3Abug
* If you find a matching issue, go ahead and add a comment on that issue.
* If you find related issues, make sure you list them below.
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
attributes:
value: |
Before you submit this feature request, have you searched existing requests?
https://github.com/keymanapp/keyman/issues?q=is%3Aopen+is%3Aissue+label%3Afeat
https://github.com/keymanapp/keyman/issues?q=is%3Aissue+label%3Afeat
* If you find a matching issue, go ahead and add a comment on that issue.
* If you find related issues, make sure you list them below.
Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/api-verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: "API Verification"
on:
workflow_run:
workflows: [Ubuntu packaging]
types:
- completed

env:
STATUS_CONTEXT: 'API Verification'
PKG_NAME: 'libkeymancore'
GH_TOKEN: ${{ github.token }}

jobs:
setup_environment:
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.environment_step.outputs.VERSION }}
PRERELEASE_TAG: ${{ steps.environment_step.outputs.PRERELEASE_TAG }}
GIT_SHA: ${{ steps.environment_step.outputs.GIT_SHA }}
GIT_BASE: ${{ steps.environment_step.outputs.GIT_BASE }}
IS_TEST_BUILD: ${{ steps.environment_step.outputs.IS_TEST_BUILD }}
GIT_BRANCH: ${{ steps.environment_step.outputs.GIT_BRANCH }}
GIT_BASE_BRANCH: ${{ steps.environment_step.outputs.GIT_BASE_BRANCH }}
GIT_USER: ${{ steps.environment_step.outputs.GIT_USER }}

steps:
- name: Restore artifacts
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: |
artifacts
key: artifacts-key-${GITHUB_RUN_ID}
restore-keys: artifacts-key-

- name: Read environment
id: environment_step
run: |
cat artifacts/env >> $GITHUB_OUTPUT
api_verification:
name: Verify API for libkeymancore.so
needs: setup_environment
runs-on: ubuntu-latest

steps:
- name: Set pending status on PR builds
id: set_status
if: needs.setup_environment.outputs.IS_TEST_BUILD == 'true'
shell: bash
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/$GITHUB_REPOSITORY/statuses/${{ needs.setup_environment.outputs.GIT_SHA }} \
-f state='pending' \
-f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
-f description='API verification started' \
-f context="$STATUS_CONTEXT"
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
ref: '${{ needs.setup_environment.outputs.GIT_SHA }}'
fetch-depth: 0

- name: Install devscripts
uses: ./.github/actions/apt-install
with:
packages: devscripts equivs

- name: "Verify API for libkeymancore.so (${{ needs.setup_environment.outputs.GIT_BRANCH }}, branch ${{ needs.setup_environment.outputs.GIT_BASE_BRANCH }}, by ${{ needs.setup_environment.outputs.GIT_USER }}) - "
run: |
cd linux
./scripts/deb-packaging.sh \
--gha \
--bin-pkg "${GITHUB_WORKSPACE}/artifacts/${PKG_NAME}_${{ needs.setup_environment.outputs.VERSION }}-1${{ needs.setup_environment.outputs.PRERELEASE_TAG }}+$(lsb_release -c -s)1_amd64.deb" \
--git-sha "${{ needs.setup_environment.outputs.GIT_SHA }}" \
--git-base "${{ needs.setup_environment.outputs.GIT_BASE }}" \
verify 2>> $GITHUB_STEP_SUMMARY
- name: Archive .symbols file
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: libkeymancore.symbols
path: linux/debian/tmp/DEBIAN/symbols
if: always()

set_status:
name: Set result status on PR builds
needs: [setup_environment, api_verification]
runs-on: ubuntu-latest
if: ${{ always() && needs.setup_environment.outputs.IS_TEST_BUILD == 'true' }}
steps:
- name: Set success
if: needs.api_verification.result == 'success'
run: |
echo "RESULT=success" >> $GITHUB_ENV
echo "MSG=Package build succeeded" >> $GITHUB_ENV
- name: Set cancelled
if: needs.api_verification.result == 'cancelled'
run: |
echo "RESULT=error" >> $GITHUB_ENV
echo "MSG=Package build cancelled" >> $GITHUB_ENV
- name: Set failure
if: needs.api_verification.result == 'failure'
run: |
echo "RESULT=failure" >> $GITHUB_ENV
echo "MSG=Package build failed" >> $GITHUB_ENV
- name: Set final status
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
/repos/$GITHUB_REPOSITORY/statuses/${{ needs.setup_environment.outputs.GIT_SHA }} \
-f state="$RESULT" \
-f target_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \
-f description="$MSG" \
-f context="$STATUS_CONTEXT"
53 changes: 20 additions & 33 deletions .github/workflows/deb-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,70 +291,57 @@ jobs:
done
echo "::endgroup::"
api_verification:
prepare_api_verification:
name: Verify API for libkeymancore.so
needs: [sourcepackage, binary_packages_released]
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
ref: '${{ github.event.client_payload.buildSha }}'
fetch-depth: 0

- name: Download Artifacts
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
path: artifacts
merge-multiple: true

- name: Install devscripts
uses: ./.github/actions/apt-install
with:
packages: devscripts equivs

- name: Verify API
- name: Save environment
run: |
cd linux
# Extract line containing "Package: libkeymancore1" and then strip "Package: "
PKG_NAME=$(grep -E 'Package: libkeymancore([0-9]+|$)' debian/control)
PKG_NAME="${PKG_NAME#Package: }"
./scripts/deb-packaging.sh \
--gha \
--bin-pkg "${GITHUB_WORKSPACE}/artifacts/${PKG_NAME}_${{ needs.sourcepackage.outputs.VERSION }}-1${{ needs.sourcepackage.outputs.PRERELEASE_TAG }}+jammy1_amd64.deb" \
--git-sha "${{ github.event.client_payload.buildSha }}" \
--git-base "${{ github.event.client_payload.baseRef }}" \
verify 2>> $GITHUB_STEP_SUMMARY
- name: Archive .symbols file
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
echo "VERSION=${{ needs.sourcepackage.outputs.VERSION }}" > artifacts/env
echo "PRERELEASE_TAG=${{ needs.sourcepackage.outputs.PRERELEASE_TAG }}" >> artifacts/env
echo "GIT_SHA=${{ github.event.client_payload.buildSha }}" >> artifacts/env
echo "GIT_BASE=${{ github.event.client_payload.baseRef }}" >> artifacts/env
echo "IS_TEST_BUILD=${{ github.event.client_payload.isTestBuild }}" >> artifacts/env
echo "GIT_BRANCH=${{ github.event.client_payload.branch }}" >> artifacts/env
echo "GIT_BASE_BRANCH=${{ github.event.client_payload.baseBranch }}" >> artifacts/env
echo "GIT_USER=${{ github.event.client_payload.user }}" >> artifacts/env
- name: Cache artifacts
uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
name: libkeymancore.symbols
path: linux/debian/tmp/DEBIAN/symbols
if: always()
path: |
artifacts
key: artifacts-key-${GITHUB_RUN_ID}

# We intentionally ignore the results of binary_packages_unreleased
set_status:
name: Set result status on PR builds
needs: [sourcepackage, binary_packages_released, api_verification, autopkg_test]
needs: [sourcepackage, binary_packages_released, prepare_api_verification, autopkg_test]
runs-on: ubuntu-latest
if: ${{ always() && github.event.client_payload.isTestBuild == 'true' }}
steps:
- name: Set success
if: needs.sourcepackage.result == 'success' && needs.binary_packages_released.result == 'success' && needs.api_verification.result == 'success' && needs.autopkg_test.result == 'success'
if: needs.sourcepackage.result == 'success' && needs.binary_packages_released.result == 'success' && needs.prepare_api_verification.result == 'success' && needs.autopkg_test.result == 'success'
run: |
echo "RESULT=success" >> $GITHUB_ENV
echo "MSG=Package build succeeded" >> $GITHUB_ENV
- name: Set cancelled
if: needs.sourcepackage.result == 'cancelled' || needs.binary_packages_released.result == 'cancelled' || needs.api_verification.result == 'cancelled' || needs.autopkg_test.result == 'cancelled'
if: needs.sourcepackage.result == 'cancelled' || needs.binary_packages_released.result == 'cancelled' || needs.prepare_api_verification.result == 'cancelled' || needs.autopkg_test.result == 'cancelled'
run: |
echo "RESULT=error" >> $GITHUB_ENV
echo "MSG=Package build cancelled" >> $GITHUB_ENV
- name: Set failure
if: needs.sourcepackage.result == 'failure' || needs.binary_packages_released.result == 'failure' || needs.api_verification.result == 'failure' || needs.autopkg_test.result == 'failure'
if: needs.sourcepackage.result == 'failure' || needs.binary_packages_released.result == 'failure' || needs.prepare_api_verification.result == 'failure' || needs.autopkg_test.result == 'failure'
run: |
echo "RESULT=failure" >> $GITHUB_ENV
echo "MSG=Package build failed" >> $GITHUB_ENV
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
/windows/debug/
/windows/lib/
/windows/release/
/windows/src/PathDefines.mak
/windows/src/**/*.err
/windows/src/**/*.Build.CppClean.log
/windows/src/**/*.dproj.local
Expand Down
67 changes: 67 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# Keyman Version History

## 18.0.42 alpha 2024-05-23

* chore(web): conversion of Web's browser-integration auto-tests for @web/test-runner use (#11455)
* chore(web): conversion of Web's end-to-end style auto-tests for @web/test-runner use (#11456)
* chore(web): finalization for replacement of Karma with Web Test Runner (#11300)
* fix(android): Delete sentry-cli-2.31.1.exe during CI builds (#11493)
* change(common): remove `is:open` from issue templates (#11492)
* chore(developer): build.sh for developer (#11421)
* chore(windows): move from Makefile to build.sh (#11461)
* fix(linux): Add missing variable to API verification GHA (#11511)
* chore(common): Update standards data (#11003)

## 18.0.41 alpha 2024-05-22

* fix(developer): handle `KM_CORE_IT_INVALIDATE_CONTEXT` in debugger (#11488)
* chore(linux): Trigger GHA packaging for stable builds :cherries: (#11495)
* chore(android,mac,windows): Update crowdin strings for DE (#11497)
* feat(web): custom infrastructure for @web/test-runner use (#11403)
* chore(web): conversion of lm-worker browser-test for @web/test-runner use (#11404)
* chore(web): conversion of lm-layer browser-tests for @web/test-runner use (#11452)
* chore(web): conversion of Web keyboard-loading browser-tests for @web/test-runner use (#11453)
* chore(web): conversion of Web gesture-engine browser-tests for @web/test-runner use (#11454)

## 18.0.40 alpha 2024-05-21

* refactor(common): move `enabled` declaration into test_color.cpp (#11483)
* test(developer) kmn compiler messages unit tests (#11284)
* chore(linux): Move API verification to separate action (#10637)

## 18.0.39 alpha 2024-05-20

* chore(mac): change indentation of source code to equal standard two spaces (#11432)
* fix(common): calculate already-build dependency targets correctly (#11477)
* fix(common): properly quote `builder_run_action` call (#11478)
* fix(android/app): Verify extracted text is not null (#11481)

## 18.0.38 alpha 2024-05-17

* chore(common): Auto-generate minimum-versions.md from min-ver.sh (#11399)
* fix(android): Replace deprecated APIs for Display, Size, Metrics (#11436)
* chore(common): Clear whatsnew help files (#11469)

## 18.0.37 alpha 2024-05-16

* chore(android): update Gradle wrapper version (#11437)
* fix(android/engine): Handle globe key on lock screen (#11458)
* chore(oem/fv/ios): Remove build_keyboards.sh script (#11438)

## 18.0.36 alpha 2024-05-15

* chore: merge beta into master, final (#11445)
* chore(web): updates chai, @types/chai dependencies (#11318)
* chore(web): updates most @types/node dependencies, makes them consistent (#11319)
* chore(web): adds '@web/test-runner' and related packages (#11323)
* chore(web): EventEmitter3, sinon dependency updates (#11402)

## 18.0.35 alpha 2024-05-14

* (#11340)

## 18.0.34 alpha 2024-05-13

* feat(windows): Don't install desktop shortcut for Keyman for windows on installation (#11401)
Expand Down Expand Up @@ -151,6 +211,13 @@
* chore(common): move to 18.0 alpha (#10713)
* chore: move to 18.0 alpha

## 17.0.323 beta 2024-05-13

* chore(windows): Update crowdin string for Khmer (#11409)
* fix(android): disable Sentry session tracking (#11419)
* fix(mac): restore OSK keys that became invisible in mac OS 14 Sonoma (#11388)
* chore(android,ios): Add fv_nlakapamuxcheen (#11405)

## 17.0.322 beta 2024-05-10

* fix(web): fixes illegal KMW event state - can't focus a null element (#11385)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.0.35
18.0.43
2 changes: 1 addition & 1 deletion android/KMAPro/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
// sentry-android-gradle-plugin 2.1.5+ requires AGP 7.0
classpath 'io.sentry:sentry-android-gradle-plugin:4.5.1'
classpath 'io.sentry:sentry-android-gradle-plugin:4.6.0'
classpath 'name.remal:gradle-plugins:1.5.0'

// From jcenter() which could be sunset in future
Expand Down
2 changes: 1 addition & 1 deletion android/KMAPro/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,12 @@ public void onStartInput(EditorInfo attribute, boolean restarting) {
InputConnection ic = getCurrentInputConnection();
if (ic != null) {
ExtractedText icText = ic.getExtractedText(new ExtractedTextRequest(), 0);
if (icText != null) {
/*
We do sometimes receive null `icText.text`, even though
getExtractedText() docs does not list this as a possible
return value, so we test for that as well (#11479)
*/
if (icText != null && icText.text != null) {
boolean didUpdateText = KMManager.updateText(KeyboardType.KEYBOARD_TYPE_SYSTEM, icText.text.toString());
boolean didUpdateSelection = KMManager.updateSelectionRange(KeyboardType.KEYBOARD_TYPE_SYSTEM);
if (!didUpdateText || !didUpdateSelection)
Expand Down Expand Up @@ -218,9 +223,7 @@ public void onComputeInsets(InputMethodService.Insets outInsets) {
super.onComputeInsets(outInsets);

// We should extend the touchable region so that Keyman sub keys menu can receive touch events outside the keyboard frame
WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
Point size = new Point(0, 0);
wm.getDefaultDisplay().getSize(size);
Point size = KMManager.getWindowSize(getApplicationContext());

int inputViewHeight = 0;
if (inputView != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,7 @@ public void resizeTextView(boolean isKeyboardVisible) {
if (resourceId > 0)
statusBarHeight = getResources().getDimensionPixelSize(resourceId);

Point size = new Point(0, 0);
getWindowManager().getDefaultDisplay().getSize(size);
Point size = KMManager.getWindowSize(context);
int screenHeight = size.y;
Log.d(TAG, "Main resizeTextView bannerHeight: " + bannerHeight);
textView.setHeight(screenHeight - statusBarHeight - actionBarHeight - bannerHeight - keyboardHeight);
Expand Down Expand Up @@ -867,9 +866,7 @@ public static void cleanupPackageInstall() {
}

public static Drawable getActionBarDrawable(Context context) {
Point size = new Point();
WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
wm.getDefaultDisplay().getSize(size);
Point size = KMManager.getWindowSize(context);
int width = size.x;

TypedValue outValue = new TypedValue();
Expand Down
Loading

0 comments on commit 490b510

Please sign in to comment.