diff --git a/CHANGELOG.md b/CHANGELOG.md index c29a3042a..8a3ad5f42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,26 @@ + +# [5.1.0](https://github.com/NativeScript/NativeScript/compare/5.0.5...5.1.0) (2018-12-05) + + +### Bug Fixes + +* **android-styling:** correctly detect if drawable uses ColorFilter ([#6342](https://github.com/NativeScript/NativeScript/issues/6342)) ([11d3884](https://github.com/NativeScript/NativeScript/commit/11d3884)), closes [#6341](https://github.com/NativeScript/NativeScript/issues/6341) +* **listview:** incorrect layout when scroll ([#6656](https://github.com/NativeScript/NativeScript/issues/6656)) ([63be78a](https://github.com/NativeScript/NativeScript/commit/63be78a)) +* **modals:** regression with modals in angular ([#6655](https://github.com/NativeScript/NativeScript/issues/6655)) ([30df4d9](https://github.com/NativeScript/NativeScript/commit/30df4d9)) +* **searchbar:** isEnabled and isUserInteractionEnabled ([#6636](https://github.com/NativeScript/NativeScript/issues/6636)) ([25c99d8](https://github.com/NativeScript/NativeScript/commit/25c99d8)) +* **tests:** Sporadic failures after upgrade to WebKit 12.0 ([#6635](https://github.com/NativeScript/NativeScript/issues/6635)) ([65e3a19](https://github.com/NativeScript/NativeScript/commit/65e3a19)) + + +### Features + +* add hints options for username and password fields ([#6416](https://github.com/NativeScript/NativeScript/issues/6416)) ([c834181](https://github.com/NativeScript/NativeScript/commit/c834181)) +* **ActionBar:** apply text color when largeTitletextAttribute is set on iOS ([#6631](https://github.com/NativeScript/NativeScript/issues/6631)) ([b58dff0](https://github.com/NativeScript/NativeScript/commit/b58dff0)) +* **modals:** Enable modal dialog chaining in IOS ([#6637](https://github.com/NativeScript/NativeScript/issues/6637)) ([64bccb9](https://github.com/NativeScript/NativeScript/commit/64bccb9)) +* **scrollbar:** add isScrollEnabled property ([#6640](https://github.com/NativeScript/NativeScript/issues/6640)) ([ae0fa90](https://github.com/NativeScript/NativeScript/commit/ae0fa90)) +* **tabview:** add androidSwipeEnabled property ([#6652](https://github.com/NativeScript/NativeScript/issues/6652)) ([0b239d7](https://github.com/NativeScript/NativeScript/commit/0b239d7)) + + + ## [5.0.5](https://github.com/NativeScript/NativeScript/compare/5.0.4...5.0.5) (2018-11-26) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2a4e2f32e..6a32b87fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -177,7 +177,7 @@ module (usually named AppModule). ApplicationModule. All other NgModules in the app (both feature and lazy-loaded ones) should import the NativeScriptCommonModule instead. -The behaviour is alligned with BrowserModule and CommonModule in web +The behavior is aligned with BrowserModule and CommonModule in web Angular apps. angular.io/guide/ngmodule-faq#q-browser-vs-common-module Migration steps: In all NgModules, instead of the root one, replace: @@ -211,43 +211,98 @@ If you want to contribute, but you are not sure where to start - look for [issue [commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit# -## Releasing new versions +## Releasing new versions Instructions how to release a new version for **NativeScript Core Team Members**. -1. Execute `npm install` to install dependencies: -```bash -npm install -``` +![](./release-contribution-guide-schema.png?raw=true) -2. Add the following to your `.npmrc`: -``` -tag-version-prefix="" -message="release: cut the %s release" -``` +### Here are the steps described in the diagram above. -3. Create new branch based on `master`: -```bash -git checkout -b username/release-version +1. Checkout release branch +``` +git checkout release +``` +2. Create a PR to cut the release: +``` +git checkout -b release-version +git push --set-upstream origin release-version +``` +#### Merge master in release branch or cherry-pick commits. If the commits are in release branch **skip this step**. +``` +git merge --ff-only origin/master or git cherry-pick commit-sha +git push --set-upstream origin prep-release-version +``` +3. Execute `npm i` to install dependencies: +``` +npm i ``` - 4. Execute [`npm version`](https://docs.npmjs.com/cli/version) to bump the version of `tns-platform-declarations`: -```bash +``` cd tns-platform-declarations -npm --no-git-tag-version version [patch|minor|major] +npm --no-git-tag-version version [major|minor|patch] -m "release: cut the %s release" cd .. ``` -5. Execute [`npm version`](https://docs.npmjs.com/cli/version) to bump the version of `tns-core-modules`, tag the release and update the CHANGELOG.md: -```bash +5. Execute [`npm version`](https://docs.npmjs.com/cli/version) to bump the version of `tns-core-modules`, +tag the release and update the CHANGELOG.md. +In case we need to publish release version we need simply to use npm version x.x.x-rc +``` cd tns-core-modules -npm version [patch|minor|major] +npm --no-git-tag-version version [major|minor|patch] -m "release: cut the %s release" cd .. ``` +6. Set correct version of **tns-core-modules-widgets** in tns-core-modules/package.json. +Usually tns-core-modules-widgets should already have been released and we need to set the official version. -6. Push all the changes to your branch and open a pull request: -```bash -git push --set-upstream origin username/release-version --tags +7. Add changes +``` +git add changed-files +git commit -m "release: cut the %s release" +git push +``` +8. Create git tag +``` +git tag release-version +git push --tags +``` +9. Merge PR into release branch. + +10. If all checks has passed publish package. + +## Merge changes from release into master + +![](./merge-guidance-schema.png) + +### Here are steps described in the diagram above. + +1. Make sure you are in release branch: +``` +git checkout release +git pull +``` +2. Create PR to merge changes back in master and preserve history: +``` +git checkout -b merge-release-in-master +git push --set-upstream origin merge-release-in-master +git merge origin/master +``` +3. Resolve conflicts. Choose to keep the version of master branch. If it is needed to revert versions of modules, see at the bottom. + +4. Add conflicts: +``` +git add resolved files +``` +5. Commit changes with default merge message: +``` +git commit +git push ``` -7. Create `release` branch after the pull request is merged to `master` and publish the packages built on CI to `npm`. +**If needed, revert version of modules and platform declarations to take the one from master:** +``` +git checkout origin/master tns-platform-declarations/package.json tns-core-modules/package.json +git commit --amend +git push --force-with-lease +``` +This will require to repeat steps from 1 to 4, since we need to keep the branches with the same history diff --git a/LICENSE b/LICENSE index 59dc28ed0..9d63a0a67 100755 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright (c) 2015-2018 Telerik EAD + Copyright (c) 2015-2018 Progress Software Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/apps/app/ui-tests-app/issues/issue-ng-repo-1626.ts b/apps/app/ui-tests-app/issues/issue-ng-repo-1626.ts new file mode 100644 index 000000000..f52d419ff --- /dev/null +++ b/apps/app/ui-tests-app/issues/issue-ng-repo-1626.ts @@ -0,0 +1,31 @@ +import { fromObject } from "tns-core-modules/data/observable"; + +export function onLoaded(args) { + const page = args.object; + page.bindingContext = fromObject({ + items: [ + { id: 1, name: "Ter Stegen", role: "Goalkeeper" }, + { id: 3, name: "Piqué", role: "Defender" }, + { id: 4, name: "I. Rakitic", role: "Midfielder" }, + { id: 5, name: "Sergio", role: "Midfielder" }, + { id: 6, name: "Denis Suárez", role: "Midfielder\nSecond line for the sake of testing" }, + { id: 7, name: "Arda", role: "Midfielder" }, + { id: 8, name: "A. Iniesta", role: "Midfielder" }, + { id: 9, name: "Suárez", role: "Forward" }, + { id: 10, name: "Messi", role: "Forward" }, + { id: 11, name: "Neymar", role: "Forward\nSecond line for the sake of testing" }, + { id: 12, name: "Rafinha", role: "Midfielder\nSecond line for the sake of testing" }, + { id: 13, name: "Cillessen", role: "Goalkeeper\nSecond line for the sake of testing" }, + { id: 14, name: "Mascherano", role: "Defender" }, + { id: 17, name: "Paco Alcácer", role: "Forward" }, + { id: 18, name: "Jordi Alba", role: "Defender\nSecond line for the sake of testing" }, + { id: 19, name: "Digne", role: "Defender" }, + { id: 20, name: "Sergi Roberto", role: "Midfielder\nSecond line for the sake of testing" }, + { id: 21, name: "André Gomes", role: "Midfielder\nSecond line for the sake of testing" }, + { id: 22, name: "Aleix Vidal", role: "Midfielder" }, + { id: 23, name: "Umtiti", role: "Defender" }, + { id: 24, name: "Mathieu", role: "Defender" }, + { id: 25, name: "Masip", role: "Goalkeeper" }, + ] + }); +} \ No newline at end of file diff --git a/apps/app/ui-tests-app/issues/issue-ng-repo-1626.xml b/apps/app/ui-tests-app/issues/issue-ng-repo-1626.xml new file mode 100644 index 000000000..b681a2c02 --- /dev/null +++ b/apps/app/ui-tests-app/issues/issue-ng-repo-1626.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/app/ui-tests-app/issues/main-page.ts b/apps/app/ui-tests-app/issues/main-page.ts index 82f8ee5fc..349b9634c 100644 --- a/apps/app/ui-tests-app/issues/main-page.ts +++ b/apps/app/ui-tests-app/issues/main-page.ts @@ -28,6 +28,7 @@ export function loadExamples() { examples.set("4450", "issues/issue-4450"); examples.set("5274", "issues/issue-5274"); examples.set("ng-repo-1599", "issues/issue-ng-repo-1599"); + examples.set("ng-repo-1626", "issues/issue-ng-repo-1626"); examples.set("6439", "issues/issue-6439"); return examples; diff --git a/apps/app/ui-tests-app/modal-view/login-page.ts b/apps/app/ui-tests-app/modal-view/login-page.ts index 2c4d5917f..86431d84b 100644 --- a/apps/app/ui-tests-app/modal-view/login-page.ts +++ b/apps/app/ui-tests-app/modal-view/login-page.ts @@ -1,32 +1,29 @@ -import * as pages from "tns-core-modules/ui/page"; -import * as textField from "tns-core-modules/ui/text-field"; -import * as observable from "tns-core-modules/data/observable"; +import { Page, ShownModallyData } from "tns-core-modules/ui/page"; +import { EventData, fromObject } from "tns-core-modules/data/observable"; -var context: any; -var closeCallback: Function; +export function onShowingModally(args: ShownModallyData) { + console.log("login-page.onShowingModally, context: " + args.context); + const page = args.object; -var page: pages.Page; -var usernameTextField: textField.TextField; -var passwordTextField: textField.TextField; - -export function onShownModally(args: pages.ShownModallyData) { - console.log("login-page.onShownModally, context: " + args.context); - context = args.context; - closeCallback = args.closeCallback; + page.bindingContext = fromObject({ + username: "username", + password: "password", + context: args.context, + onLoginButtonTap: function() { + console.log("login-page.onLoginButtonTap"); + args.closeCallback(this.username, this.password); + } + }) } -export function onLoaded(args: observable.EventData) { +export function onShownModally(args: ShownModallyData) { + console.log("login-page.onShownModally, context: " + args.context); +} + +export function onLoaded(args: EventData) { console.log("login-page.onLoaded"); - page = args.object; - usernameTextField = page.getViewById("username"); - passwordTextField = page.getViewById("password"); } export function onUnloaded() { console.log("login-page.onUnloaded"); } - -export function onLoginButtonTap() { - console.log("login-page.onLoginButtonTap"); - closeCallback(usernameTextField.text, passwordTextField.text); -} diff --git a/apps/app/ui-tests-app/modal-view/login-page.xml b/apps/app/ui-tests-app/modal-view/login-page.xml index f2fd8c601..87c8487f3 100644 --- a/apps/app/ui-tests-app/modal-view/login-page.xml +++ b/apps/app/ui-tests-app/modal-view/login-page.xml @@ -1,8 +1,11 @@ - - - -