Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into fix/android/externa…
Browse files Browse the repository at this point in the history
…l-keyboard
  • Loading branch information
darcywong00 committed Oct 13, 2024
2 parents e6f201f + 4a67c5c commit 6d86c25
Show file tree
Hide file tree
Showing 1,651 changed files with 33,372 additions and 4,048 deletions.
6 changes: 2 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ common/:
- common/**
- resources/**

common/models/: common/models/**
common/models/types/: common/models/types/**
common/models/templates/: common/models/templates/**
common/models/wordbreakers/: common/models/wordbreakers/**
common/models/templates/: web/src/engine/predictive-text/templates/**
common/models/wordbreakers/: web/src/engine/predictive-text/wordbreakers/**

common/resources/: resources/**
common/web/: common/web/**
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/api-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ jobs:

- name: "Verify API for libkeymancore*.so (${{ steps.environment_step.outputs.GIT_BRANCH }}, branch ${{ steps.environment_step.outputs.GIT_BASE_BRANCH }}, by ${{ steps.environment_step.outputs.GIT_USER }})"
run: |
echo "Verify API for libkeymancore*.so (${{ steps.environment_step.outputs.GIT_BRANCH }}, branch ${{ steps.environment_step.outputs.GIT_BASE_BRANCH }}, by ${{ steps.environment_step.outputs.GIT_USER }})" >> $GITHUB_STEP_SUMMARY
BIN_PACKAGE=$(ls "${GITHUB_WORKSPACE}/artifacts/" | grep "${PKG_NAME}[0-9]*_${{ steps.environment_step.outputs.VERSION }}-1${{ steps.environment_step.outputs.PRERELEASE_TAG }}+$(lsb_release -c -s)1_amd64.deb")
cd ${{ github.workspace }}/keyman/linux
./scripts/deb-packaging.sh \
Expand All @@ -93,19 +95,19 @@ jobs:
if: needs.api_verification.result == 'success'
run: |
echo "RESULT=success" >> $GITHUB_ENV
echo "MSG=Package build succeeded" >> $GITHUB_ENV
echo "MSG=API verification 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
echo "MSG=API verification 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
echo "MSG=API verification failed" >> $GITHUB_ENV
- name: Set final status
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,5 @@ lcov.info
/keyman*.changes
/keyman*.tar.?z

# flag file for build script
.configured
140 changes: 140 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,122 @@
# Keyman Version History

## 18.0.125 alpha 2024-10-10

* chore(common): allow to run `build.sh` scripts in `bashdb` debugger (#12518)
* chore(linux): Improve output of API Verification (#12522)
* chore(linux): allow to skip API change (#12519)
* fix(linux): fix problem with API checks with merge commits (#12520)
* refactor(web): move `KeyboardObject` type to `common/web/types` (#12514)

## 18.0.124 alpha 2024-10-09

* chore(common): fix links in minimum-versions.md (#12507)
* fix(developer): use richedit in debug memo to support Egyptian cartouches (#12464)
* feat(android): Add controls for auto-correct (#12443)

## 18.0.123 alpha 2024-10-08

* chore(developer,common): deps: replace xml2js with fast-xml-parser (#12502)
* chore(ios): renew certificate (#12512)

## 18.0.122 alpha 2024-10-07

* feat(mac): both option keys generate right alt if no left alt mapping (#12458)
* chore(common): improve configuration detection for hextobin (#12481)

## 18.0.121 alpha 2024-10-03

* docs(developer): Fix image links in help (#12488)
* fix(oem/fv): Update keyboard versions and names for fv_all.kmp 13.1 (#12486)
* feat(common): unified XML parser/writer (#12482)

## 18.0.120 alpha 2024-10-02

* chore(common): Add note on troubleshooting website errors (#12487)
* docs(common): mention `KEYMAN_USE_NVM` in minimum versions doc (#12490)
* docs(web): fix paths to several help pages (#12491)
* docs(web): fix structure of test document (#12492)

## 18.0.119 alpha 2024-09-28

* refactor(developer): copy dev 17.0 help into repo (#12427)
* fix(developer): warn before importing over touch layout (#12478)
* chore(linux): display branch name with API verification (#12480)
* docs(core): Update kmx-plus-file-format.md (#12479)

## 18.0.118 alpha 2024-09-26

* chore(developer): add context/options (#11566)
* chore(deps-dev): bump rollup from 4.16.4 to 4.22.4 (#12462)
* fix(developer): ignore excess whitespace in `<row keys>` attribute (#12468)
* refactor(common): move help into common prod/docs/help folders (#12424)
* fix(developer): publish developer-utils package during build (#12471)
* fix(linux): ignore additional C++ symbol in API check (#12474)

## 18.0.117 alpha 2024-09-25

* docs(common): Document how to skip generating CDN on websites (#12446)
* fix(android): Remove toggle for "Always Show Banner" (#12430)
* fix(android): Hide suggestion banner on password fields (#12442)
* fix(developer): prevent invalid string ids (#12465)

## 18.0.116 alpha 2024-09-20

* change(mac): remove verbose logging option (#12431)
* chore(common): Allow to build offline (#12439)

## 18.0.115 alpha 2024-09-19

* chore(common): detect ssh remotes in git hooks (#12437)
* fix(common): add proper configure output for hextobin (#12440)
* fix(core): add missing dependency for core (#12438)
* chore(developer): remove .js output from LDML compiler (#12432)

## 18.0.114 alpha 2024-09-17

* fix(developer): rewrite ldml visual keyboard compiler (#12402)
* fix(developer): check vars string usage before definition (#12404)
* change(mac): remove 'Always show OSK' option (#12355)

## 18.0.113 alpha 2024-09-16

* test(developer): kmcmplib compiler unit tests 3 (#11990)

## 18.0.112 alpha 2024-09-14

* chore(deps): bump express from 4.19.2 to 4.20.0 (#12396)

## 18.0.111 alpha 2024-09-13

* chore(common): Update crowdin strings for Italian (#12408)
* fix(common): correct offsets in KMX+ spec (#12350)
* fix(android): Add gating to setLongpressDelay() (#12410)

## 18.0.110 alpha 2024-09-12

* chore(common): Update to Unicode 16.0 (#12393)
* refactor(web): move `common/web/es-bundling``web/src/tools/es-bundling` (#12389)
* refactor(web): move `common/web/eslint``common/tools/eslint` (#12390)
* refactor(web): move sentry-manager → `web/src/engine/sentry-manager` (#12397)
* refactor(web): merge `device-detect` with `web/src/engine/main` (#12399)
* chore(web): allow to run unit tests in vscode test explorer (#12400)
* fix(developer): index() requires comma between parameters in kmcmplib compiler (#12328)

## 18.0.109 alpha 2024-09-11

* chore(common): Update history with 17.0.329 stable (#12394)
* refactor(web): move `model/templates` to `web/src/engine/predictive/text` (#12382)
* refactor(web): move `common/models` to `web/src/engine/predictive-text` (#12383)
* refactor(web): move `common/web/utils` to `web/src/engine/common/web-utils/` (#12384)

## 18.0.108 alpha 2024-09-10

* docs(android): Update help docs (#12367)
* fix(developer): fix building with Ubuntu 24.04 (#12379)
* refactor(android): Move build-publish.sh to builder script (#12351)
* fix(android): Separate `publishSentry` Gradle task to publish symbols to Sentry (#12358)
* refactor(web): move `model/types` to `web/types` (#12370)

## 18.0.107 alpha 2024-09-09

* fix(android): Update Text Size menu icons for RTL support (#12290)
Expand Down Expand Up @@ -763,6 +880,29 @@
* chore(common): move to 18.0 alpha (#10713)
* chore: move to 18.0 alpha

## 17.0.329 stable 2024-09-09

* chore(android,ios): Add ojibwa ifinal/rdot keyboards to FirstVoices (#12020)
* change(web): revert #11174, which loads keyboards before initializing the OSK (#12040)
* fix(web): unrevert #11258, leaving OSK hidden before instructed to display (#12058)
* chore(common): use `nvm` to select version of node for builds (#12074)
* fix(developer): ignore scan code if zero in debugger (#12182)
* fix(developer): enforce presence of Version field when FollowKeyboardVersion is not set, in package compiler (#12206)
* fix(developer): enforce presence of kps Info.Description field in info compilers (#12207)
* fix(web): disable fat-finger data use when mayCorrect = false (#12226)
* chore(common): allow build agents to automatically select emsdk version, and enable support for 3.1.60+ (#12245)
* fix(web): fix documentation-keyboard spacebar-text scaling (#12240)
* fix(core): set mac build version for meson cli build to 10.13 (#12246)
* change(ios): defer registration of fonts past initialization (#12241)
* chore(android,ios): Update FirstVoices keyboards to 12.15 (#12301)
* fix(core): properly support 'other' modifier state with `uint32_t` type (#12285)
* fix(developer): find last matching key in LDML key bag when building KVK (#12284)
* fix(android): check in material-stepper as internal Maven dependency (#12324)
* fix(linux): add `keymanFacename` to .ldml file (#12283)
* chore(oem/fv): Update to fv_all 13.0 (#12363)
* fix(mac): avoid crash on startup with macOS 10.15 (Catalina) (#12364)
* fix(android): skip language counts for lexical-model packages (#12368)

## 17.0.328 stable 2024-07-27

* fix(web): add nullish test in setOsk (#12041)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.0.108
18.0.126
4 changes: 2 additions & 2 deletions android/KMAPro/build-play-store-notes.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ function generateReleaseNotes() {
# Pad release notes if whatsnew.md doesn't have any line items
# Play Store release notes have a limit of 500 characters
local DEFAULT_RELEASE_NOTE="* Additional bug fixes and improvements"
local FILTERED_LINES=$( grep '^\s*\*.*$' "$KEYMAN_ROOT/android/help/about/whatsnew.md" || [[ $? == 1 ]] ) # Continue if grep has no matches
local FILTERED_LINES=$( grep '^\s*\*.*$' "$KEYMAN_ROOT/android/docs/help/about/whatsnew.md" || [[ $? == 1 ]] ) # Continue if grep has no matches
if [ -z "$FILTERED_LINES" ]; then
FILTERED_LINES="$DEFAULT_RELEASE_NOTE"
builder_warn "Warning: whatsnew.md empty so using default release note: '$FILTERED_LINES'"
fi

# Change IFS to new line
local old_IFS="${IFS}"
IFS=$'\n'
IFS=$'\n'
for line in $FILTERED_LINES
do
local CHARS_IN_RELEASE_NOTES=$( wc -m < "$PLAY_RELEASE_NOTES" )
Expand Down
13 changes: 13 additions & 0 deletions android/KMAPro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
. "$KEYMAN_ROOT/resources/build/build-help.inc.sh"
. "$KEYMAN_ROOT/resources/build/build-download-resources.sh"

. "$KEYMAN_ROOT/android/KMAPro/build-play-store-notes.inc.sh"

# ################################ Main script ################################

# Definition of global compile constants
Expand All @@ -25,6 +27,7 @@ builder_describe "Builds Keyman for Android app." \
"configure" \
"build" \
"test Runs lint and unit tests." \
"publish Publishes symbols to Sentry and the APK to the Play Store." \
"--ci Don't start the Gradle daemon. For CI" \
"--upload-sentry Upload to sentry"

Expand Down Expand Up @@ -109,3 +112,13 @@ if builder_start_action test; then

builder_finish_action success test
fi

if builder_start_action publish; then
# Copy Release Notes
generateReleaseNotes

# Publish symbols and Keyman for Android to Play Store
./gradlew $DAEMON_FLAG publishSentry publishReleaseApk

builder_finish_action success publish
fi
17 changes: 11 additions & 6 deletions android/KMAPro/kMAPro/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,17 @@ android {
}

// how to configure the sentry android gradle plugin
sentry {
// Disables or enables the automatic configuration of Native symbols
uploadNativeSymbols = true

// Does or doesn't include the source code of native code for Sentry
includeNativeSources = true
task publishSentry {
doLast {
println 'Publishing Keyman symbols to Sentry'
sentry {
// Disables or enables the automatic configuration of Native symbols
uploadNativeSymbols = true

// Does or doesn't include the source code of native code for Sentry
includeNativeSources = true
}
}
}

String env_keys_json_file = System.getenv("keys_json_file")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.keyman.engine.KMManager;
import com.keyman.engine.KMManager.KeyboardType;
import com.keyman.engine.KMHardwareKeyboardInterpreter;
import com.keyman.engine.KMManager.SuggestionType;
import com.keyman.engine.KeyboardEventHandler.OnKeyboardEventListener;
import com.keyman.engine.R;
import com.keyman.engine.data.Keyboard;
Expand Down Expand Up @@ -169,8 +170,9 @@ public void onStartInput(EditorInfo attribute, boolean restarting) {
if (kbInfo != null) {
String langId = kbInfo.getLanguageID();
SharedPreferences prefs = appContext.getSharedPreferences(appContext.getString(R.string.kma_prefs_name), Context.MODE_PRIVATE);
boolean mayPredict = prefs.getBoolean(KMManager.getLanguagePredictionPreferenceKey(langId), true);
KMManager.setBannerOptions(mayPredict);
int maySuggest = prefs.getInt(KMManager.getLanguageAutoCorrectionPreferenceKey(langId), KMManager.KMDefault_Suggestion);
// Enable banner if maySuggest is not SuggestionType.SUGGESTIONS_DISABLED (0)
KMManager.setBannerOptions(maySuggest != SuggestionType.SUGGESTIONS_DISABLED.toInt());
} else {
KMManager.setBannerOptions(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ public class AdjustLongpressDelayActivity extends BaseActivity {
// Keeps track of the adjusted longpress delay time for saving.
// Internally use milliseconds, but GUI displays seconds
private static int currentDelayTimeMS = KMManager.KMDefault_LongpressDelay; // ms
private static int minLongpressTime = 300; // ms
private static int maxLongpressTime = 1500; // ms
private static int delayTimeIncrement = 200; // ms

/**
Expand Down Expand Up @@ -112,7 +110,7 @@ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
findViewById(R.id.delayTimeDownButton).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (currentDelayTimeMS > minLongpressTime) {
if (currentDelayTimeMS > KMManager.KMMinimum_LongpressDelay) {
currentDelayTimeMS -= delayTimeIncrement;
seekBar.setProgress(delayTimeToProgress());
}
Expand All @@ -122,7 +120,7 @@ public void onClick(View v) {
findViewById(R.id.delayTimeUpButton).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (currentDelayTimeMS < maxLongpressTime) {
if (currentDelayTimeMS < KMManager.KMMaximum_LongpressDelay) {
currentDelayTimeMS += delayTimeIncrement;
seekBar.setProgress(delayTimeToProgress());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
public class KeymanSettingsActivity extends BaseActivity {
protected static final String installedLanguagesKey = "InstalledLanguages";
protected static final String installKeyboardOrDictionaryKey = "InstallKeyboardOrDictionary";
protected static final String showBannerKey = "ShowBanner";
protected static final String sendCrashReport = "SendCrashReport";
public static final String spacebarTextKey = "SpacebarText";
public static final String hapticFeedbackKey = "HapticFeedback";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
editor.putBoolean(KeymanSettingsActivity.showBannerKey, isChecked);
as part of the default onClick() used by SwitchPreference.
*/
SwitchPreference bannerPreference = new SwitchPreference(context);
bannerPreference.setKey(KeymanSettingsActivity.showBannerKey);
bannerPreference.setTitle(getString(R.string.show_banner));
bannerPreference.setSummaryOn(getString(R.string.show_banner_on));
bannerPreference.setSummaryOff(getString(R.string.show_banner_off));

SwitchPreference getStartedPreference = new SwitchPreference(context);
getStartedPreference.setKey(GetStartedActivity.showGetStartedKey);
getStartedPreference.setTitle(String.format(getString(R.string.show_get_started), getString(R.string.get_started)));
Expand All @@ -207,7 +201,6 @@ as part of the default onClick() used by SwitchPreference.
screen.addPreference(spacebarTextPreference);

screen.addPreference(hapticFeedbackPreference);
screen.addPreference(bannerPreference);
screen.addPreference(getStartedPreference);
screen.addPreference(sendCrashReportPreference);

Expand Down
Loading

0 comments on commit 6d86c25

Please sign in to comment.