From 9a407ce98964832c52cd51dc0ab60662fc65abb5 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Fri, 9 Apr 2021 08:35:00 -0700 Subject: [PATCH 1/4] fix(a11y): ios voiceover crash during touch (#9318) closes https://github.com/NativeScript/NativeScript/issues/9317 --- packages/core/accessibility/index.ios.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/accessibility/index.ios.ts b/packages/core/accessibility/index.ios.ts index 3d0945eaf..758a9fb11 100644 --- a/packages/core/accessibility/index.ios.ts +++ b/packages/core/accessibility/index.ios.ts @@ -73,18 +73,18 @@ function ensureNativeClasses() { ]); nativeFocusedNotificationObserver = Application.ios.addNotificationObserver(UIAccessibilityElementFocusedNotification, (args: NSNotification) => { - const uiView = args.userInfo.objectForKey(UIAccessibilityFocusedElementKey) as UIView; - if (!uiView.tag) { + const uiView = args.userInfo?.objectForKey(UIAccessibilityFocusedElementKey) as UIView; + if (!uiView?.tag) { return; } const rootView = Application.getRootView(); // We use the UIView's tag to find the NativeScript View by its domId. - let view = rootView.getViewByDomId(uiView.tag); + let view = rootView.getViewByDomId(uiView?.tag); if (!view) { for (const modalView of >rootView._getRootModalViews()) { - view = modalView.getViewByDomId(uiView.tag); + view = modalView.getViewByDomId(uiView?.tag); if (view) { break; } From 53c8f673f7a66c1a1df4fad9bfecd060d2e326e3 Mon Sep 17 00:00:00 2001 From: Nathanael Anderson Date: Fri, 9 Apr 2021 20:16:09 -0500 Subject: [PATCH 2/4] chore: adjust clean to ignore .idea / .vscode (#9319) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 801b6ae62..a24ad8cdc 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "8.0.1", "license": "MIT", "scripts": { - "clean": "git clean -f -X -d", + "clean": "git clean -f -X -d --exclude=!.idea/ --exclude=!.vscode/*", "setup": "npm run clean && npm install", "setup:yarn": "yarn run clean && yarn", "setup:pnpm": "pnpm run clean && pnpm install", From 17a701908573c1ce76a753d0c3e70ca348403518 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Mon, 12 Apr 2021 09:54:30 -0700 Subject: [PATCH 3/4] chore: npm 7 compat --- .github/workflows/npm_release_tns_core.yml | 2 +- .github/workflows/npm_release_webpack.yml | 2 +- apps/automated/package.json | 2 +- package.json | 2 +- packages/webpack/package.json | 2 +- workspace.json | 6 +++--- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/npm_release_tns_core.yml b/.github/workflows/npm_release_tns_core.yml index e8dc19060..5b3849e1b 100644 --- a/.github/workflows/npm_release_tns_core.yml +++ b/.github/workflows/npm_release_tns_core.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup - run: npm install + run: npm install --legacy-peer-deps - name: Generate Version run: | diff --git a/.github/workflows/npm_release_webpack.yml b/.github/workflows/npm_release_webpack.yml index ad622eb7b..b34c052f1 100644 --- a/.github/workflows/npm_release_webpack.yml +++ b/.github/workflows/npm_release_webpack.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup - run: npm install + run: npm install --legacy-peer-deps - name: Generate Version working-directory: packages/webpack diff --git a/apps/automated/package.json b/apps/automated/package.json index 9198b309f..2d7789bdb 100644 --- a/apps/automated/package.json +++ b/apps/automated/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/NativeScript/NativeScript.git" }, "scripts": { - "clean": "npx rimraf hooks node_modules platforms package-lock.json && npm i" + "clean": "npx rimraf hooks node_modules platforms package-lock.json && npm i --legacy-peer-deps" }, "dependencies": { "nativescript-theme-core": "file:../../node_modules/nativescript-theme-core", diff --git a/package.json b/package.json index a24ad8cdc..421904cc4 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "license": "MIT", "scripts": { "clean": "git clean -f -X -d --exclude=!.idea/ --exclude=!.vscode/*", - "setup": "npm run clean && npm install", + "setup": "npm run clean && npm install --legacy-peer-deps", "setup:yarn": "yarn run clean && yarn", "setup:pnpm": "pnpm run clean && pnpm install", "postinstall": "ts-patch install && husky install && nx run core:setup", diff --git a/packages/webpack/package.json b/packages/webpack/package.json index eb768e24e..30a04d118 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -29,7 +29,7 @@ "url": "https://github.com/NativeScript/nativescript-dev-webpack.git" }, "scripts": { - "clean": "npx rimraf -- node_modules package-lock.json && npm i --ignore-scripts", + "clean": "npx rimraf -- node_modules package-lock.json && npm i --ignore-scripts --legacy-peer-deps", "tsc": "tsc", "postinstall": "node postinstall.js", "preuninstall": "node preuninstall.js", diff --git a/workspace.json b/workspace.json index 232a842a2..2db98e0e1 100644 --- a/workspace.json +++ b/workspace.json @@ -26,7 +26,7 @@ "clean": { "builder": "@nrwl/workspace:run-commands", "options": { - "commands": ["npx rimraf -- hooks node_modules platforms package-lock.json webpack.config.js", "npm i", "npx rimraf -- package-lock.json"], + "commands": ["npx rimraf -- hooks node_modules platforms package-lock.json webpack.config.js", "npm i --legacy-peer-deps", "npx rimraf -- package-lock.json"], "cwd": "apps/automated", "parallel": false } @@ -58,7 +58,7 @@ "clean": { "builder": "@nrwl/workspace:run-commands", "options": { - "commands": ["npx rimraf -- hooks node_modules platforms package-lock.json webpack.config.js", "npm i", "npx rimraf -- package-lock.json"], + "commands": ["npx rimraf -- hooks node_modules platforms package-lock.json webpack.config.js", "npm i --legacy-peer-deps", "npx rimraf -- package-lock.json"], "cwd": "apps/toolbox", "parallel": false } @@ -90,7 +90,7 @@ "clean": { "builder": "@nrwl/workspace:run-commands", "options": { - "commands": ["npx rimraf -- hooks node_modules platforms package-lock.json webpack.config.js", "npm i", "npx rimraf -- package-lock.json"], + "commands": ["npx rimraf -- hooks node_modules platforms package-lock.json webpack.config.js", "npm i --legacy-peer-deps", "npx rimraf -- package-lock.json"], "cwd": "apps/ui", "parallel": false } From cbdff1f1550a4e7cf06ccd4f01c5cd743c68e265 Mon Sep 17 00:00:00 2001 From: Nathanael Anderson Date: Wed, 14 Apr 2021 21:29:15 -0500 Subject: [PATCH 4/4] fix(a11y): Accessibility breaks limiting metadata (#9332) Accessibility added a new class that we need to add to the default allowed metadata so that the application doesn't crash on startup when in limit metadata mode. --- packages/core/platforms/android/native-api-usage.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/platforms/android/native-api-usage.json b/packages/core/platforms/android/native-api-usage.json index 565255a8e..52a7ae42c 100644 --- a/packages/core/platforms/android/native-api-usage.json +++ b/packages/core/platforms/android/native-api-usage.json @@ -24,6 +24,7 @@ "androidx.core*:*", "androidx.viewpager.widget*:*", "androidx.fragment*:*", - "androidx.transition*:*" + "androidx.transition*:*", + "android.inputmethodservice*:*" ] -} \ No newline at end of file +}