From 251da15a112fd905ebe5aa8144acda348b99edc5 Mon Sep 17 00:00:00 2001 From: Ubax Date: Tue, 28 Sep 2021 12:52:42 +0300 Subject: [PATCH 1/4] chore: Adds common problems with header and other --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index e603c39ba4..0b9c12b392 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,21 @@ This library should work out of the box with all existing react-native libraries If you are building a navigation library you may want to use `react-native-screens` to have control over which parts of the React component tree are attached to the native view hierarchy. To do that, `react-native-screens` provides you with the components documented [here](https://github.com/kmagiera/react-native-screens/tree/master/guides/GUIDE_FOR_LIBRARY_AUTHORS.md). +## Common problems + +### Problems with header on iOS +- [Focused search bar causes new screens to have incorrect header](https://github.com/software-mansion/react-native-screens/issues/996) +- [Scrollable content gets cut off by the header with a search bar](https://github.com/software-mansion/react-native-screens/issues/1120) +- [RefreshControl does not work properly with NativeStackNavigator and largeTitle](https://github.com/software-mansion/react-native-screens/issues/395) + +#### Solution +Use `ScrollView` with prop `contentInsetAdjustmentBehavior=“automatic”` as a main container of the screen and set `headerTranslucent: true` in screen options. + +### Other problems +- [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773) +- [Memory leak while moving from one screen to another in the same stack](https://github.com/software-mansion/react-native-screens/issues/843) +- [LargeHeader stays small after pop/goBack/swipe gesture on iOS 14+](https://github.com/software-mansion/react-native-screens/issues/649) - [fix](https://github.com/software-mansion/react-native-screens/issues/649#issuecomment-712199895) + ## Contributing There are many ways to contribute to this project. See [CONTRIBUTING](https://github.com/kmagiera/react-native-screens/tree/master/guides/CONTRIBUTING.md) guide for more information. Thank you for your interest in contributing! From 9b93f1481eb3a9dec8f84ee9445778fe409b2e10 Mon Sep 17 00:00:00 2001 From: Ubax Date: Wed, 20 Oct 2021 10:00:39 +0300 Subject: [PATCH 2/4] Adds table to other problems --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0b9c12b392..6304212907 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ React Native Screens by Software Mansion - This project aims to expose native navigation container components to React Native. It is not designed to be used as a standalone library but rather as a dependency of a [full-featured navigation library](https://github.com/react-navigation/react-navigation). ## Supported platforms @@ -84,9 +83,10 @@ You can also disable the usage of native screens per navigator with [`detachInac ### Using `createNativeStackNavigator` with React Navigation To take advantage of the native stack navigator primitive for React Navigation that leverages `UINavigationController` on iOS and `Fragment` on Android, please refer: + - for React Navigation >= v6 to the [Native Stack Navigator part of React Navigation documentation](https://reactnavigation.org/docs/native-stack-navigator) -- for React Navigation v5 to the [README in react-native-screens/native-stack](https://github.com/software-mansion/react-native-screens/tree/master/native-stack) -- for older versions to the [README in react-native-screens/createNativeStackNavigator](https://github.com/software-mansion/react-native-screens/tree/master/createNativeStackNavigator) +- for React Navigation v5 to the [README in react-native-screens/native-stack](https://github.com/software-mansion/react-native-screens/tree/master/native-stack) +- for older versions to the [README in react-native-screens/createNativeStackNavigator](https://github.com/software-mansion/react-native-screens/tree/master/createNativeStackNavigator) ## Interop with [react-native-navigation](https://github.com/wix/react-native-navigation) @@ -104,17 +104,22 @@ To do that, `react-native-screens` provides you with the components documented [ ## Common problems ### Problems with header on iOS + - [Focused search bar causes new screens to have incorrect header](https://github.com/software-mansion/react-native-screens/issues/996) - [Scrollable content gets cut off by the header with a search bar](https://github.com/software-mansion/react-native-screens/issues/1120) - [RefreshControl does not work properly with NativeStackNavigator and largeTitle](https://github.com/software-mansion/react-native-screens/issues/395) #### Solution + Use `ScrollView` with prop `contentInsetAdjustmentBehavior=“automatic”` as a main container of the screen and set `headerTranslucent: true` in screen options. ### Other problems -- [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773) -- [Memory leak while moving from one screen to another in the same stack](https://github.com/software-mansion/react-native-screens/issues/843) -- [LargeHeader stays small after pop/goBack/swipe gesture on iOS 14+](https://github.com/software-mansion/react-native-screens/issues/649) - [fix](https://github.com/software-mansion/react-native-screens/issues/649#issuecomment-712199895) + +| Problem | Solution | +| -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773) | | +| [Memory leak while moving from one screen to another in the same stack](https://github.com/software-mansion/react-native-screens/issues/843) | [explanation](https://github.com/software-mansion/react-native-screens/issues/843#issuecomment-832034119) | +| [LargeHeader stays small after pop/goBack/swipe gesture on iOS 14+](https://github.com/software-mansion/react-native-screens/issues/649) | [potential fix](https://github.com/software-mansion/react-native-screens/issues/649#issuecomment-712199895) | ## Contributing From dba1a5b36a34d997705c64dededb0316e7673690 Mon Sep 17 00:00:00 2001 From: Ubax Date: Wed, 20 Oct 2021 13:56:01 +0300 Subject: [PATCH 3/4] Adds link to svg fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6304212907..7855d837e2 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ Use `ScrollView` with prop `contentInsetAdjustmentBehavior=“automatic”` as a | Problem | Solution | | -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773) | | +| [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773) | [fix](https://github.com/software-mansion/react-native-screens/issues/773#issuecomment-783469792) | | [Memory leak while moving from one screen to another in the same stack](https://github.com/software-mansion/react-native-screens/issues/843) | [explanation](https://github.com/software-mansion/react-native-screens/issues/843#issuecomment-832034119) | | [LargeHeader stays small after pop/goBack/swipe gesture on iOS 14+](https://github.com/software-mansion/react-native-screens/issues/649) | [potential fix](https://github.com/software-mansion/react-native-screens/issues/649#issuecomment-712199895) | From d4514c0baa4e4be2237809099b25f9cc6f521d33 Mon Sep 17 00:00:00 2001 From: Ubax Date: Thu, 21 Oct 2021 12:28:29 +0300 Subject: [PATCH 4/4] Changes fix to realted prs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7855d837e2..b0861a7c55 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ Use `ScrollView` with prop `contentInsetAdjustmentBehavior=“automatic”` as a | Problem | Solution | | -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773) | [fix](https://github.com/software-mansion/react-native-screens/issues/773#issuecomment-783469792) | +| [SVG component becomes transparent when goBack](https://github.com/software-mansion/react-native-screens/issues/773) | [related PRs](https://github.com/software-mansion/react-native-screens/issues/773#issuecomment-783469792) | | [Memory leak while moving from one screen to another in the same stack](https://github.com/software-mansion/react-native-screens/issues/843) | [explanation](https://github.com/software-mansion/react-native-screens/issues/843#issuecomment-832034119) | | [LargeHeader stays small after pop/goBack/swipe gesture on iOS 14+](https://github.com/software-mansion/react-native-screens/issues/649) | [potential fix](https://github.com/software-mansion/react-native-screens/issues/649#issuecomment-712199895) |