Add componentName in modalDismissed event. (#5846)
* [iOS] Added componentName to be passed to modalDismissedEvent
* Added componentName to the ModalDismissedEvent type.
* Updated the JS test.
* Updated the Playground Podfile.lock.
* Updated the doc.
* Fixed dismissedMultipleModals not having a name.
* Made componentName optional for ModalDismissedEvent.
* Initial Android implementation
* Revert Android e2e emulator name
* Revert iOS Podfile
* Podfile
* Setting OCMock to 3.4.3
* Fixed the documentation.
* Fixed requested changes
* Updated the doc.
* Now emitting componentName for dismissAllModals event.
* Retriggering build
* Revert
* Move all topBar.title options to topBarTitlePresenter (#5883)
Fix TopBar title animation. This commit changes how RNN handles title and subtitle.
Until now, RNN created a custom view for title and subtitle which interfered with the way the system animated the TopBar title.
With this commit the custom view is created only when both subtitle and title are declared, otherwise RNN uses the system behavior.
* make dotIndicator to respect visible value (#5884)
In Android dotIndicator with initial value of visible: false is not respected and the dot appears in any case.
Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
* Update default value for fontsize in navigation title and subtitle (#5868)
Co-authored-by: Yogev Ben David <yogevbd@wix.com>
* v0.62 Support (#5795)
react native 0.62 Support
* Fix bottomTab merging options with default (#5885)
When updating bottomTab options with mergeOptions - default options were not taken into account and therefore were not applied to the newly created tabBarItem
* Update package.json version to 4.6.1 [ci skip]
* Update package.json version to 4.7.0 [ci skip]
* Fix external components layout
* Move selectTabOnPress prop to correct interface (#5894)
* Update changelog
* External components fixes (#5896)
* Fix external components layout
* Fix external component navigationItem options resolving
* f
* Update package.json version to 4.7.1 [ci skip]
* Official Gradle Wrapper Validation Action (#5901)
See: https://github.com/gradle/wrapper-validation-action
* temporarily disable workflows
* Support react-native-youtube (#5903)
react-native-youtubte is a popular library which wraps the native youtube library. The native lib attempts to detect if the player is hidden behind other views in order to prevent developers from playing videos in the background.
Since the overlay container was always attached to hierarchy, the library stopped playback as it mistakingly detected the player was used in the background.
This commit simply attaches the overlay container only when needed so as long as no overlays are displayed, the lib can be used.
* apply extendedLayoutIncludesOpaqueBars true on all viewControllers (#5906)
* Update package.json version to 4.8.0 [ci skip]
* Fix overlays touch interception on new iPads (#5908)
* Fix NPE when showing Overlay (#5909)
Co-authored-by: Yogev Ben David <yogevbd@wix.com>
* Update package.json version to 4.8.1 [ci skip]
* Update changelog
* Allow reset topBar.title.color when color isn't provided (#5910)
* Allow topBar.title.color reset when color isn't provided
* Reset to nil color
* Merge topBar options with default
* Fix topBar options merging
Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
* Update package.json version to 4.8.2 [ci skip]
* Update package.json version to 4.8.3 [ci skip]
* Fix wallaby (#5917)
* Fix wallaby
* Add coverage on tsx files
* Update lib/src/commands/OptionsProcessor.test.ts
Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
* Fix topBar options merging with default (#5918)
* Add missing function
* Update package.json version to 4.8.4 [ci skip]
* Update changelog
* v5 (#5931)
Merge v5 into master
Highlights of this release
* Easier installation
* autolink and reac-native link support
* Shared Element Transition - reimplemented from scratch and new API
* [iOS] showModal animation api parity
* [Android] Animation values are now declared in dp
* [iOS] deprecate topBar.drawBehind
* [Android] RNN is migrating to Kotlin
closes #5904
* Update package.json version to 5.0.0 [ci skip]
* Adapt installation guide to v5
* Update installation guide
Forgot to add Kotlin plugin
* Fix compilation issue when using react native 0.62
Fixes #5933
* Update package.json version to 5.0.1 [ci skip]
* Add deprecateDrawBehind option (#5934)
* Add deprecateDrawBehind option
* Apply draw behind options when deprecateDrawBehind equals false
Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
* [v5][docs][showcases] starter kit (#5936)
Hey! I have updated RNN version to the latest one (5.0.1 by the time)
Hope someone will find it useful 🤩
* Add window.backgroundColor option (#5942)
* Update package.json version to 5.1.0 [ci skip]
* Fix crash when mergeOptions were called before stack view was created (#5945)
Co-authored-by: Yogev Ben David <yogevbd@wix.com>
* Apply extendedLayoutIncludesOpaqueBars true on all viewControllers
* Update package.json version to 5.1.1 [ci skip]
* Update Android alert
* Fix custom push animations (#5947)
Custom push animations broke after refactoring Shared Element Transition.
Fixes #5943
* Layout background color (#5946)
* Apply layout.backgroundColor on parent view controllers
* Add layout.componentBackgroundColor
* Remove drawBehind deprecation
* Update package.json version to 6.0.0 [ci skip]
* Update changelog
* Fix applying drawBehind through mergeOptions (#5951)
mergeOptions did not handle bottomTabs.drawBehind options properly - the ReactRootView wasn't remeasured.
* Update package.json version to 6.0.1 [ci skip]
* Add slide animation to playground app
* [iOS] Added componentName to be passed to modalDismissedEvent
* Added componentName to the ModalDismissedEvent type.
* Updated the JS test.
* Updated the Playground Podfile.lock.
* Updated the doc.
* Fixed dismissedMultipleModals not having a name.
* Made componentName optional for ModalDismissedEvent.
* Initial Android implementation
* Revert Android e2e emulator name
* Revert iOS Podfile
* Podfile
* Setting OCMock to 3.4.3
* Fixed the documentation.
* Fixed requested changes
* Updated the doc.
* Now emitting componentName for dismissAllModals event.
* Retriggering build
* Revert
* Fix dismissedMultipleModals componentName
* Undo OCMock hard version
* Updated Podfile
Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
Co-authored-by: Yogev Ben David <yogevbd@wix.com>
Co-authored-by: Ioannis Tsampoulatidis <tsampoulatidis@gmail.com>
Co-authored-by: Mary Jenel <myersjenel@gmail.com>
Co-authored-by: Jason Safaiyeh <safaiyeh@protonmail.com>
Co-authored-by: wixmobile <41264282+wixmobile@users.noreply.github.com>
Co-authored-by: Roberto Tatasciore <tatasciorecont@gmail.com>
Co-authored-by: Jonathan Leitschuh <jonathan.leitschuh@gmail.com>
Co-authored-by: ʙ ᴀ ᴛ ʀ <kanzitdinov@gmail.com>
Merge v5 into master
Highlights of this release
* Easier installation
* autolink and reac-native link support
* Shared Element Transition - reimplemented from scratch and new API
* [iOS] showModal animation api parity
* [Android] Animation values are now declared in dp
* [iOS] deprecate topBar.drawBehind
* [Android] RNN is migrating to Kotlin
closes #5904
Added modalAttemptedToDismiss event with tests and docs (#5832)
* Added modalAttemptedToDismiss event with tests and docs
* Typo on pageSheet modal button label
* Update ModalScreen.js
* Fixed button testID
* Revert label to fix test cases
Co-authored-by: Guy Carmeli <guyca@users.noreply.github.com>
Co-authored-by: Yogev Ben David <yogevbd@wix.com>
Called each time a screen is popped, either due to `Navigation.pop` or pop gesture.
closes #3941
Navigation.events().registerScreenPoppedListener(({ componentId }) => {
});
Add iOS support for `bottomTabs.attachMode`.
This property controls when BottomTabs children are attached to hierarchy and when their React views are created.
By default, RNN attaches all children at the same time which might impact loading time as a few screens are instantiated at once.
Using `afterInitialTab` or `onSwitchToTab` generally leads to improved start up time.
Dismiss presented modals and clear the component store on reloading (#5682)
* Dismiss presented modals and clear the component store on reload
* Detach all overlays on react reload
* Move synchronous dismissing modals to modalManager
* Fix iOS unit tests
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
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.
Propagate new defaultOptions to presenters (#5404)
When defaultOptions are set after setRoot has been called presenters need to receive the default options as well,
otherwise the outdated default options are regarded.
Fixes #5395
[V2][iOS] Added waitForRender support for setStackRoot (#5141)
* Properly check setStackRoot animation and waitForRender of each child
* Read waitForRender from the last child of the new stackRoot
* Fixed indentation
* Use setStackRoot.waitForRender instead of push.waitForRender
* Fixed merge issues caused by the text editor
* removed eof newline
* Added a missing semicolon
* Variable toVC renamed to newVC for consistency
* Fixed indentation problems
This PR adds support for setting stack root with multiple children, which is to be expected as stack can be initialised with multiple children.
Closes #4441
* 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
* Renamed RNNRootViewProtocol to RNNParentProtocol and added RNNLeafProtocol
* fixed unit test
* Better options resolving
* Revert "Revert "Refactor options (#3962)""
This reverts commit c266041b85.
* Revert "Revert "Fixes shared element transition""
This reverts commit 005f039f7c.
* Revert "Revert "Adresses #3963 - stack options applied to children""
This reverts commit be09cb0e9a.
* Revert "Revert "Added unit test coverage for RNNNavigationController""
This reverts commit 199cebd221.
* Merge stack options
This commits adds support for merging stack options by the stack’s componentId
Also while I’m at it - use fade animation when setting root
* Merge BottomTabs options
Merge BottomTabs options when calling mergeOptions with BottomTabs componentId
* Fixes options
* Refactor peek and pop
* Rollback some XCode stuff
* Added tests for touchablePreview event
* Also fixing searchbarcancelpressed event
* Making sure tests work