Apply stack options when stacks are attached to BottomTabs
Currently options are applied when a view is visible. This caused some noticeable flickering when
switching to tabs for the first time.
This commit adds a new callback which ViewController can override - onAttachToParent.
StackController now uses it to apply options which prevents flickering.
Options were merged after screen was popped from the backing stack data structure.
This meant that options were not resolved correctly for it as it was already detached from the stack.
This was especially noticeable when declaring a custom animation is mergeOptions passed to Navigation.pop().
Fixes #3869 and closes #4138
In some places “enable” was used to control certain options. This commit adds backwards compatible support
for “enabled” property which should be used from now on.
This commit adds a dedicated RN 57 build flavour for the Wix fork, where 506f920838 is reverted.
The revert reintroduced UiImplementationProvider which is required to pass SyncUiImplementation to UiManager.
* bind viewController to presenters using bindViewController
* Merge options to the specific provided layout
* Moved custom titleView creation to RNNRootViewController
* Moved default options to presenters, moved options applying to presenters, resolved options in RNNOptionsResolver
* Fixes merge options
* Fixes topBar transition on pop
* Prevent titleView creation when react titleView exists
* Fixed unit tests
* Options refactor WIP
* Detach applied options from DTO - WIP
* Added option types and option parsers
* Unit test passes
* Added presenters for each parent type
* Fixes unit tests
* Rename StringParam to Text, changed bottomTabs.drawBehind and topBar.drawBehind default to false
* set layout.backgroundColor default to white
* Added unit tests for RNNViewControllerPresenter
* Set layout.backgroundColor default nil
* Fixes buttons color missing options
* Fix unit test
* fix button color parsing
* Moved default options to presenters
* default options fixes
* Fixes e2e
* Fixes unit tests
* Resolve child options on childWillAppear
* Recrusively setDefaultOptions on rootViewController tree
* Fixes default values
* Fixes tests
Fix YellowBox handling in TopBar components on RN >= 0.56
This commit includes two fixes to YellowBox handling:
1. RN started throwing exceptions when views added in JSX were removed from hierarchy.
We could probably use UiManager to fiddle around with the yellow box, either removing it or making
it hidden and allow touch events to pass through it. For now, we continue removing yellow boxes from hierarchy
and we replace the removed yellow boxed with dummy views.
2. A “Dismiss All” button was recently added, we remove that as well.
Fixes #4035
Options are handled in Js and should not be passed over the bridge as that may
cause serialisation errors. Omitting passProps reduces the amount of data passed over the
bridge as well.