Remove component if title is defined in mergeOptions (#5634)
When mergeOptions was called without a title component, existing component was undesirably removed.
This commit changes how component is removed when mergeOptions is called. It will now be removed if a component is not defined and title is defined in mergeOptions.
Fixes #5628
This new updateProps command allows to update props for a component registered with Navigation.registerComponent.
The updated props are handled by shouldComponentUpdate and componentDidUpdate lifecycle methods.
This commit builds upon the work done in 291f16177d and is a breaking change.
Allow to update props for a specific component (#5612)
This commit adds support to update props of screen or custom button/title via the mergeOptions api.
```js
Navigation.mergeOptions('myComponentId', {
passProps: {
text: 'new value'
}
});
```
Always merge options with parent controller (#5606)
Until now, mergeOptions would merge with parent controller only if mergeOptions was called with
a componentId. This commit fixes the issue and makes options merge correctly even when called with a layoutId.
* Use iPhone 11 in detox e2e
* Run detox e2e tests on iPhone 11
* Run detox e2e tests on iPhone 11
* Upgrade detox@14.x.x
* Exclude broken e2e test on iOS 13
Add support for getLaunchArgs on Android
**Usage:**
1. **Pass** args in order to run the application on the device using ADB or xcrun or Detox:
- Detox: `device.launchApp(bundleId,{launchArgs: {'-key1': 'val1'}})` must use launchArgs key, see [docs](https://github.com/wix/Detox/blob/master/docs/APIRef.DeviceObjectAPI.md#7-additional-launch-arguments).
- ADB: `adb shell am start -n com.yourpackage/com.yourpackage.YourActivity --es launchArgs "{some stringyfied json}"`
- Xcrun: `/usr/bin/xcrun simctl launch ${udid} ${bundleId} --args -key1 value1 -key2 value2`
2. **Retrieve** the arguments: `const launchArgs = await Navigation.getLaunchArgs();`
- There is a small difference between platforms on how they pass the launch args:
- on iOS, the args will be passed as an array of pairs (argv,argc)
- on Android, the args will be passed in the form of a dictionary
Extract args as a dictionary example:
```javascript
const launchArgs = await Navigation.getLaunchArgs();
let resultArgs = {};
if (Platform.OS === 'android') {
resultArgs = launchArgs; // no need to proccess its a dictionary
} else {
for (let i = 0; i < launchArgs.length; i += 2) {
if (i + 1 < launchArgs.length) {
resultArgs[launchArgs[i]] = launchArgs[i + 1];
}
}
}
```
Prefer new imageWithTintColor API when tinting an UIImage (#5458)
With this change, dynamic colors will be supported when tinting an image and the image color will change on the fly depending on the dynamic provider and traits. This will be especially useful when supporting the new dark mode in iOS 13.
Apparently lockMode conflicts with visibility - If a menu is visible and lockMode locked is applied the menu closes.
Also removed temp code related to workaround introduced for temp sideMenu options (visibility)
Break all the PRs :(
iOS and Android code base used different naming conventions - this commit aims to unify naming conventions. I probably missed a few properties here and there so this will be an ongoing effort.