|
@@ -1,4 +1,185 @@
|
1
|
1
|
# Changelog
|
|
2
|
+# 5.0.0
|
|
3
|
+This release is focuses on shared element transition and on improving the installation process of the library.
|
|
4
|
+
|
|
5
|
+## Upgrading from V4
|
|
6
|
+### Remove missingDimensionStrategy from app/build.gradle
|
|
7
|
+Since RNN supports multiple react-native versions, the library has multiple flavors, each targeting a different RN version. We now chose the appropriate flavor based on the react-native version installed in node_modules.
|
|
8
|
+```diff
|
|
9
|
+-missingDimensionStrategy "RNN.reactNativeVersion", "reactNativeXX" // Where XX is the minor number of the react-native version you're using
|
|
10
|
+```
|
|
11
|
+
|
|
12
|
+### Declare Kotlin version in build.gradle
|
|
13
|
+We're starting to migrate RNN to Kotlin. All new code is written in Kotlin and existing code will be gradually converted to Kotlin. This requires you to declare the Kotlin version you're using in your project.
|
|
14
|
+```diff
|
|
15
|
+buildscript {
|
|
16
|
+ ext {
|
|
17
|
++ kotlinVersion = "1.3.61" // Or any other kotlin version following 1.3.x
|
|
18
|
++ RNNKotlinVersion = kotlinVersion
|
|
19
|
++ RNNKotlinStdlib = "kotlin-stdlib-jdk8"
|
|
20
|
+ }
|
|
21
|
+ dependencies {
|
|
22
|
++ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
|
23
|
+ }
|
|
24
|
+}
|
|
25
|
+```
|
|
26
|
+
|
|
27
|
+### Update MainApplication.java
|
|
28
|
+In an effort to simplify RNN's integrations process as much as possible, we're minimizing the changes required to both MainApplication and MainActivity.
|
|
29
|
+```diff
|
|
30
|
++import com.facebook.react.PackageList;
|
|
31
|
+
|
|
32
|
+public class MainApplication extends NavigationApplication {
|
|
33
|
+- @Override
|
|
34
|
+- protected ReactNativeHost createReactNativeHost() {
|
|
35
|
+- return new NavigationReactNativeHost(this) {
|
|
36
|
++ private final ReactNativeHost mReactNativeHost =
|
|
37
|
+ new NavigationReactNativeHost(this) {
|
|
38
|
+ @Override
|
|
39
|
+ protected String getJSMainModuleName() {
|
|
40
|
+ return "index";
|
|
41
|
+ }
|
|
42
|
+
|
|
43
|
++ @Override
|
|
44
|
++ public boolean getUseDeveloperSupport() {
|
|
45
|
++ return BuildConfig.DEBUG;
|
|
46
|
++ }
|
|
47
|
+
|
|
48
|
++ @Override
|
|
49
|
++ public List<ReactPackage> getPackages() {
|
|
50
|
++ ArrayList<ReactPackage> packages = new PackageList(this).getPackages();
|
|
51
|
++ return packages;
|
|
52
|
++ }
|
|
53
|
++ }
|
|
54
|
+- }
|
|
55
|
+
|
|
56
|
++ @Override
|
|
57
|
++ public ReactNativeHost getReactNativeHost() {
|
|
58
|
++ return mReactNativeHost;
|
|
59
|
++ }
|
|
60
|
+
|
|
61
|
+- @Override
|
|
62
|
+- public boolean isDebug() {
|
|
63
|
+- return BuildConfig.DEBUG;
|
|
64
|
+- }
|
|
65
|
+
|
|
66
|
+- @Nullable
|
|
67
|
+- @Override
|
|
68
|
+- public List<ReactPackage> createAdditionalReactPackages() {
|
|
69
|
+- List<ReactPackage> packages = new ArrayList<>();
|
|
70
|
+- return packages;
|
|
71
|
+- }
|
|
72
|
+}
|
|
73
|
+```
|
|
74
|
+
|
|
75
|
+### Update settings.gradle
|
|
76
|
+Since RNN now supports auto linking, declaring the dependency manually is no longer needed.
|
|
77
|
+```diff
|
|
78
|
+-include ':react-native-navigation'
|
|
79
|
+-project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../../lib/android/app/')
|
|
80
|
+```
|
|
81
|
+
|
|
82
|
+### Make sure your app supports auto linking
|
|
83
|
+#### Update `app/build.gradle`
|
|
84
|
+Add these lines to the bottom of your `app/build.gradle` file.
|
|
85
|
+```diff
|
|
86
|
++apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
|
|
87
|
++applyNativeModulesAppBuildGradle(project)
|
|
88
|
+```
|
|
89
|
+#### Update `settings.gradle`
|
|
90
|
+```diff
|
|
91
|
+include ':app'
|
|
92
|
++include ':react-native-navigation'
|
|
93
|
++project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../../lib/android/app/')
|
|
94
|
+```
|
|
95
|
+
|
|
96
|
+### Remove RNN pod from podspec
|
|
97
|
+As RNN is now autolinked, remove its pod from your podspec file. This will ensure the correct version is linked when running `pod install`
|
|
98
|
+```diff
|
|
99
|
+- pod 'ReactNativeNavigation', :podspec => '../node_modules/react-native-navigation/ReactNativeNavigation.podspec'
|
|
100
|
+```
|
|
101
|
+
|
|
102
|
+## Breaking Changes
|
|
103
|
+### Modal animation parity
|
|
104
|
+show and dismiss animation api have been fixed and are now in parity with Android api.
|
|
105
|
+If you've defined a custom modal animation, you can now consolidate the animation declarations.
|
|
106
|
+
|
|
107
|
+<table>
|
|
108
|
+<tr>
|
|
109
|
+ <td>New Android + iOS API</td>
|
|
110
|
+ <td>Unsupported iOS API</td>
|
|
111
|
+</tr>
|
|
112
|
+<tr>
|
|
113
|
+<td>
|
|
114
|
+
|
|
115
|
+ ```js
|
|
116
|
+ options: {
|
|
117
|
+ animations: {
|
|
118
|
+ showModal: {
|
|
119
|
+ alpha: {
|
|
120
|
+ from: 0,
|
|
121
|
+ to: 1,
|
|
122
|
+ duration: 250,
|
|
123
|
+ }
|
|
124
|
+ }
|
|
125
|
+ }
|
|
126
|
+ }
|
|
127
|
+ ```
|
|
128
|
+</td>
|
|
129
|
+<td>
|
|
130
|
+
|
|
131
|
+ ```js
|
|
132
|
+ options: {
|
|
133
|
+ animations: {
|
|
134
|
+ showModal: {
|
|
135
|
+ content: {
|
|
136
|
+ alpha: {
|
|
137
|
+ from: 0,
|
|
138
|
+ to: 1,
|
|
139
|
+ duration: 250
|
|
140
|
+ }
|
|
141
|
+ }
|
|
142
|
+ }
|
|
143
|
+ }
|
|
144
|
+ }
|
|
145
|
+ ```
|
|
146
|
+</td>
|
|
147
|
+</tr>
|
|
148
|
+</table>
|
|
149
|
+
|
|
150
|
+### drawBehind is deprecated on iOS
|
|
151
|
+> ❗️topBar and bottomTabs drawBehind option will be removed in the next major version.
|
|
152
|
+
|
|
153
|
+The drawBehind option has been an anti pattern on iOS from the start and was introduced only for parity with Android api.
|
|
154
|
+On iOS, when a ScrollView or a SafeAreaView are used as screen root; the system handles insets automatically.
|
|
155
|
+As adoption of notch devices increases, developers use these views regularly, rendering the drawBehind option useless.
|
|
156
|
+
|
|
157
|
+>**During the migration phase, leave Android options unchanged and set `drawBehind: true` to both TopBar and BottomTabs in default options.**
|
|
158
|
+
|
|
159
|
+### Android: Animation values are now declared in dp
|
|
160
|
+If you're animating `translationY` or `translationX` pass these values in dp instead of pixels.
|
|
161
|
+This is especially relevant to values returned by `await Navigation.constants()` api as these values are returned in dp. Now, if you'd like to use them in animations, you can do so without converting to pixels.
|
|
162
|
+
|
|
163
|
+# 4.8.1
|
|
164
|
+## Fixed
|
|
165
|
+### Android
|
|
166
|
+* Fix NPE when showing Overlay [#bfde34a](https://github.com/wix/react-native-navigation/commit/bfde34a5862c971587583aa52cb450cf526d5c66) by [guyca](https://github.com/guyca)
|
|
167
|
+### iOS
|
|
168
|
+* Fix overlays touch interception on new iPads [#433f48b](https://github.com/wix/react-native-navigation/commit/433f48b59d9be5aa328361654341afa8414c2e21) by [yogevbd](https://github.com/yogevbd)
|
|
169
|
+
|
|
170
|
+# 4.8.0
|
|
171
|
+## Fixed
|
|
172
|
+### Android
|
|
173
|
+* Support react-native-youtube [#ffbd288](https://github.com/wix/react-native-navigation/commit/ffbd2882b24109ff8f2b51ca3c8c88822cc9afb7) by [guyca](https://github.com/guyca)
|
|
174
|
+### iOS
|
|
175
|
+* Fix wrong SafeAreaView margins when using bottomTabs.drawBehind: true [#527fd49](https://github.com/wix/react-native-navigation/commit/527fd49f2f1517143032a8b14f6ab17d2f74c032) by [yogevbd](https://github.com/yogevbd)
|
|
176
|
+
|
|
177
|
+# 4.7.1
|
|
178
|
+## Fixed
|
|
179
|
+* Move selectTabOnPress prop to correct interface [#d6ead65](https://github.com/wix/react-native-navigation/commit/d6ead65c9331f12d3f79fc3b5bb7e0a0de80816e) by [phanghos](https://github.com/phanghos)
|
|
180
|
+### iOS
|
|
181
|
+* Fix external components layout measurement [#1961181](https://github.com/wix/react-native-navigation/commit/196118186fb788200dafcc1e11cd9f7d6e3f6dda) by [yogevbd](https://github.com/yogevbd)
|
|
182
|
+
|
2
|
183
|
# 4.7.0
|
3
|
184
|
## Added
|
4
|
185
|
* On tab press event - handle tab selection in Js [#b153142](https://github.com/wix/react-native-navigation/commit/b1531428a0a9608b5d1c84547f228d5de0c1aca2) by [pontusab](https://github.com/pontusab)
|