|
1 | 1 | Cross Platform Modules Changelog
|
2 | 2 | ==============================
|
3 | 3 |
|
| 4 | +<a name="5.0.0-rc"></a> |
| 5 | +## [5.0.0 - RC](https://github.com/NativeScript/NativeScript/compare/4.2.1...5.0.0-rc) (2018-10-17) |
| 6 | + |
| 7 | +### Bug Fixes |
| 8 | + |
| 9 | +* don't crash on missing resources in tab-view and action-bar ([#6388](https://github.com/NativeScript/NativeScript/issues/6388)) ([56a1b12](https://github.com/NativeScript/NativeScript/commit/56a1b12)) |
| 10 | +* nested fragments interact through child fragment manager ([#6293](https://github.com/NativeScript/NativeScript/issues/6293)) ([3071720](https://github.com/NativeScript/NativeScript/commit/3071720)) |
| 11 | +* Page and Frame isLoaded undefined checks ([#6255](https://github.com/NativeScript/NativeScript/issues/6255)) ([12fade7](https://github.com/NativeScript/NativeScript/commit/12fade7)) |
| 12 | +* **modals:** application activityBackPressed event not fired for modals ([#6261](https://github.com/NativeScript/NativeScript/issues/6261)) ([8575c60](https://github.com/NativeScript/NativeScript/commit/8575c60)) |
| 13 | +* **list-view:** Layout list-view items on request ([#6159](https://github.com/NativeScript/NativeScript/issues/6159)) ([ec24c5a](https://github.com/NativeScript/NativeScript/commit/ec24c5a)) |
| 14 | +* **tab-view:** Title and icon positioning ([#6362](https://github.com/NativeScript/NativeScript/issues/6362)) ([e3d5f0d](https://github.com/NativeScript/NativeScript/commit/e3d5f0d)) |
| 15 | +* **android:** HEAD request should return statusCode ([7e89f94](https://github.com/NativeScript/NativeScript/commit/7e89f94)) |
| 16 | +* **android:** nested frames on app suspend/resume ([#6339](https://github.com/NativeScript/NativeScript/issues/6339)) ([0bf6dc2](https://github.com/NativeScript/NativeScript/commit/0bf6dc2)) |
| 17 | +* **android:** parallel navigations should not be triggered ([#6275](https://github.com/NativeScript/NativeScript/issues/6275)) ([6c9fa16](https://github.com/NativeScript/NativeScript/commit/6c9fa16)) |
| 18 | +* **android:** suppress reflection for default animations ([#6141](https://github.com/NativeScript/NativeScript/issues/6141)) ([cc19b40](https://github.com/NativeScript/NativeScript/commit/cc19b40)) |
| 19 | +* **android/platform:** reinitialise screen metrics on orientation change ([#6164](https://github.com/NativeScript/NativeScript/issues/6164)) ([2ee1d7d](https://github.com/NativeScript/NativeScript/commit/2ee1d7d)) |
| 20 | +* **ios:** listview scrollToIndex crash with async data ([#6182](https://github.com/NativeScript/NativeScript/issues/6182)) ([a8d016c](https://github.com/NativeScript/NativeScript/commit/a8d016c)) |
| 21 | +* **ios:** nowrap label measure in horizontal stack layout ([#6186](https://github.com/NativeScript/NativeScript/issues/6186)) ([a1c570c](https://github.com/NativeScript/NativeScript/commit/a1c570c)) |
| 22 | +* **ios:** TimePicker minuteInterval property ([#6116](https://github.com/NativeScript/NativeScript/issues/6116)) ([88f7ed8](https://github.com/NativeScript/NativeScript/commit/88f7ed8)) |
| 23 | + |
| 24 | +### Features |
| 25 | + |
| 26 | +* add ability to pass touch event through parent view ([#6204](https://github.com/NativeScript/NativeScript/issues/6204)) ([2625683](https://github.com/NativeScript/NativeScript/commit/2625683)) |
| 27 | +* implement capitalization type option for prompt dialogs ([#6325](https://github.com/NativeScript/NativeScript/issues/6325)) ([ae6a661](https://github.com/NativeScript/NativeScript/commit/ae6a661)) |
| 28 | +* **application-settings:** implemented allKeys method ([#6371](https://github.com/NativeScript/NativeScript/issues/6371)) ([829d18b](https://github.com/NativeScript/NativeScript/commit/829d18b)) |
| 29 | +* **image-asset-ios:** add autoScaleFactor option to switch auto scaling ([#6127](https://github.com/NativeScript/NativeScript/issues/6127)) ([81e63ee](https://github.com/NativeScript/NativeScript/commit/81e63ee)) |
| 30 | +* **styling:** Add two functions to control applicationAdditionalSelectors ([#6124](https://github.com/NativeScript/NativeScript/issues/6124)) ([85b8c01](https://github.com/NativeScript/NativeScript/commit/85b8c01)) |
| 31 | +* **tslib:** add tslib helpers to global ([#6351](https://github.com/NativeScript/NativeScript/issues/6351)) ([1232d1e](https://github.com/NativeScript/NativeScript/commit/1232d1e)) |
| 32 | +* **android:** add Bluetooth connectivity type for Android ([#6162](https://github.com/NativeScript/NativeScript/issues/6162)) ([f1bef48](https://github.com/NativeScript/NativeScript/commit/f1bef48)) |
| 33 | +* **android:** migrate to support library apis ([#6129](https://github.com/NativeScript/NativeScript/issues/6129)) ([cf034dd](https://github.com/NativeScript/NativeScript/commit/cf034dd)) |
| 34 | +* **android:** platform declarations for Android API 28 (Android 9) ([#6243](https://github.com/NativeScript/NativeScript/issues/6243)) ([b9fc373](https://github.com/NativeScript/NativeScript/commit/b9fc373)) |
| 35 | +* **iOS:** Safe Area Support ([#6230](https://github.com/NativeScript/NativeScript/issues/6230)) ([982acdc](https://github.com/NativeScript/NativeScript/commit/982acdc)) |
| 36 | +* **iOS:** update platform declarations ([f54f71b](https://github.com/NativeScript/NativeScript/commit/f54f71b)) |
| 37 | + |
| 38 | + |
| 39 | +### BREAKING CHANGES |
| 40 | + |
| 41 | +* **android:** NativeScript core framework now extends support library APIs versus native framework classes as per Google's latest guidelines ([#6129](https://github.com/NativeScript/NativeScript/issues/6129)) ([cf034dd](https://github.com/NativeScript/NativeScript/commit/cf034dd)): |
| 42 | + - NativeScript activities now extend `android.support.v7.app.AppCompatActivity` (vs android.app.Activity) |
| 43 | + - NativeScript fragments now extend `android.support.v4.app.Fragment` (vs android.app.Fragment) |
| 44 | + - NativeScript now works internally with `android.support.v4.app.FragmentManager` (vs android.app.FragmentManager) |
| 45 | + |
| 46 | +The implications of these changes should be mostly transparent to the developer except for the fact that the support library Fragment / FragmentManager work with Animation APIs versus Animator APIs. |
| 47 | + |
| 48 | +For Android API Levels lower than 28 the new Fragment API uses a different fragment enter animation by default. You can customise the transition per navigation entry or globally via the [navigation transitions API](https://docs.nativescript.org/core-concepts/navigation#navigation-transitions) |
| 49 | +Before: |
| 50 | +Default fragment enter animation was fade animation |
| 51 | + |
| 52 | +After: |
| 53 | +Default fragment enter animation for API levels lower than 28 is now a fast "push fade" animation; default fragment enter animation for API levels equal to or greater than 28 remains fade animation |
| 54 | + |
| 55 | +* Layout class (`tns-core-modules/ui/layouts/layout`) is now removed as it is not used in {N} framework any more. |
| 56 | + |
| 57 | +Before: |
| 58 | +Built-in {N} layouts GridLayout, StackLayout, WrapLayout, etc. extended `Layout` class |
| 59 | + |
| 60 | +After: |
| 61 | +Built-in {N} layouts GridLayout, StackLayout, WrapLayout, etc. now extend `LayoutBase` class |
| 62 | + |
| 63 | +To migrate your code follow the example below: |
| 64 | + |
| 65 | +Before: |
| 66 | +``` ts |
| 67 | +import { Layout } from "ui/layouts/layout"; |
| 68 | +// ... |
| 69 | + |
| 70 | +let wrapLayout: Layout; |
| 71 | + |
| 72 | +export function pageLoaded(args: EventData) { |
| 73 | + const page = <Page>args.object; |
| 74 | + wrapLayout = page.getViewById<Layout>("wrapLayout"); |
| 75 | + } |
| 76 | +``` |
| 77 | + |
| 78 | +After: |
| 79 | +``` ts |
| 80 | +import { LayoutBase } from "ui/layouts/layout-base"; // or import { WrapLayout } from "ui/layouts/wrap-layout; |
| 81 | +// ... |
| 82 | + |
| 83 | +let wrapLayout: LayoutBase; // or let wrapLayout: WrapLayout; |
| 84 | + |
| 85 | +export function pageLoaded(args: EventData) { |
| 86 | + const page = <Page>args.object; |
| 87 | + wrapLayout = page.getViewById<LayoutBase>("wrapLayout"); // or wrapLayout = page.getViewById<WrapLayout>("wrapLayout"); |
| 88 | + } |
| 89 | +``` |
| 90 | +* **ios:** widgets native view lifecycle refactoring - native view is now created right before they are added to visual tree ([#6102](https://github.com/NativeScript/NativeScript/issues/6102)) ([46705ee](https://github.com/NativeScript/NativeScript/commit/46705ee)): |
| 91 | + |
| 92 | +The iOS widgets native view lifecycle now matches the Android widgets. Before, the iOS native view was created in the widget constructor and you could manipulate the native view right after the widget is instantiated. After the refactoring, the widget's native view will be created when it's added to the visual tree. The most correct way to manipulate the native view is in the `loaded` event handler. |
| 93 | + |
| 94 | +Before: |
| 95 | +``` ts |
| 96 | +import { Button } from "ui/button"; |
| 97 | +// ... |
| 98 | + |
| 99 | +const button = new Button(); |
| 100 | +button.nativeView.someNativeAPIMethod(); |
| 101 | +``` |
| 102 | + |
| 103 | +After: |
| 104 | +``` ts |
| 105 | +import { Button } from "ui/button"; |
| 106 | +// ... |
| 107 | + |
| 108 | +const button = new Button(); |
| 109 | +button.on("loaded", () => { |
| 110 | + button.nativeView.someNativeAPIMethod(); |
| 111 | +}); |
| 112 | +``` |
| 113 | + |
| 114 | +* **ios:** Widgets that inherit the `ContainerView` class now overflow the safe area by default ([#6230](https://github.com/NativeScript/NativeScript/issues/6230)) ([982acdc](https://github.com/NativeScript/NativeScript/commit/982acdc)): |
| 115 | + |
| 116 | +These are: `AbsoluteLayout`, `DockLayout`, `GridLayout`, `StackLayout`, `WrapLayout`, `FlexboxLayout`, `ScrollView`, `ListView`, `WebView` and `Repeater`. |
| 117 | + |
| 118 | +The change is that now if these widgets touch the edge of the safe area, they will be automatically expanded to the edge of the screen. This will change their width and height. Margins and paddings will still be applied only in the safe area. This behavior can be reverted to the old one by setting the `iosOverflowSafeArea` property of the widget to `false`. |
| 119 | + |
4 | 120 | <a name="4.2.1"></a>
|
5 | 121 | ## [4.2.1](https://github.com/NativeScript/NativeScript/compare/4.2.0...4.2.1) (2018-09-18)
|
6 | 122 |
|
|
0 commit comments