|
| 1 | +# [8.5.0](https://github.com/NativeScript/NativeScript/compare/8.4.7-core...8.5.0) (2023-03-28) |
| 2 | + |
| 3 | + |
| 4 | +### Bug Fixes |
| 5 | + |
| 6 | +* **android:** box shadow and border radius white border resolution ([#10125](https://github.com/NativeScript/NativeScript/issues/10125)) ([ea45758](https://github.com/NativeScript/NativeScript/commit/ea457584639367763dd0227bb856976db8b99813)) |
| 7 | +* **android:** dialogs activity usage ([#10246](https://github.com/NativeScript/NativeScript/issues/10246)) ([7edd21a](https://github.com/NativeScript/NativeScript/commit/7edd21a688f574fb0b008577bc6287faa6a4d2c6)) |
| 8 | +* **android:** knownFolders.externalDocuments improvement ([#10186](https://github.com/NativeScript/NativeScript/issues/10186)) ([a7f1305](https://github.com/NativeScript/NativeScript/commit/a7f13057810ffd2181b3bc4575f98f6ae20be446)) |
| 9 | +* **android:** Label now defaults to vertical-align middle ([#10233](https://github.com/NativeScript/NativeScript/issues/10233)) ([a23c8bd](https://github.com/NativeScript/NativeScript/commit/a23c8bda31eeeaa73ee04874ccd73fcf3eb2b2dd)) |
| 10 | +* **android:** native-helper utils types are now correct ([#10231](https://github.com/NativeScript/NativeScript/issues/10231)) ([6779cdc](https://github.com/NativeScript/NativeScript/commit/6779cdcb554f4374536a930563a7242d3364726a)) |
| 11 | +* **android:** path must be convex ([#10238](https://github.com/NativeScript/NativeScript/issues/10238)) ([89fc249](https://github.com/NativeScript/NativeScript/commit/89fc2498800ea26f3896094847e8e14dca1f6db1)), closes [#10235](https://github.com/NativeScript/NativeScript/issues/10235) |
| 12 | +* **android:** ScrollView BadParcelableException ([#10213](https://github.com/NativeScript/NativeScript/issues/10213)) ([a26a03e](https://github.com/NativeScript/NativeScript/commit/a26a03eeb8883a85a0da44b5de2601547e987bcf)) |
| 13 | +* **core:** add equalityComparer to border-radius properties ([#10185](https://github.com/NativeScript/NativeScript/issues/10185)) ([571d515](https://github.com/NativeScript/NativeScript/commit/571d5156ec9eb764afedde3944be3120d4d95208)) |
| 14 | +* **core:** added item template handling for external renderers ([#10196](https://github.com/NativeScript/NativeScript/issues/10196)) ([b993a83](https://github.com/NativeScript/NativeScript/commit/b993a83f2371df8cb276474360d95e89d62e5ad5)) |
| 15 | +* **core:** autofillTypes correction ([#10210](https://github.com/NativeScript/NativeScript/issues/10210)) ([fd35d6c](https://github.com/NativeScript/NativeScript/commit/fd35d6c19cb853f2b2a0066f294b55950e9dc70f)) |
| 16 | +* **core:** classes .ns-light and .ns-dark apply to dialogs ([#10201](https://github.com/NativeScript/NativeScript/issues/10201)) ([48ef249](https://github.com/NativeScript/NativeScript/commit/48ef2496849eb4e9b9d00057b35dc88e6dedfc64)) |
| 17 | +* **core:** CSS animation parsing ([#10245](https://github.com/NativeScript/NativeScript/issues/10245)) ([ab436db](https://github.com/NativeScript/NativeScript/commit/ab436dbfe67f4750c77230527154858faaf9da6c)) |
| 18 | +* **core:** Frame to Page property propagation ([#10225](https://github.com/NativeScript/NativeScript/issues/10225)) ([4e62b00](https://github.com/NativeScript/NativeScript/commit/4e62b00ddb84823654c864d32e298db286068733)) |
| 19 | +* **core:** improved handling for unsupported '!important' css rule ([#10243](https://github.com/NativeScript/NativeScript/issues/10243)) ([e560cb1](https://github.com/NativeScript/NativeScript/commit/e560cb1374c0f3fa54a5b51b04b5073618603bcb)) |
| 20 | +* **core:** Observable event types consistency ([#10181](https://github.com/NativeScript/NativeScript/issues/10181)) ([485fb61](https://github.com/NativeScript/NativeScript/commit/485fb61947f6099756f3c1b51586f24ee95f0a43)) |
| 21 | +* **core:** RootLayout shade cover asynchronous execution ([#10228](https://github.com/NativeScript/NativeScript/issues/10228)) ([a19568c](https://github.com/NativeScript/NativeScript/commit/a19568c0d08a142277f75cce2a3a30732d9bb032)) |
| 22 | +* **core:** unset css values of type Property ([#10199](https://github.com/NativeScript/NativeScript/issues/10199)) ([dcf6a36](https://github.com/NativeScript/NativeScript/commit/dcf6a365cd574bd4dfa245ad6c38c22e551ef65c)) |
| 23 | +* global declarations fix ([#10247](https://github.com/NativeScript/NativeScript/issues/10247)) ([2f4c318](https://github.com/NativeScript/NativeScript/commit/2f4c3182767a3b33af413be78314bceb8c7cce93)) |
| 24 | +* **ios:** embed systemAppearance handling ([#10219](https://github.com/NativeScript/NativeScript/issues/10219)) ([ee92512](https://github.com/NativeScript/NativeScript/commit/ee925127465c223e1f64779372a0b449b1000155)) |
| 25 | +* **ios:** embedding sdk ([#10211](https://github.com/NativeScript/NativeScript/issues/10211)) ([9179ff8](https://github.com/NativeScript/NativeScript/commit/9179ff861dcd72224ed79205406b328119784aa5)) |
| 26 | +* **ios:** guard against no nativeView in createBackgroundUIColor ([#10229](https://github.com/NativeScript/NativeScript/issues/10229)) ([9ed3c9b](https://github.com/NativeScript/NativeScript/commit/9ed3c9b256e054b6ad482a16db9d6974e3b1435f)) |
| 27 | +* **ios:** sdk embedding ([#10216](https://github.com/NativeScript/NativeScript/issues/10216)) ([0183f7e](https://github.com/NativeScript/NativeScript/commit/0183f7e643ab7ac58d22e98707e13bf5f85f57c0)) |
| 28 | +* **ios:** support for a11y font scale ([#10207](https://github.com/NativeScript/NativeScript/issues/10207)) ([95f3772](https://github.com/NativeScript/NativeScript/commit/95f3772e77bdfcc6c78ad7365a6c376bdbe01482)) |
| 29 | +* **types-android:** min api types from 17 to 31 ([#10209](https://github.com/NativeScript/NativeScript/issues/10209)) ([e613ecf](https://github.com/NativeScript/NativeScript/commit/e613ecf819035a5e38140384570ea747bb3db0f6)) |
| 30 | +* **webpack:** notify CLI even if there are compilation errors ([#10141](https://github.com/NativeScript/NativeScript/issues/10141)) ([6059984](https://github.com/NativeScript/NativeScript/commit/605998455595a2d35b7f0f73b2cde08c0516361c)) |
| 31 | + |
| 32 | + |
| 33 | +### Features |
| 34 | + |
| 35 | +* **core:** export foregroundEvent and backgroundEvent ([#10226](https://github.com/NativeScript/NativeScript/issues/10226)) ([6fd6943](https://github.com/NativeScript/NativeScript/commit/6fd69436c8af2faaceb95ecb615179bc5b15ebcb)) |
| 36 | +* **core:** Shared Element Transitions ([#10022](https://github.com/NativeScript/NativeScript/issues/10022)) ([59369fb](https://github.com/NativeScript/NativeScript/commit/59369fbc196a175570c5b731855707261b158e5c)) |
| 37 | +* **files:** read & write using js buffers ([#10093](https://github.com/NativeScript/NativeScript/issues/10093)) ([0173769](https://github.com/NativeScript/NativeScript/commit/0173769badf704a61c7d8b2fe9902496e6e73785)) |
| 38 | +* **ios:** Swift Package Manager support in config ([#10252](https://github.com/NativeScript/NativeScript/issues/10252)) ([09832ad](https://github.com/NativeScript/NativeScript/commit/09832ad7ab12c95f3b32184f1bb8e60183fb2342)) |
| 39 | +* **ios:** types for latest 16.2 sdk ([#10253](https://github.com/NativeScript/NativeScript/issues/10253)) ([318fb36](https://github.com/NativeScript/NativeScript/commit/318fb361754b500754c1840c2ee64c13227de6e5)) |
| 40 | +* **webpack:** support tsconfig.app.json when present ([#10221](https://github.com/NativeScript/NativeScript/issues/10221)) ([ebb827f](https://github.com/NativeScript/NativeScript/commit/ebb827fb8e4cf2ebc82ca66bea386ddc654711f7)) |
| 41 | + |
| 42 | + |
| 43 | +### Performance Improvements |
| 44 | + |
| 45 | +* **android:** reduce java object creation ([#10129](https://github.com/NativeScript/NativeScript/issues/10129)) ([2da0064](https://github.com/NativeScript/NativeScript/commit/2da0064f7c8de44d407c34d252070d793b50aaa8)) |
| 46 | + |
| 47 | + |
| 48 | +### Breaking Changes |
| 49 | + |
| 50 | +1. Event binding callbacks prefer a properly typed argument: |
| 51 | + |
| 52 | +Potential issue: |
| 53 | +```ts |
| 54 | +error TS2339: Property 'newValue' does not exist on type 'EventData'. |
| 55 | + |
| 56 | +2611 if (e.newValue) { |
| 57 | +``` |
| 58 | +Possible causes: |
| 59 | +```ts |
| 60 | +Application.on(Application.orientationChangedEvent, (event) => { |
| 61 | +``` |
| 62 | +Solution: |
| 63 | +```ts |
| 64 | +Application.on(Application.orientationChangedEvent, (event: OrientationChangedEventData) => { |
| 65 | +``` |
| 66 | +
|
| 67 | +2. Android labels are vertical align middle by default. |
| 68 | + |
| 69 | +This means that potentially if you were using margins to position, for example on font icon labels, they may appear mis-positioned intially after updating. You should be able to remove custom margin handling to simplify. |
| 70 | +
|
| 71 | +3. Page transitions have improved their API to provide more platform control and introduced a breaking change to the method signatures on iOS. If you had created a custom by extending the `Transition` class: |
| 72 | + |
| 73 | +- BEFORE: |
| 74 | +``` |
| 75 | +animateIOSTransition(containerView: UIView, fromView: UIView, toView: UIView, operation: UINavigationControllerOperation, completion: (finished: boolean) => void): void { |
| 76 | + toView.transform = CGAffineTransformMakeScale(0, 0); |
| 77 | + fromView.transform = CGAffineTransformIdentity; |
| 78 | + |
| 79 | + switch (operation) { |
| 80 | + case UINavigationControllerOperation.Push: |
| 81 | + containerView.insertSubviewAboveSubview(toView, fromView); |
| 82 | + break; |
| 83 | + case UINavigationControllerOperation.Pop: |
| 84 | + containerView.insertSubviewBelowSubview(toView, fromView); |
| 85 | + break; |
| 86 | + } |
| 87 | + |
| 88 | + var duration = this.getDuration(); |
| 89 | + var curve = this.getCurve(); |
| 90 | + UIView.animateWithDurationAnimationsCompletion( |
| 91 | + duration, |
| 92 | + () => { |
| 93 | + UIView.setAnimationCurve(curve); |
| 94 | + toView.transform = CGAffineTransformIdentity; |
| 95 | + fromView.transform = CGAffineTransformMakeScale(0, 0); |
| 96 | + }, |
| 97 | + completion |
| 98 | + ); |
| 99 | +} |
| 100 | +``` |
| 101 | +- AFTER: |
| 102 | +``` |
| 103 | +animateIOSTransition(transitionContext: UIViewControllerContextTransitioning, fromViewCtrl: UIViewController, toViewCtrl: UIViewController, operation: UINavigationControllerOperation): void { |
| 104 | + const toView = toViewCtrl.view; |
| 105 | + const fromView = fromViewCtrl.view; |
| 106 | + toView.transform = CGAffineTransformMakeScale(0, 0); |
| 107 | + fromView.transform = CGAffineTransformIdentity; |
| 108 | + |
| 109 | + switch (operation) { |
| 110 | + case UINavigationControllerOperation.Push: |
| 111 | + transitionContext.containerView.insertSubviewAboveSubview(toView, fromView); |
| 112 | + break; |
| 113 | + case UINavigationControllerOperation.Pop: |
| 114 | + transitionContext.containerView.insertSubviewBelowSubview(toView, fromView); |
| 115 | + break; |
| 116 | + } |
| 117 | + |
| 118 | + var duration = this.getDuration(); |
| 119 | + var curve = this.getCurve(); |
| 120 | + UIView.animateWithDurationAnimationsCompletion( |
| 121 | + duration, |
| 122 | + () => { |
| 123 | + UIView.setAnimationCurve(curve); |
| 124 | + toView.transform = CGAffineTransformIdentity; |
| 125 | + fromView.transform = CGAffineTransformMakeScale(0, 0); |
| 126 | + }, |
| 127 | + (finished) => { |
| 128 | + transitionContext.completeTransition(finished); |
| 129 | + } |
| 130 | + ); |
| 131 | +} |
| 132 | +``` |
| 133 | +
|
| 134 | +#### Notes |
| 135 | +
|
| 136 | +- Android WeakRef usage is now standardized and aligned with iOS and latest JavaScript standards to universally use `deref` instead of the deprecated `get` API. In 8.4, iOS allowed usage of `deref` but Android still required `get`. With 8.5 you can now use `deref` the same everywhere. |
| 137 | +- If you were using an iterator over an iOS NSArray, always make sure it's using proper platform API, for example: |
| 138 | + |
| 139 | +Incorrect: |
| 140 | +```ts |
| 141 | +// collection: NSArray |
| 142 | +for (var i = 0; i < collection.count; i++) { |
| 143 | + const obj = collection[i]; |
| 144 | +``` |
| 145 | +Correct: |
| 146 | +```ts |
| 147 | +// collection: NSArray |
| 148 | +for (var i = 0; i < collection.count; i++) { |
| 149 | + const obj = collection.objectAtIndex(i); |
| 150 | +``` |
| 151 | +
|
| 152 | +
|
| 153 | +
|
1 | 154 | ## [8.4.7](https://github.com/NativeScript/NativeScript/compare/5.0.13-webpack...8.4.7) (2023-01-23)
|
2 | 155 |
|
3 | 156 |
|
|
0 commit comments