This commit adds support to the startDelay option in shared element transitions on Android. It also fixes image scale transition which only animated the image's scale type, but not its bounds.
Support declaring interpolation per shared element transition (#6139)
* Implement startDelay + fix image scale transition
This commit adds support to the startDelay option in shared element transitions on Android. It also fixes image scale transition which only animated the image's scale type, but not its bounds.
* Support declaring interpolator per element transition
What's changed:
- Added a new side bar, `Third party integration` and to that added `React Context API` and `MobX` documentation.
- Added a limitation of using React Context API with RNN so people are informed of such caveat.
- Informed the readers that if they wish to trigger re-renders across all screens, they need to use the alternatives such as MobX or Redux.
This PR introduces an options to control the NavigationBar's visibility on Android.
```js
navigationBar: {
visible: false
}
```
Co-authored-by: Guy Carmeli <guyc@wix.com>
* Update installing doc
* Rename style articles
* add docs prefix to getting started articles
* Rename all the things. Consistent id format
* Split docs and api
* Fix links
Co-authored-by: Guy Carmeli <guyc@wix.com>
* Completely rewritten the docs from scratch
* More coherent separation between guides and API documentation
* Switched to Docusaurus 2 since Docsify is deprecated
* More code samples
* Images and animated gifs were added where appropriate improve clarity (more will be added in the future)
Fix SafeAreaView and width in sidedrawer (#3418, #4527) (#6080)
Prevously: Adding a sideMenu with no width resulted in the side content having 100% width (partially drawn behind center view). Adding a sidemenu with a width option resulted in SafeAreaView inside the side content not working (content obstructed by iPhone notch).
Undoing the fix in commit 37f5697 fixes the first problem.
Calling setNeedsLayout on the sideMenu also fixes the original problem of SafeAreaView not working correctly. Although I am not sure why this is needed. There may a better solution.
Co-authored-by: Yogev Ben David <yogev132@gmail.com>
Refactor right buttons
This pr started with an attempt to eliminate button flickering entirely when updating buttons which contain react components via mergeOptions. While the attempt wasn't 100% successful, I dit get some insights in the process.
* It's not possible to add buttons at specific indices. Buttons contain an order property which determines the order of the button in the TopBar. To somewhat overcome this limitation, we can let users control button order via options.
* When a right most component button is replaced with another component button, the rest of the buttons shift to the right since the newly added component isn't measured when it's added to the menu and its width is zero.
We usually handle this situation with the `waitForRender` option but since buttons are measured with `MeasureSpec.UNSPECIFIED`, their dimensions are zero. Because of this, I've added options to set button dimensions.
* When updating buttons via mergeOptions, if a component button is already added to the menu with the same order we will not remove and added it again. This mitigates flickering in some situations.
* Textual button style properties were applied by traversing the view hierarchy and searching for the TextView corresponding to the button and updating its styles directly.
There was an inherent bug in this logic where if two buttons contained the same text, styles could have been applied to the wrong TextView. We now apply styles directly on the button using spans.
* Fix invalid popover enum value for modal presentation style
The correct enum value as defined in lib/ios/RNNConvert.m is "popover" not "popOver", in line with UIModalPresentationPopover.
* Add to documentation on modal presentation styles
Add popover value and link to iOS documentation.
Co-authored-by: Yogev Ben David <yogev132@gmail.com>
Fix title component not being replaced via mergeOptions (#6066)
This commit fixes a bug related to setting a new react component as title via mergeOptions. When a title component was set, and the user tried to replace the existing title with a new title via mergeOptions, the new title was not created and instead the current title was reapplied.
Fixes #5377
Configure scrollEdgeAppearance with opaque background (#6038)
* Configure scrollEdgeAppearance with opaque background
I noticed there is now an animation that occurs when pushing the first
view on a stack. This will happen with both:
`largeTitle: { visible: true }`
and
`largeTitle: { visible: false }`
It seems caused by the setting of the `scrollEdgeAppearance` background
without first configuring it using `configureWithOpaqueBackground`.
I also added checks for iOS 13 since these APIs require iOS 13.
* Update lib/ios/TopBarAppearancePresenter.m
Co-Authored-By: Yogev Ben David <yogevbd@wix.com>
* Update lib/ios/TopBarAppearancePresenter.m
Co-authored-by: Yogev Ben David <yogev132@gmail.com>
Co-authored-by: Yogev Ben David <yogevbd@wix.com>