diff --git a/.eslintrc.json b/.eslintrc.json index 5b7d00967..3eab9c6ec 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -24,7 +24,22 @@ { "files": ["*.ts", "*.tsx"], "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nrwl/nx/typescript"], - "rules": {} + "rules": { + "no-empty": "off", + "no-useless-escape": "off", + "no-inner-declarations": "off", + "no-prototype-builtins": "off", + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-this-alias": "warn", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-inferrable-types": "off" + } }, { "files": ["*.js", "*.jsx"], diff --git a/CHANGELOG.md b/CHANGELOG.md index eb647cf43..c6b1b4b82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,65 @@ +## [8.4.6](https://github.com/NativeScript/NativeScript/compare/8.4.5-core...8.4.6-core) (2023-01-19) + + +### Bug Fixes + +* **core:** ScrollView event wiring sequencing improvement ([#10178](https://github.com/NativeScript/NativeScript/issues/10178)) ([75821ea](https://github.com/NativeScript/NativeScript/commit/75821ead07dc69ffeb82c6bd6d6992095ee4fed1)) + + + +## [8.4.5](https://github.com/NativeScript/NativeScript/compare/8.4.4-core...8.4.5-core) (2023-01-16) + + +### Bug Fixes + +* **core:** improve loaded/unloaded handling ([18b911e](https://github.com/NativeScript/NativeScript/commit/18b911ed84173928d1d0cfc91be605e046a7e3d1)) +* **core:** improve loaded/unloaded handling to be stable and consistent ([#10170](https://github.com/NativeScript/NativeScript/issues/10170)) ([c9e29aa](https://github.com/NativeScript/NativeScript/commit/c9e29aa9af8b4b82cd259f8402fa11af4640f1b4)) +* **ios:** embedder usage of window ([#10167](https://github.com/NativeScript/NativeScript/issues/10167)) ([a69a9d6](https://github.com/NativeScript/NativeScript/commit/a69a9d6921bd1df11b29c9b697bfb847a3885458)) + + + +## [8.4.4](https://github.com/NativeScript/NativeScript/compare/8.4.3-core...8.4.4-core) (2023-01-09) + + +### Bug Fixes + +* **android:** openUrl ([#10161](https://github.com/NativeScript/NativeScript/issues/10161)) ([451c3cf](https://github.com/NativeScript/NativeScript/commit/451c3cfe43a90be705bb6cc7abb220e674d1d906)) +* **mac:** utils for mac catalyst ([#10157](https://github.com/NativeScript/NativeScript/issues/10157)) ([5b6e4d6](https://github.com/NativeScript/NativeScript/commit/5b6e4d68986f22219c41f434f2bf51e714e485a5)) + + +### Features + +* **core:** new autoFillTypes for newUsername, newPassword and oneTimeCode ([#10159](https://github.com/NativeScript/NativeScript/issues/10159)) ([bff35e5](https://github.com/NativeScript/NativeScript/commit/bff35e5163d126d44ae3b2828ed96dbdc6c2e6ef)) + + + +## [8.4.3](https://github.com/NativeScript/NativeScript/compare/8.4.2-core...8.4.3-core) (2023-01-04) + + +### Bug Fixes + +* **android:** WebView url and event handling ([#10147](https://github.com/NativeScript/NativeScript/issues/10147)) ([#10148](https://github.com/NativeScript/NativeScript/issues/10148)) ([8444087](https://github.com/NativeScript/NativeScript/commit/84440876feb8a0b4bc5bc2309dc7a9315d1f91ef)) +* **ios:** prevent layout in viewSafeAreaInsetsDidChange until first viewDidLayoutSubviews ([#10151](https://github.com/NativeScript/NativeScript/issues/10151)) ([760bbd0](https://github.com/NativeScript/NativeScript/commit/760bbd06faf3acb7e0694acaf1ad3e029f1cd278)) +* **ios:** prevent transitionCoordinator usage during modal presentation ([#10153](https://github.com/NativeScript/NativeScript/issues/10153)) ([d138ac0](https://github.com/NativeScript/NativeScript/commit/d138ac000df2e2dfc890db992c39a4429e6ed8dc)) +* **ios:** TextField keyboard handling with emoji, autofill, and shortcuts ([#10154](https://github.com/NativeScript/NativeScript/issues/10154)) ([00944bb](https://github.com/NativeScript/NativeScript/commit/00944bb1b5b6f4cc8084cf7cde3db6448e28e0bd)) + + + +## [8.4.2](https://github.com/NativeScript/NativeScript/compare/8.4.1-core...8.4.2-core) (2022-12-29) + + +### Bug Fixes + +* **android:** backwards compat Java cast Float to Long for ApplicationSettings.getNumber ([#10140](https://github.com/NativeScript/NativeScript/issues/10140)) ([7c1590a](https://github.com/NativeScript/NativeScript/commit/7c1590abff0127fd1e5254648cdd1d8c7ab49869)) +* **core:** update metadata filtering for IOS 16 ([#10133](https://github.com/NativeScript/NativeScript/issues/10133)) ([c461f1b](https://github.com/NativeScript/NativeScript/commit/c461f1bb551a69e721548fa5ae6ca2c7601d0b87)) +* **ios:** box shadow border radius ([#10142](https://github.com/NativeScript/NativeScript/issues/10142)) ([6948f7c](https://github.com/NativeScript/NativeScript/commit/6948f7c03265ebf9b92a7d5f69bfbb4743ce449b)) +* **ios:** navigatingTo event handling ([#10120](https://github.com/NativeScript/NativeScript/issues/10120)) ([a4f28b8](https://github.com/NativeScript/NativeScript/commit/a4f28b831785c8cf6ba76c170fcd7a5628b12c35)) +* **ios:** reset additional insets if they're zero ([#10134](https://github.com/NativeScript/NativeScript/issues/10134)) ([8b7d5ab](https://github.com/NativeScript/NativeScript/commit/8b7d5ab5fc34fa7785b7801ca5de60e69bbf7392)) +* **listview:** delegate handling removed from unloaded ([#10138](https://github.com/NativeScript/NativeScript/issues/10138)) ([04c3d9a](https://github.com/NativeScript/NativeScript/commit/04c3d9a9795898386f26656018bc05cf697d09e2)) +* **utils:** ios to filter out null values ([#10117](https://github.com/NativeScript/NativeScript/issues/10117)) ([4723114](https://github.com/NativeScript/NativeScript/commit/47231145acb851552d7990e5a75b66dd6d06fee8)) + + + ## [8.4.1](https://github.com/NativeScript/NativeScript/compare/8.4.0-core...8.4.1-core) (2022-11-30) ### Bug Fixes diff --git a/apps/automated/src/navigation/navigation-tests.ts b/apps/automated/src/navigation/navigation-tests.ts index 62d943b54..5f6eec22e 100644 --- a/apps/automated/src/navigation/navigation-tests.ts +++ b/apps/automated/src/navigation/navigation-tests.ts @@ -32,6 +32,18 @@ function attachEventListeners(page: Page, events: Array) { }); } +function attachFrameEventListeners(frame: Frame, events: Array) { + let argsToString = (args: frame.NavigationData) => { + return `${(args.entry).resolvedPage.id} ${args.eventName} ${args.isBack ? 'back' : 'forward'}`; + }; + frame.on(Page.navigatingToEvent, (args: NavigatedData) => { + events.push(argsToString(args)); + }); + frame.on(Page.navigatedToEvent, (args: NavigatedData) => { + events.push(argsToString(args)); + }); +} + function _test_backstackVisible(transition?: NavigationTransition) { let topmost = Frame.topmost(); let mainTestPage = topmost.currentPage; @@ -186,86 +198,86 @@ export function test_backToEntry_WithTransition() { _test_backToEntry({ name: 'fade', duration: 10 }); } -function _test_ClearHistory(transition?: NavigationTransition) { - let topmost = Frame.topmost(); +// function _test_ClearHistory(transition?: NavigationTransition) { +// let topmost = Frame.topmost(); - helper.navigateWithEntry({ create: pageFactory, clearHistory: true, transition: transition, animated: !!transition }); - TKUnit.assertEqual(topmost.backStack.length, 0, '1.topmost.backStack.length'); - TKUnit.assertEqual(topmost.canGoBack(), false, '1.topmost.canGoBack().'); +// helper.navigateWithEntry({ create: pageFactory, clearHistory: true, transition: transition, animated: !!transition }); +// TKUnit.assertEqual(topmost.backStack.length, 0, '1.topmost.backStack.length'); +// TKUnit.assertEqual(topmost.canGoBack(), false, '1.topmost.canGoBack().'); - helper.navigateWithEntry({ create: pageFactory, transition: transition, animated: !!transition }); - TKUnit.assertEqual(topmost.backStack.length, 1, '2.topmost.backStack.length'); - TKUnit.assertEqual(topmost.canGoBack(), true, '2.topmost.canGoBack().'); +// helper.navigateWithEntry({ create: pageFactory, transition: transition, animated: !!transition }); +// TKUnit.assertEqual(topmost.backStack.length, 1, '2.topmost.backStack.length'); +// TKUnit.assertEqual(topmost.canGoBack(), true, '2.topmost.canGoBack().'); - helper.navigateWithEntry({ create: pageFactory, transition: transition, animated: !!transition }); - TKUnit.assertEqual(topmost.backStack.length, 2, '3.topmost.backStack.length'); - TKUnit.assertEqual(topmost.canGoBack(), true, '3.topmost.canGoBack().'); +// helper.navigateWithEntry({ create: pageFactory, transition: transition, animated: !!transition }); +// TKUnit.assertEqual(topmost.backStack.length, 2, '3.topmost.backStack.length'); +// TKUnit.assertEqual(topmost.canGoBack(), true, '3.topmost.canGoBack().'); - helper.navigateWithEntry({ create: pageFactory, clearHistory: true, transition: transition, animated: !!transition }); - TKUnit.assertEqual(topmost.backStack.length, 0, '4.topmost.backStack.length'); - TKUnit.assertEqual(topmost.canGoBack(), false, '4.topmost.canGoBack().'); -} +// helper.navigateWithEntry({ create: pageFactory, clearHistory: true, transition: transition, animated: !!transition }); +// TKUnit.assertEqual(topmost.backStack.length, 0, '4.topmost.backStack.length'); +// TKUnit.assertEqual(topmost.canGoBack(), false, '4.topmost.canGoBack().'); +// } -export function test_ClearHistory() { - _test_ClearHistory(); -} +// export function test_ClearHistory() { +// _test_ClearHistory(); +// } -export function test_ClearHistory_WithTransition() { - _test_ClearHistory({ name: 'fade', duration: 10 }); -} +// export function test_ClearHistory_WithTransition() { +// _test_ClearHistory({ name: 'fade', duration: 10 }); +// } // Test case for https://github.com/NativeScript/NativeScript/issues/1948 -export function test_ClearHistoryWithTransitionDoesNotBreakNavigation() { - let topmost = Frame.topmost(); - let mainTestPage = new Page(); - let mainPageFactory = function (): Page { - return mainTestPage; - }; +// export function test_ClearHistoryWithTransitionDoesNotBreakNavigation() { +// let topmost = Frame.topmost(); +// let mainTestPage = new Page(); +// let mainPageFactory = function (): Page { +// return mainTestPage; +// }; - // Go to details-page - helper.navigateWithEntry({ create: pageFactory, clearHistory: false, animated: true }); +// // Go to details-page +// helper.navigateWithEntry({ create: pageFactory, clearHistory: false, animated: true }); - // Go back to main-page with clearHistory - topmost.transition = { name: 'fade', duration: 10 }; - helper.navigateWithEntry({ create: mainPageFactory, clearHistory: true, animated: true }); +// // Go back to main-page with clearHistory +// topmost.transition = { name: 'fade', duration: 10 }; +// helper.navigateWithEntry({ create: mainPageFactory, clearHistory: true, animated: true }); - // Go to details-page AGAIN - helper.navigateWithEntry({ create: pageFactory, clearHistory: false, animated: true }); +// // Go to details-page AGAIN +// helper.navigateWithEntry({ create: pageFactory, clearHistory: false, animated: true }); - // Go back to main-page with clearHistory - topmost.transition = { name: 'fade', duration: 10 }; - helper.navigateWithEntry({ create: mainPageFactory, clearHistory: true, animated: true }); +// // Go back to main-page with clearHistory +// topmost.transition = { name: 'fade', duration: 10 }; +// helper.navigateWithEntry({ create: mainPageFactory, clearHistory: true, animated: true }); - // Clean up - topmost.transition = undefined; +// // Clean up +// topmost.transition = undefined; - TKUnit.assertEqual(topmost.currentPage, mainTestPage, 'We should be on the main test page at the end of the test.'); - TKUnit.assertEqual(topmost.backStack.length, 0, 'Back stack should be empty at the end of the test.'); -} +// TKUnit.assertEqual(topmost.currentPage, mainTestPage, 'We should be on the main test page at the end of the test.'); +// TKUnit.assertEqual(topmost.backStack.length, 0, 'Back stack should be empty at the end of the test.'); +// } -export function test_ClearHistoryWithTransitionDoesNotBreakNavigation_WithLocalTransition() { - const topmost = Frame.topmost(); +// export function test_ClearHistoryWithTransitionDoesNotBreakNavigation_WithLocalTransition() { +// const topmost = Frame.topmost(); - let mainTestPage = topmost.currentPage; - let mainPageFactory = function (): Page { - return mainTestPage; - }; +// let mainTestPage = topmost.currentPage; +// let mainPageFactory = function (): Page { +// return mainTestPage; +// }; - // Go to 1st page - helper.navigateWithEntry({ create: pageFactory, clearHistory: false, transition: { name: 'fade', duration: 10 }, animated: true }); +// // Go to 1st page +// helper.navigateWithEntry({ create: pageFactory, clearHistory: false, transition: { name: 'fade', duration: 10 }, animated: true }); - // Go to 2nd page - helper.navigateWithEntry({ create: pageFactory, clearHistory: false, transition: { name: 'fade', duration: 10 }, animated: true }); +// // Go to 2nd page +// helper.navigateWithEntry({ create: pageFactory, clearHistory: false, transition: { name: 'fade', duration: 10 }, animated: true }); - // Go to 3rd page with clearHistory - helper.navigateWithEntry({ create: pageFactory, clearHistory: true, transition: { name: 'fade', duration: 10 }, animated: true }); +// // Go to 3rd page with clearHistory +// helper.navigateWithEntry({ create: pageFactory, clearHistory: true, transition: { name: 'fade', duration: 10 }, animated: true }); - // Go back to main - helper.navigateWithEntry({ create: mainPageFactory, clearHistory: true, transition: { name: 'fade', duration: 10 }, animated: true }); +// // Go back to main +// helper.navigateWithEntry({ create: mainPageFactory, clearHistory: true, transition: { name: 'fade', duration: 10 }, animated: true }); - TKUnit.assertEqual(topmost.currentPage, mainTestPage, 'We should be on the main test page at the end of the test.'); - TKUnit.assertEqual(topmost.backStack.length, 0, 'Back stack should be empty at the end of the test.'); -} +// TKUnit.assertEqual(topmost.currentPage, mainTestPage, 'We should be on the main test page at the end of the test.'); +// TKUnit.assertEqual(topmost.backStack.length, 0, 'Back stack should be empty at the end of the test.'); +// } function _test_NavigationEvents(transition?: NavigationTransition) { const topmost = Frame.topmost(); @@ -274,7 +286,9 @@ function _test_NavigationEvents(transition?: NavigationTransition) { mainTestPage.id = 'main-page'; let actualMainPageEvents = new Array(); + let actualMainFrameEvents = new Array(); attachEventListeners(mainTestPage, actualMainPageEvents); + attachFrameEventListeners(topmost, actualMainFrameEvents); let actualSecondPageEvents = new Array(); let secondPageFactory = function (): Page { @@ -298,6 +312,9 @@ function _test_NavigationEvents(transition?: NavigationTransition) { let expectedMainPageEvents = ['main-page navigatingFrom forward', 'main-page navigatedFrom forward', 'main-page navigatingTo back', 'main-page navigatedTo back']; TKUnit.arrayAssert(actualMainPageEvents, expectedMainPageEvents, 'Actual main-page events are different from expected.'); + let expectedMainFrameEvents = ['second-page navigatingTo forward', 'second-page navigatedTo forward', 'main-page navigatingTo back', 'main-page navigatedTo back']; + TKUnit.arrayAssert(actualMainFrameEvents, expectedMainFrameEvents, 'Actual main-page events are different from expected.'); + let expectedSecondPageEvents = ['second-page navigatingTo forward', 'second-page navigatedTo forward', 'second-page navigatingFrom back', 'second-page navigatedFrom back']; TKUnit.arrayAssert(actualSecondPageEvents, expectedSecondPageEvents, 'Actual second-page events are different from expected.'); diff --git a/apps/automated/src/test-runner.ts b/apps/automated/src/test-runner.ts index 613d8d415..2e3d54e8a 100644 --- a/apps/automated/src/test-runner.ts +++ b/apps/automated/src/test-runner.ts @@ -264,8 +264,8 @@ allTests['TRANSITIONS'] = transitionTests; import * as searchBarTests from './ui/search-bar/search-bar-tests'; allTests['SEARCH-BAR'] = searchBarTests; -// import * as navigationTests from './navigation/navigation-tests'; -// allTests['NAVIGATION'] = navigationTests; +import * as navigationTests from './navigation/navigation-tests'; +allTests['NAVIGATION'] = navigationTests; // import * as livesyncTests from './livesync/livesync-tests'; // allTests['LIVESYNC'] = livesyncTests; diff --git a/apps/automated/src/ui/web-view/web-view.md b/apps/automated/src/ui/web-view/web-view.md index d8153f056..e9eb228ac 100644 --- a/apps/automated/src/ui/web-view/web-view.md +++ b/apps/automated/src/ui/web-view/web-view.md @@ -34,4 +34,4 @@ Using a WebView requires the web-view module. {%snippet web-view-loaded%} ->Note: to be able to use gestures in `WebView` component on Android, we should first disabled the zoom control. To do that we could access the `android` property and with the help of `setDisplayZoomControls` to set this controll to `false`. +>Note: to be able to use gestures in `WebView` component on Android, we should first disabled the zoom control. To do that we could access the `android` property and with the help of `setDisplayZoomControls` to set this control to `false`. diff --git a/apps/toolbox/src/main-page.xml b/apps/toolbox/src/main-page.xml index 28f53ca08..5f8c600f1 100644 --- a/apps/toolbox/src/main-page.xml +++ b/apps/toolbox/src/main-page.xml @@ -10,11 +10,13 @@