-
-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix back button menu for headerBackTitleVisible prop #1646
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks fine. I'll test it & ship it (if everything is ok)
Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
not included originally due to merge conflict
It seems like this change caused an issue in our codebase because it now always shows the |
@kpoelhekke, |
Thanks @kkafar. FYI, these are the {
headerShown: true,
headerBackTitleVisible: false,
headerTintColor: theme.activeTab,
headerBackImageSource: backIconPath,
headerShadowVisible: false,
orientation: "portrait_up",
headerTitleAlign: "center",
} |
## Description @kkafar: #1646 introduced a bug, where if iOS version >= 14 styles for back title would not get applied, due to [ill defined `if/else-if` logic](https://github.com/software-mansion/react-native-screens/blob/5e1f7ecdf30573f3e441e73c4f1f05c1f3ab9ccb/ios/RNSScreenStackHeaderConfig.mm#L477-L491). ## Changes @kkafar: Removed the fix introduced in #1646 and replaced it with setting `backBarButtonItem`'s title to `nil` & `backBarButtonTitle` to appropriate value when back button title is supposed to be invisible. This results in no title being displayed next to back button, but the correct value is present in back menu (if one is enabled). To achieve the demanded effect I needed to distinguish between states: 1. back title visible or not next to back button 2. back title is nil / empty / whitespace only Currently when `headerBackTitleVisible: false` is set in JS, [whitespace only string is send to native side](https://github.com/software-mansion/react-native-screens/blob/5e1f7ecdf30573f3e441e73c4f1f05c1f3ab9ccb/src/native-stack/views/HeaderConfig.tsx#L105) (same thing [happens in `react-navigation`](https://github.com/react-navigation/react-navigation/blob/2ec98f3fae051c60e76aed3698d1bca6bbf730ef/packages/native-stack/src/views/HeaderConfig.tsx#L171)), but the same information can be passed to native side when user sets: ```js headerBackTitleVisible: true, headerBackTitle: ' ' ``` so we can not really determine on native side whether the back button title should be visible or not (in case of empty string / nil passed from the user we default to title of previous screen). Therefore I decided to pass `headerBackTitleVisible` prop value directly to the native side via **new prop `backTitleVisible` on `ScreenStackHeaderConfig` component** and base new logic on its (props) value. ## Screenshots / GIFs ### Before https://user-images.githubusercontent.com/32227697/221241945-58d3bb51-f25a-4d0f-b74f-a4e18792535b.mp4 ### After https://user-images.githubusercontent.com/32227697/221241962-b25108c9-beb5-4bbb-b712-3830dfc1c250.mp4 ## Test code and steps to reproduce `Test1726` in `FabricTestExample` & `TestsExample` ## Checklist - [x] Included code example that can be used to test this change - [x] Updated TS types - [x] Updated documentation: <!-- For adding new props to native-stack --> - [x] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [x] Ensured that CI passes --------- Co-authored-by: Kacper Kafara <kacperkafara@gmail.com>
## Description Because of a bug introduced in #1646 `react-native-screens` v3.21 changed how header's backTitle handles whitespace strings in #1726 To allow for backwards compatibility in @react-navigation/native-stack we need have a way to check if this version or newer is used See react-navigation/react-navigation#11423 for more context. ## Changes Added new `isNewBackTitleImplementation` internal constant that can be used in `@react-navigation/native-stack`. ## Screenshots / GIFs #### This change & react-navigation/react-navigation#11423 applied: https://github.com/software-mansion/react-native-screens/assets/39658211/e2409b46-0725-473d-962b-1acc9deaa469 #### Without this change and react-navigation/react-navigation#11423: https://github.com/software-mansion/react-native-screens/assets/39658211/ec65fd5d-f8e9-4d88-b442-6bfc68e9ee9c ## Test code and steps to reproduce Test1791.tsx You need to apply changes introduced in react-navigation/react-navigation#11423 to `@react-navigation/native-stack` to test these canges. ## Checklist - [x] Included code example that can be used to test this change
## Motivation Changes made in software-mansion/react-native-screens#1646 in react-native-screens v3.19.0 introduced a bug making customizing `headerBackTitle` impossible. This got fixed in software-mansion/react-native-screens#1726 and released in `react-native-screens` **v3.21.0** with a change of `headerBackTitleVisible` logic. It requires a small adjustment in the `HeaderConfig.tsx` of the `@react-navigation/native-stack` as the empty string passed to `backTitle` results in a default back button instead of hiding it. Detailed explaination can be found in software-mansion/react-native-screens#1726 Fixes #11303, #11337 and #11375 ## Code example <details> <summary>Code example</summary> ```jsx import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import React from 'react'; import { Button, View } from 'react-native'; const Stack = createNativeStackNavigator(); const Screen1 = ({ navigation }) => ( <View style={{ flex: 1 }}> <Button onPress={() => navigation.navigate('Screen2')} title="Next" /> </View> ); const Screen2 = ({ navigation }) => ( <View style={{ flex: 1 }}> <Button onPress={() => navigation.navigate('Screen3')} title="Next" /> </View> ); const Screen3 = ({ navigation }) => ( <View style={{ flex: 1 }}> <Button onPress={() => navigation.navigate('Screen4')} title="Next" /> </View> ); const Screen4 = () => <View style={{ flex: 1 }} />; const App = () => { return ( <NavigationContainer> <Stack.Navigator> <Stack.Screen component={Screen1} name="Screen1" /> <Stack.Screen component={Screen2} name="Screen2" options={{ headerBackTitleVisible: false, headerBackTitle: 'Custom title in back button menu', }} /> <Stack.Screen component={Screen3} name="Screen3" options={{ headerBackTitle: 'Small title', headerBackTitleStyle: { fontSize: 8 }, }} /> <Stack.Screen component={Screen4} name="Screen4" options={{ headerBackTitle: 'Custom title', }} /> </Stack.Navigator> </NavigationContainer> ); }; export default App; ``` </details> ## Screen recordings #### `react-native-screens` v3.21.1 with fix in `@react-navigation/native-stack`: On the second screen header back title is hidden as it should and back button menu working ✅ https://github.com/react-navigation/react-navigation/assets/39658211/cc710687-3a64-4746-963e-a211a1b36455 #### `react-native-screens` v3.21.1 without the fix in `@react-navigation/native-stack`: On the second screen you can see the default header back title is shown instead of being hidden ❌ https://github.com/react-navigation/react-navigation/assets/39658211/2380dc4a-58c2-4376-a32d-a4249e3d8cc0 #### `react-native-screens` v3.20.0: Here the back button is all over the place ❌ https://github.com/react-navigation/react-navigation/assets/39658211/429c451a-3775-4d3f-bc08-6e33a2ac4af6 #### `react-native-screens` v3.18.2: Backward compatibility is kept in place (but back button menu doesn't work as expected in v3.18) ✅ https://github.com/react-navigation/react-navigation/assets/39658211/15665b45-1797-412e-9a13-540320dd27ed
#1866) ## Description Ah, here we go again... When header is hidden (`headerShown: false` in v6, `hidden: true` in v5) the method that updates header configuration returns early just after setting some layout related and LTR/RTL options, thus `title` property of current `UINavigationItem` is left unset leading to system default name `Back` being displayed in "back context menu". Fixes #1864 ## Changes When returning early (because header is hidden) we now set the `UINavigationItem` property to proper value. ## Test code and steps to reproduce `Test1864` in `FabricTestExample` & `TestsExample`. I've also tested it in context of * #1646 and mix of both. Seems to work fine. ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-native-screens](https://github.com/software-mansion/react-native-screens) | [`^3.18.2` -> `^3.25.0`](https://renovatebot.com/diffs/npm/react-native-screens/3.18.2/3.25.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.18.2/3.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.18.2/3.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-screens (react-native-screens)</summary> ### [`v3.25.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.25.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.24.0...3.25.0) #### What's Changed Minor release focused on bug fixes & internals. #### 🐛 Bug fixes - iOS: Add missing call to super method in `RNSScreenView#finalizeUpdates` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1855](https://github.com/software-mansion/react-native-screens/pull/1855) - Android: Shorten alpha animation to 83ms on default enter-out by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1835](https://github.com/software-mansion/react-native-screens/pull/1835) - iOS: Wrong title in back button menu for screens w/ hidden header by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1866](https://github.com/software-mansion/react-native-screens/pull/1866) - iOS: Full window overlay cannot receive tap when modal is full screen by [@​intergalacticspacehighway](https://github.com/intergalacticspacehighway) in [https://github.com/software-mansion/react-native-screens/pull/1872](https://github.com/software-mansion/react-native-screens/pull/1872) #### 🔢 Miscellaneous - Reinstall deps & pods in example apps after release by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1862](https://github.com/software-mansion/react-native-screens/pull/1862) - Fix typo in docs on `sheetCornerRadius` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1863](https://github.com/software-mansion/react-native-screens/pull/1863) - Use `PlatformColor` instead of plain `string` for color related props by [@​retyui](https://github.com/retyui) in [https://github.com/software-mansion/react-native-screens/pull/1846](https://github.com/software-mansion/react-native-screens/pull/1846) - Android: Migrate `replaceSystemWindowInsets` to `Builder.setSystemWindowInsets` by [@​kirillzyusko](https://github.com/kirillzyusko) in [https://github.com/software-mansion/react-native-screens/pull/1868](https://github.com/software-mansion/react-native-screens/pull/1868) #### New Contributors - [@​intergalacticspacehighway](https://github.com/intergalacticspacehighway) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1872](https://github.com/software-mansion/react-native-screens/pull/1872) - [@​retyui](https://github.com/retyui) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1846](https://github.com/software-mansion/react-native-screens/pull/1846) **Full Changelog**: software-mansion/react-native-screens@3.24.0...3.25.0 ### [`v3.24.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.24.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.23.0...3.24.0) Minor release focused on fixing build issues reported in [#​1859](https://github.com/software-mansion/react-native-screens/issues/1859). #### What's Changed #### 🐛 Bug fixes - Bad parameter type in `toggleCancelButton` search bar command by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1854](https://github.com/software-mansion/react-native-screens/pull/1854) - Add missing iOS API availbility checks by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1860](https://github.com/software-mansion/react-native-screens/pull/1860) #### 🔢 Miscellaneous - Update RN + other deps in example apps by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1847](https://github.com/software-mansion/react-native-screens/pull/1847) - Annotate `sheetExpandsWhenScrollingToEdge` prop as iOS specific by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1851](https://github.com/software-mansion/react-native-screens/pull/1851) - Improve readability of C++ namespaced types by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1856](https://github.com/software-mansion/react-native-screens/pull/1856) **Full Changelog**: software-mansion/react-native-screens@3.23.0...3.24.0 ### [`v3.23.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.23.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.22.1...3.23.0) #### What's Changed #### 🐛 Bug fixes - Headerheight incorrect on phones with dynamic island by [@​dylancom](https://github.com/dylancom) in [https://github.com/software-mansion/react-native-screens/pull/1784](https://github.com/software-mansion/react-native-screens/pull/1784) - Buggy search bar / large title behaviour on Fabric by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1825](https://github.com/software-mansion/react-native-screens/pull/1825) - Make RNSFullWindowOverlay a modal for accessibility by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1842](https://github.com/software-mansion/react-native-screens/pull/1842) - Calculate large headers in `useHeaderHeight` hook by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1844](https://github.com/software-mansion/react-native-screens/pull/1844) #### 👍 Improvements - Add onGestureCancel event by [@​piaskowyk](https://github.com/piaskowyk) in [https://github.com/software-mansion/react-native-screens/pull/1810](https://github.com/software-mansion/react-native-screens/pull/1810) - Add support for search bar placement by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1843](https://github.com/software-mansion/react-native-screens/pull/1843) #### 🔢 Miscellaneous - Update `tough-cookie` and `semver` dependencies by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1823](https://github.com/software-mansion/react-native-screens/pull/1823) - Bump versions of RNScreens, FBReactNativeSpec and RCTAppDelegate deps by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1827](https://github.com/software-mansion/react-native-screens/pull/1827) - Update `word-wrap` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1834](https://github.com/software-mansion/react-native-screens/pull/1834) - Format code in test examples by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1812](https://github.com/software-mansion/react-native-screens/pull/1812) - Unify class & method naming with respect to conventions by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1841](https://github.com/software-mansion/react-native-screens/pull/1841) #### New Contributors - [@​piaskowyk](https://github.com/piaskowyk) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1810](https://github.com/software-mansion/react-native-screens/pull/1810) - [@​tboba](https://github.com/tboba) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1823](https://github.com/software-mansion/react-native-screens/pull/1823) **Full Changelog**: software-mansion/react-native-screens@3.22.1...3.23.0 ### [`v3.22.1`](https://github.com/software-mansion/react-native-screens/releases/tag/3.22.1) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.22.0...3.22.1) Patch release bringing back old behaviour of `formSheet` modal on iOS when using `@react-navigation/native-stack`. #### What's Changed ##### Fixes - fix: move setting default values of medium-detent related props to `InnerScreen` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1811](https://github.com/software-mansion/react-native-screens/pull/1811) ##### Internal - chore: fix CI by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1803](https://github.com/software-mansion/react-native-screens/pull/1803) - chore(deps): update selected deps in examples by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1807](https://github.com/software-mansion/react-native-screens/pull/1807) - chore: fix typo in docs by [@​aleqsio](https://github.com/aleqsio) in [https://github.com/software-mansion/react-native-screens/pull/1808](https://github.com/software-mansion/react-native-screens/pull/1808) #### New Contributors - [@​aleqsio](https://github.com/aleqsio) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1808](https://github.com/software-mansion/react-native-screens/pull/1808) **Full Changelog**: software-mansion/react-native-screens@3.22.0...3.22.1 ### [`v3.22.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.22.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.21.1...3.22.0) Minor release fixing some build issues that could happen on older Xcode versions & with Android SDK 34. #### What's Changed - fix: canvas nullability in ScreenStack for Android SDK 34 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1795](https://github.com/software-mansion/react-native-screens/pull/1795) - fix: ifdef orientation code that requries iOS 16 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1794](https://github.com/software-mansion/react-native-screens/pull/1794) - chore: update & reinstall selected deps by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1798](https://github.com/software-mansion/react-native-screens/pull/1798) **Full Changelog**: software-mansion/react-native-screens@3.21.1...3.22.0 ### [`v3.21.1`](https://github.com/software-mansion/react-native-screens/releases/tag/3.21.1) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.21.0...3.21.1) Patch release adding internal `isNewBackTitleImplementation` constant for use in `@react-navigation/native-stack`. See [#​1791](https://github.com/software-mansion/react-native-screens/issues/1791) & [https://github.com/react-navigation/react-navigation/pull/11423](https://github.com/react-navigation/react-navigation/pull/11423) for details. ### [`v3.21.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.21.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.20.0...3.21.0) Minor release with support for React Native 0.72 on New Architecture, fixing some bugs and adding new functionalities. Please note that support for `react-navigation` v4 has been dropped with this version and you can no longer use `native-stack` v4 starting from this version. It might be considered a **BREAKING CHANGE** so be careful with updating. #### What's Changed - chore: migrate codegen to TypeScript by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1600](https://github.com/software-mansion/react-native-screens/pull/1600) - chore: update README on Fabric support by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1687](https://github.com/software-mansion/react-native-screens/pull/1687) - feat(iOS): back button subview for Fabric by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1581](https://github.com/software-mansion/react-native-screens/pull/1581) - fix(iOS): image loading for back button on Fabric by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1688](https://github.com/software-mansion/react-native-screens/pull/1688) - chore: refactor medium detent iOS implementation by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1699](https://github.com/software-mansion/react-native-screens/pull/1699) - feat(Android): add native default animations on Android 13 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1693](https://github.com/software-mansion/react-native-screens/pull/1693) - chore: fix e2e detox tests & `Example` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1681](https://github.com/software-mansion/react-native-screens/pull/1681) - fix(iOS): status bar does not respect app theme by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1708](https://github.com/software-mansion/react-native-screens/pull/1708) - chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/1709](https://github.com/software-mansion/react-native-screens/pull/1709) - chore: change fabric flag by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1705](https://github.com/software-mansion/react-native-screens/pull/1705) - chore(CI): extend timeout for Android e2e by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1711](https://github.com/software-mansion/react-native-screens/pull/1711) - chore: update deps in examples by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1714](https://github.com/software-mansion/react-native-screens/pull/1714) - chore: update library & examples dependencies by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1721](https://github.com/software-mansion/react-native-screens/pull/1721) - fix: Android build for `compileSdk < 33` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1723](https://github.com/software-mansion/react-native-screens/pull/1723) - feat: add imperative API for search bar by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1610](https://github.com/software-mansion/react-native-screens/pull/1610) - chore(deps): bump shell-quote from 1.6.1 to 1.8.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/1725](https://github.com/software-mansion/react-native-screens/pull/1725) - chore: improve Android anim resource management by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1727](https://github.com/software-mansion/react-native-screens/pull/1727) - chore: fix typo in build script by [@​Jace-Samsung](https://github.com/Jace-Samsung) in [https://github.com/software-mansion/react-native-screens/pull/1733](https://github.com/software-mansion/react-native-screens/pull/1733) - chore: set library namespace in build script by [@​Sprimage](https://github.com/Sprimage) in [https://github.com/software-mansion/react-native-screens/pull/1717](https://github.com/software-mansion/react-native-screens/pull/1717) - fix(iOS): back button not respecting style options by [@​tyler-coleman](https://github.com/tyler-coleman) in [https://github.com/software-mansion/react-native-screens/pull/1726](https://github.com/software-mansion/react-native-screens/pull/1726) - chore: override `onCreate` in example apps by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1736](https://github.com/software-mansion/react-native-screens/pull/1736) - feat: add `setText` command on SearchBar by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1739](https://github.com/software-mansion/react-native-screens/pull/1739) - chore(deps): bump activesupport from 6.1.4.6 to 7.0.4.3 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1744](https://github.com/software-mansion/react-native-screens/pull/1744) - fix: do not apply namespace if it is not available in agp by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1749](https://github.com/software-mansion/react-native-screens/pull/1749) - chore(deps): bump vm2 from 3.9.14 to 3.9.15 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/1752](https://github.com/software-mansion/react-native-screens/pull/1752) - fix: use new rotation API for iOS 16 by [@​kirillzyusko](https://github.com/kirillzyusko) in [https://github.com/software-mansion/react-native-screens/pull/1732](https://github.com/software-mansion/react-native-screens/pull/1732) - chore: improve Android 13 animations by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1756](https://github.com/software-mansion/react-native-screens/pull/1756) - chore(deps): bump vm2 from 3.9.15 to 3.9.16 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/1755](https://github.com/software-mansion/react-native-screens/pull/1755) - fix: ScreenStackHeaderConfig type by [@​tomekzaw](https://github.com/tomekzaw) in [https://github.com/software-mansion/react-native-screens/pull/1760](https://github.com/software-mansion/react-native-screens/pull/1760) - feat: remove v4 from repo by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1790](https://github.com/software-mansion/react-native-screens/pull/1790) - fix:Compatible with version 0.72 by [@​NiuGuohui](https://github.com/NiuGuohui) in [https://github.com/software-mansion/react-native-screens/pull/1765](https://github.com/software-mansion/react-native-screens/pull/1765) - fix: proper handling of header events on Fabric and bumping examples to 0.72 by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1783](https://github.com/software-mansion/react-native-screens/pull/1783) - feat: prevent native back button dismissal on iOS by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1773](https://github.com/software-mansion/react-native-screens/pull/1773) #### New Contributors - [@​Jace-Samsung](https://github.com/Jace-Samsung) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1733](https://github.com/software-mansion/react-native-screens/pull/1733) - [@​Sprimage](https://github.com/Sprimage) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1717](https://github.com/software-mansion/react-native-screens/pull/1717) - [@​tyler-coleman](https://github.com/tyler-coleman) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1726](https://github.com/software-mansion/react-native-screens/pull/1726) - [@​NiuGuohui](https://github.com/NiuGuohui) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1765](https://github.com/software-mansion/react-native-screens/pull/1765) **Full Changelog**: software-mansion/react-native-screens@3.20.0...3.21.0 ### [`v3.20.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.20.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.19.0...3.20.0) Minior release aimed at fixing [#​1686](https://github.com/software-mansion/react-native-screens/issues/1686) (change of default behaviour for `stackPresentation: 'formSheet'`). No other changes were introduced with this release. Next "feature" release is in preparation. **Full Changelog**: software-mansion/react-native-screens@3.19.0...3.20.0 ### [`v3.19.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.19.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.18.2...3.19.0) Minor release with support for React Native 0.71 **Important**: Since this version, Fabric is only supported for React Native 0.71+. Support for older versions has beed dropped. #### 🐛 Bug fixes - Try to apply pointer events behaviors in overlay by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1582](https://github.com/software-mansion/react-native-screens/pull/1582) - Make enabling device orientation notifications internal by [@​kacperkapusciak](https://github.com/kacperkapusciak) & [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1596](https://github.com/software-mansion/react-native-screens/pull/1596) - Fix back button menu for headerBackTitleVisible prop by [@​kacperkapusciak](https://github.com/kacperkapusciak) in [https://github.com/software-mansion/react-native-screens/pull/1646](https://github.com/software-mansion/react-native-screens/pull/1646) - Override requiresMainQueueSetup in RNSScreenManager by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1670](https://github.com/software-mansion/react-native-screens/pull/1670) #### 👍 Improvements - Support for React Native 0.71.0 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1631](https://github.com/software-mansion/react-native-screens/pull/1631) - Clarify installation instructions for Android by [@​evan1715](https://github.com/evan1715) in [https://github.com/software-mansion/react-native-screens/pull/1633](https://github.com/software-mansion/react-native-screens/pull/1633) #### 🔢 Miscellaneous - Fix FabricTestExample fails to start due to new `react-native.config.js` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1624](https://github.com/software-mansion/react-native-screens/pull/1624) - Examples stopped to work after RN issue by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1632](https://github.com/software-mansion/react-native-screens/pull/1632) - Exclude android/.settings file form repo by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1642](https://github.com/software-mansion/react-native-screens/pull/1642) - Bump deps & fix tvOS build by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1667](https://github.com/software-mansion/react-native-screens/pull/1667) - Unify CI between platforms by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1676](https://github.com/software-mansion/react-native-screens/pull/1676) #### New Contributors - [@​evan1715](https://github.com/evan1715) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1633](https://github.com/software-mansion/react-native-screens/pull/1633) **Full Changelog**: software-mansion/react-native-screens@3.18.2...3.19.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone America/Los_Angeles. 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/valora-inc/wallet). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <valorabot@valoraapp.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-native-screens](https://github.com/software-mansion/react-native-screens) | [`^3.18.2` -> `^3.25.0`](https://renovatebot.com/diffs/npm/react-native-screens/3.18.2/3.25.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.18.2/3.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.18.2/3.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-screens (react-native-screens)</summary> ### [`v3.25.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.25.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.24.0...3.25.0) #### What's Changed Minor release focused on bug fixes & internals. #### 🐛 Bug fixes - iOS: Add missing call to super method in `RNSScreenView#finalizeUpdates` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1855](https://github.com/software-mansion/react-native-screens/pull/1855) - Android: Shorten alpha animation to 83ms on default enter-out by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1835](https://github.com/software-mansion/react-native-screens/pull/1835) - iOS: Wrong title in back button menu for screens w/ hidden header by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1866](https://github.com/software-mansion/react-native-screens/pull/1866) - iOS: Full window overlay cannot receive tap when modal is full screen by [@​intergalacticspacehighway](https://github.com/intergalacticspacehighway) in [https://github.com/software-mansion/react-native-screens/pull/1872](https://github.com/software-mansion/react-native-screens/pull/1872) #### 🔢 Miscellaneous - Reinstall deps & pods in example apps after release by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1862](https://github.com/software-mansion/react-native-screens/pull/1862) - Fix typo in docs on `sheetCornerRadius` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1863](https://github.com/software-mansion/react-native-screens/pull/1863) - Use `PlatformColor` instead of plain `string` for color related props by [@​retyui](https://github.com/retyui) in [https://github.com/software-mansion/react-native-screens/pull/1846](https://github.com/software-mansion/react-native-screens/pull/1846) - Android: Migrate `replaceSystemWindowInsets` to `Builder.setSystemWindowInsets` by [@​kirillzyusko](https://github.com/kirillzyusko) in [https://github.com/software-mansion/react-native-screens/pull/1868](https://github.com/software-mansion/react-native-screens/pull/1868) #### New Contributors - [@​intergalacticspacehighway](https://github.com/intergalacticspacehighway) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1872](https://github.com/software-mansion/react-native-screens/pull/1872) - [@​retyui](https://github.com/retyui) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1846](https://github.com/software-mansion/react-native-screens/pull/1846) **Full Changelog**: software-mansion/react-native-screens@3.24.0...3.25.0 ### [`v3.24.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.24.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.23.0...3.24.0) Minor release focused on fixing build issues reported in [#​1859](https://github.com/software-mansion/react-native-screens/issues/1859). #### What's Changed #### 🐛 Bug fixes - Bad parameter type in `toggleCancelButton` search bar command by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1854](https://github.com/software-mansion/react-native-screens/pull/1854) - Add missing iOS API availbility checks by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1860](https://github.com/software-mansion/react-native-screens/pull/1860) #### 🔢 Miscellaneous - Update RN + other deps in example apps by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1847](https://github.com/software-mansion/react-native-screens/pull/1847) - Annotate `sheetExpandsWhenScrollingToEdge` prop as iOS specific by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1851](https://github.com/software-mansion/react-native-screens/pull/1851) - Improve readability of C++ namespaced types by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1856](https://github.com/software-mansion/react-native-screens/pull/1856) **Full Changelog**: software-mansion/react-native-screens@3.23.0...3.24.0 ### [`v3.23.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.23.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.22.1...3.23.0) #### What's Changed #### 🐛 Bug fixes - Headerheight incorrect on phones with dynamic island by [@​dylancom](https://github.com/dylancom) in [https://github.com/software-mansion/react-native-screens/pull/1784](https://github.com/software-mansion/react-native-screens/pull/1784) - Buggy search bar / large title behaviour on Fabric by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1825](https://github.com/software-mansion/react-native-screens/pull/1825) - Make RNSFullWindowOverlay a modal for accessibility by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1842](https://github.com/software-mansion/react-native-screens/pull/1842) - Calculate large headers in `useHeaderHeight` hook by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1844](https://github.com/software-mansion/react-native-screens/pull/1844) #### 👍 Improvements - Add onGestureCancel event by [@​piaskowyk](https://github.com/piaskowyk) in [https://github.com/software-mansion/react-native-screens/pull/1810](https://github.com/software-mansion/react-native-screens/pull/1810) - Add support for search bar placement by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1843](https://github.com/software-mansion/react-native-screens/pull/1843) #### 🔢 Miscellaneous - Update `tough-cookie` and `semver` dependencies by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1823](https://github.com/software-mansion/react-native-screens/pull/1823) - Bump versions of RNScreens, FBReactNativeSpec and RCTAppDelegate deps by [@​tboba](https://github.com/tboba) in [https://github.com/software-mansion/react-native-screens/pull/1827](https://github.com/software-mansion/react-native-screens/pull/1827) - Update `word-wrap` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1834](https://github.com/software-mansion/react-native-screens/pull/1834) - Format code in test examples by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1812](https://github.com/software-mansion/react-native-screens/pull/1812) - Unify class & method naming with respect to conventions by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1841](https://github.com/software-mansion/react-native-screens/pull/1841) #### New Contributors - [@​piaskowyk](https://github.com/piaskowyk) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1810](https://github.com/software-mansion/react-native-screens/pull/1810) - [@​tboba](https://github.com/tboba) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1823](https://github.com/software-mansion/react-native-screens/pull/1823) **Full Changelog**: software-mansion/react-native-screens@3.22.1...3.23.0 ### [`v3.22.1`](https://github.com/software-mansion/react-native-screens/releases/tag/3.22.1) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.22.0...3.22.1) Patch release bringing back old behaviour of `formSheet` modal on iOS when using `@react-navigation/native-stack`. #### What's Changed ##### Fixes - fix: move setting default values of medium-detent related props to `InnerScreen` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1811](https://github.com/software-mansion/react-native-screens/pull/1811) ##### Internal - chore: fix CI by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1803](https://github.com/software-mansion/react-native-screens/pull/1803) - chore(deps): update selected deps in examples by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1807](https://github.com/software-mansion/react-native-screens/pull/1807) - chore: fix typo in docs by [@​aleqsio](https://github.com/aleqsio) in [https://github.com/software-mansion/react-native-screens/pull/1808](https://github.com/software-mansion/react-native-screens/pull/1808) #### New Contributors - [@​aleqsio](https://github.com/aleqsio) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1808](https://github.com/software-mansion/react-native-screens/pull/1808) **Full Changelog**: software-mansion/react-native-screens@3.22.0...3.22.1 ### [`v3.22.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.22.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.21.1...3.22.0) Minor release fixing some build issues that could happen on older Xcode versions & with Android SDK 34. #### What's Changed - fix: canvas nullability in ScreenStack for Android SDK 34 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1795](https://github.com/software-mansion/react-native-screens/pull/1795) - fix: ifdef orientation code that requries iOS 16 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1794](https://github.com/software-mansion/react-native-screens/pull/1794) - chore: update & reinstall selected deps by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1798](https://github.com/software-mansion/react-native-screens/pull/1798) **Full Changelog**: software-mansion/react-native-screens@3.21.1...3.22.0 ### [`v3.21.1`](https://github.com/software-mansion/react-native-screens/releases/tag/3.21.1) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.21.0...3.21.1) Patch release adding internal `isNewBackTitleImplementation` constant for use in `@react-navigation/native-stack`. See [#​1791](https://github.com/software-mansion/react-native-screens/issues/1791) & [https://github.com/react-navigation/react-navigation/pull/11423](https://github.com/react-navigation/react-navigation/pull/11423) for details. ### [`v3.21.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.21.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.20.0...3.21.0) Minor release with support for React Native 0.72 on New Architecture, fixing some bugs and adding new functionalities. Please note that support for `react-navigation` v4 has been dropped with this version and you can no longer use `native-stack` v4 starting from this version. It might be considered a **BREAKING CHANGE** so be careful with updating. #### What's Changed - chore: migrate codegen to TypeScript by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1600](https://github.com/software-mansion/react-native-screens/pull/1600) - chore: update README on Fabric support by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1687](https://github.com/software-mansion/react-native-screens/pull/1687) - feat(iOS): back button subview for Fabric by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1581](https://github.com/software-mansion/react-native-screens/pull/1581) - fix(iOS): image loading for back button on Fabric by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1688](https://github.com/software-mansion/react-native-screens/pull/1688) - chore: refactor medium detent iOS implementation by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1699](https://github.com/software-mansion/react-native-screens/pull/1699) - feat(Android): add native default animations on Android 13 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1693](https://github.com/software-mansion/react-native-screens/pull/1693) - chore: fix e2e detox tests & `Example` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1681](https://github.com/software-mansion/react-native-screens/pull/1681) - fix(iOS): status bar does not respect app theme by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1708](https://github.com/software-mansion/react-native-screens/pull/1708) - chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/1709](https://github.com/software-mansion/react-native-screens/pull/1709) - chore: change fabric flag by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1705](https://github.com/software-mansion/react-native-screens/pull/1705) - chore(CI): extend timeout for Android e2e by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1711](https://github.com/software-mansion/react-native-screens/pull/1711) - chore: update deps in examples by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1714](https://github.com/software-mansion/react-native-screens/pull/1714) - chore: update library & examples dependencies by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1721](https://github.com/software-mansion/react-native-screens/pull/1721) - fix: Android build for `compileSdk < 33` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1723](https://github.com/software-mansion/react-native-screens/pull/1723) - feat: add imperative API for search bar by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1610](https://github.com/software-mansion/react-native-screens/pull/1610) - chore(deps): bump shell-quote from 1.6.1 to 1.8.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/1725](https://github.com/software-mansion/react-native-screens/pull/1725) - chore: improve Android anim resource management by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1727](https://github.com/software-mansion/react-native-screens/pull/1727) - chore: fix typo in build script by [@​Jace-Samsung](https://github.com/Jace-Samsung) in [https://github.com/software-mansion/react-native-screens/pull/1733](https://github.com/software-mansion/react-native-screens/pull/1733) - chore: set library namespace in build script by [@​Sprimage](https://github.com/Sprimage) in [https://github.com/software-mansion/react-native-screens/pull/1717](https://github.com/software-mansion/react-native-screens/pull/1717) - fix(iOS): back button not respecting style options by [@​tyler-coleman](https://github.com/tyler-coleman) in [https://github.com/software-mansion/react-native-screens/pull/1726](https://github.com/software-mansion/react-native-screens/pull/1726) - chore: override `onCreate` in example apps by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1736](https://github.com/software-mansion/react-native-screens/pull/1736) - feat: add `setText` command on SearchBar by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1739](https://github.com/software-mansion/react-native-screens/pull/1739) - chore(deps): bump activesupport from 6.1.4.6 to 7.0.4.3 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1744](https://github.com/software-mansion/react-native-screens/pull/1744) - fix: do not apply namespace if it is not available in agp by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1749](https://github.com/software-mansion/react-native-screens/pull/1749) - chore(deps): bump vm2 from 3.9.14 to 3.9.15 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/1752](https://github.com/software-mansion/react-native-screens/pull/1752) - fix: use new rotation API for iOS 16 by [@​kirillzyusko](https://github.com/kirillzyusko) in [https://github.com/software-mansion/react-native-screens/pull/1732](https://github.com/software-mansion/react-native-screens/pull/1732) - chore: improve Android 13 animations by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1756](https://github.com/software-mansion/react-native-screens/pull/1756) - chore(deps): bump vm2 from 3.9.15 to 3.9.16 by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-screens/pull/1755](https://github.com/software-mansion/react-native-screens/pull/1755) - fix: ScreenStackHeaderConfig type by [@​tomekzaw](https://github.com/tomekzaw) in [https://github.com/software-mansion/react-native-screens/pull/1760](https://github.com/software-mansion/react-native-screens/pull/1760) - feat: remove v4 from repo by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1790](https://github.com/software-mansion/react-native-screens/pull/1790) - fix:Compatible with version 0.72 by [@​NiuGuohui](https://github.com/NiuGuohui) in [https://github.com/software-mansion/react-native-screens/pull/1765](https://github.com/software-mansion/react-native-screens/pull/1765) - fix: proper handling of header events on Fabric and bumping examples to 0.72 by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1783](https://github.com/software-mansion/react-native-screens/pull/1783) - feat: prevent native back button dismissal on iOS by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1773](https://github.com/software-mansion/react-native-screens/pull/1773) #### New Contributors - [@​Jace-Samsung](https://github.com/Jace-Samsung) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1733](https://github.com/software-mansion/react-native-screens/pull/1733) - [@​Sprimage](https://github.com/Sprimage) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1717](https://github.com/software-mansion/react-native-screens/pull/1717) - [@​tyler-coleman](https://github.com/tyler-coleman) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1726](https://github.com/software-mansion/react-native-screens/pull/1726) - [@​NiuGuohui](https://github.com/NiuGuohui) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1765](https://github.com/software-mansion/react-native-screens/pull/1765) **Full Changelog**: software-mansion/react-native-screens@3.20.0...3.21.0 ### [`v3.20.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.20.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.19.0...3.20.0) Minior release aimed at fixing [#​1686](https://github.com/software-mansion/react-native-screens/issues/1686) (change of default behaviour for `stackPresentation: 'formSheet'`). No other changes were introduced with this release. Next "feature" release is in preparation. **Full Changelog**: software-mansion/react-native-screens@3.19.0...3.20.0 ### [`v3.19.0`](https://github.com/software-mansion/react-native-screens/releases/tag/3.19.0) [Compare Source](https://github.com/software-mansion/react-native-screens/compare/3.18.2...3.19.0) Minor release with support for React Native 0.71 **Important**: Since this version, Fabric is only supported for React Native 0.71+. Support for older versions has beed dropped. #### 🐛 Bug fixes - Try to apply pointer events behaviors in overlay by [@​WoLewicki](https://github.com/WoLewicki) in [https://github.com/software-mansion/react-native-screens/pull/1582](https://github.com/software-mansion/react-native-screens/pull/1582) - Make enabling device orientation notifications internal by [@​kacperkapusciak](https://github.com/kacperkapusciak) & [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1596](https://github.com/software-mansion/react-native-screens/pull/1596) - Fix back button menu for headerBackTitleVisible prop by [@​kacperkapusciak](https://github.com/kacperkapusciak) in [https://github.com/software-mansion/react-native-screens/pull/1646](https://github.com/software-mansion/react-native-screens/pull/1646) - Override requiresMainQueueSetup in RNSScreenManager by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1670](https://github.com/software-mansion/react-native-screens/pull/1670) #### 👍 Improvements - Support for React Native 0.71.0 by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1631](https://github.com/software-mansion/react-native-screens/pull/1631) - Clarify installation instructions for Android by [@​evan1715](https://github.com/evan1715) in [https://github.com/software-mansion/react-native-screens/pull/1633](https://github.com/software-mansion/react-native-screens/pull/1633) #### 🔢 Miscellaneous - Fix FabricTestExample fails to start due to new `react-native.config.js` by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1624](https://github.com/software-mansion/react-native-screens/pull/1624) - Examples stopped to work after RN issue by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1632](https://github.com/software-mansion/react-native-screens/pull/1632) - Exclude android/.settings file form repo by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1642](https://github.com/software-mansion/react-native-screens/pull/1642) - Bump deps & fix tvOS build by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1667](https://github.com/software-mansion/react-native-screens/pull/1667) - Unify CI between platforms by [@​kkafar](https://github.com/kkafar) in [https://github.com/software-mansion/react-native-screens/pull/1676](https://github.com/software-mansion/react-native-screens/pull/1676) #### New Contributors - [@​evan1715](https://github.com/evan1715) made their first contribution in [https://github.com/software-mansion/react-native-screens/pull/1633](https://github.com/software-mansion/react-native-screens/pull/1633) **Full Changelog**: software-mansion/react-native-screens@3.18.2...3.19.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone America/Los_Angeles. 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/valora-inc/wallet). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOS4yIiwidXBkYXRlZEluVmVyIjoiMzcuMTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <valorabot@valoraapp.com>
## Description Because of a bug introduced in software-mansion/react-native-screens#1646 `react-native-screens` v3.21 changed how header's backTitle handles whitespace strings in software-mansion/react-native-screens#1726 To allow for backwards compatibility in @react-navigation/native-stack we need have a way to check if this version or newer is used See react-navigation/react-navigation#11423 for more context. ## Changes Added new `isNewBackTitleImplementation` internal constant that can be used in `@react-navigation/native-stack`. ## Screenshots / GIFs #### This change & react-navigation/react-navigation#11423 applied: https://github.com/software-mansion/react-native-screens/assets/39658211/e2409b46-0725-473d-962b-1acc9deaa469 #### Without this change and react-navigation/react-navigation#11423: https://github.com/software-mansion/react-native-screens/assets/39658211/ec65fd5d-f8e9-4d88-b442-6bfc68e9ee9c ## Test code and steps to reproduce Test1791.tsx You need to apply changes introduced in react-navigation/react-navigation#11423 to `@react-navigation/native-stack` to test these canges. ## Checklist - [x] Included code example that can be used to test this change
…r (#1866) ## Description Ah, here we go again... When header is hidden (`headerShown: false` in v6, `hidden: true` in v5) the method that updates header configuration returns early just after setting some layout related and LTR/RTL options, thus `title` property of current `UINavigationItem` is left unset leading to system default name `Back` being displayed in "back context menu". Fixes #1864 ## Changes When returning early (because header is hidden) we now set the `UINavigationItem` property to proper value. ## Test code and steps to reproduce `Test1864` in `FabricTestExample` & `TestsExample`. I've also tested it in context of * software-mansion/react-native-screens#1646 and mix of both. Seems to work fine. ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
## Description ~This PR improves upon #2105. #2105 allowed to use iOS 14 default back button behavior when label is not provided. This PR allows to modify the behavior by allowing to provide UINavigationButtonBackButtonDisplayMode and enables it for custom text (without style modifications). The main problem is that we used to provide backButtonItem in most of the cases which [disables](https://developer.apple.com/documentation/uikit/uinavigationitem/3656350-backbuttondisplaymode) backButtonDisplayMode.~ This PR adds possibility to customize default behavior of back button using `backButtonDisplayMode` ([UINavigationBackButtonDisplayMode](https://developer.apple.com/documentation/uikit/uinavigationitem/backbuttondisplaymode)) for iOS. :warning: **This modifies only default back button**, when any customization is added (including headerBackTitle) in native part we create custom `RNSUIBarButtonItem` and set it as `backButtonItem`, which [disables](https://developer.apple.com/documentation/uikit/uinavigationitem/3656350-backbuttondisplaymode) `backButtonDisplayMode` behavior. I tried to make it work together with custom label (`headerBackTitle`) using `prevItem.backButtonTitle`, but due to iOS limitations it is not viable option. It influences also back button menu - changes the label of previous screen - which is not the behavior we want. To sum up, `backButtonDisplayMode` work when none of: - `headerBackTitleStyle.fontFamily` - `headerBackTitleStyle.fontSize` - `headerBackTitle` - `disableBackButtonMenu` are set. ## Screenshots / GIFs |Paper|Fabric| |-|-| |<video src="https://github.com/software-mansion/react-native-screens/assets/11800297/c6aa7697-4331-4cb4-a81d-7f77f128513d" />|<video src="https://github.com/software-mansion/react-native-screens/assets/11800297/fa0edd92-1aa2-45e5-a466-516c0ec120d2" />| <details> <summary>Example component used in tests:</summary> ```jsx import * as React from 'react'; import { Button, View, Text, StyleSheet } from 'react-native'; import { NavigationContainer, ParamListBase } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; const Stack = createNativeStackNavigator(); type NavProp = { navigation: NativeStackNavigationProp<ParamListBase>; }; export default function App() { return ( <NavigationContainer> <Stack.Navigator> <Stack.Screen name="screenA" component={ScreenA} options={{ headerTitle: 'A: Home' }} /> <Stack.Screen name="screenB" component={ScreenB} options={{ headerTitle: 'B: default', backButtonDisplayMode: 'default', }} /> <Stack.Screen name="screenC" component={ScreenC} options={{ headerTitle: 'C: generic', backButtonDisplayMode: 'generic', }} /> <Stack.Screen name="screenD" component={ScreenD} options={{ headerTitle: 'D: minimal', backButtonDisplayMode: 'minimal', }} /> <Stack.Screen name="screenE" component={ScreenE} options={{ headerTitle: 'E: custom', headerBackTitle: 'Back Title', backButtonDisplayMode: 'minimal', }} /> </Stack.Navigator> </NavigationContainer> ); } const ScreenA = ({ navigation }: NavProp) => ( <View style={styles.container}> <Text>Screen A</Text> <Button onPress={() => navigation.navigate('screenB')} title="Go to screen B" /> </View> ); const ScreenB = ({ navigation }: NavProp) => ( <View style={styles.container}> <Text>Screen B</Text> <Text>backButtonDisplayMode: default</Text> <Button onPress={() => navigation.navigate('screenC')} title="Go to screen C" /> </View> ); const ScreenC = ({ navigation }: NavProp) => ( <View style={{ flex: 1, paddingTop: 50 }}> <Text>Screen C</Text> <Text>backButtonDisplayMode: generic</Text> <Button onPress={() => navigation.navigate('screenD')} title="Go to screen D" /> </View> ); const ScreenD = ({ navigation }: NavProp) => ( <View style={styles.container}> <Text>Screen D</Text> <Text>backButtonDisplayMode: minimal</Text> <Button onPress={() => navigation.navigate('screenE')} title="Go to screen E" /> </View> ); const ScreenE = (_props: NavProp) => ( <View style={styles.container}> <Text>Screen E</Text> <Text>backButtonDisplayMode omitted because of the headerBackTitle</Text> </View> ); const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', justifyContent: 'space-around' }, }); ``` </details> ## Checklist - [x] Included code example that can be used to test this change - [x] Updated TS types - [x] Updated documentation: <!-- For adding new props to native-stack --> - [x] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [x] Ensured that CI passes Tested #1864: Paper ✅ Fabric ✅ Tested #1646: Paper ❌ Fabric ❌ - but it does not work on main too, could now be achieved using `backButtonDisplayMode: ‘minimal’` --------- Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
software-mansion#1866) ## Description Ah, here we go again... When header is hidden (`headerShown: false` in v6, `hidden: true` in v5) the method that updates header configuration returns early just after setting some layout related and LTR/RTL options, thus `title` property of current `UINavigationItem` is left unset leading to system default name `Back` being displayed in "back context menu". Fixes software-mansion#1864 ## Changes When returning early (because header is hidden) we now set the `UINavigationItem` property to proper value. ## Test code and steps to reproduce `Test1864` in `FabricTestExample` & `TestsExample`. I've also tested it in context of * software-mansion#1646 and mix of both. Seems to work fine. ## Checklist - [x] Included code example that can be used to test this change - [x] Ensured that CI passes
…e-mansion#2123) ## Description ~This PR improves upon software-mansion#2105. software-mansion#2105 allowed to use iOS 14 default back button behavior when label is not provided. This PR allows to modify the behavior by allowing to provide UINavigationButtonBackButtonDisplayMode and enables it for custom text (without style modifications). The main problem is that we used to provide backButtonItem in most of the cases which [disables](https://developer.apple.com/documentation/uikit/uinavigationitem/3656350-backbuttondisplaymode) backButtonDisplayMode.~ This PR adds possibility to customize default behavior of back button using `backButtonDisplayMode` ([UINavigationBackButtonDisplayMode](https://developer.apple.com/documentation/uikit/uinavigationitem/backbuttondisplaymode)) for iOS. :warning: **This modifies only default back button**, when any customization is added (including headerBackTitle) in native part we create custom `RNSUIBarButtonItem` and set it as `backButtonItem`, which [disables](https://developer.apple.com/documentation/uikit/uinavigationitem/3656350-backbuttondisplaymode) `backButtonDisplayMode` behavior. I tried to make it work together with custom label (`headerBackTitle`) using `prevItem.backButtonTitle`, but due to iOS limitations it is not viable option. It influences also back button menu - changes the label of previous screen - which is not the behavior we want. To sum up, `backButtonDisplayMode` work when none of: - `headerBackTitleStyle.fontFamily` - `headerBackTitleStyle.fontSize` - `headerBackTitle` - `disableBackButtonMenu` are set. ## Screenshots / GIFs |Paper|Fabric| |-|-| |<video src="https://github.com/software-mansion/react-native-screens/assets/11800297/c6aa7697-4331-4cb4-a81d-7f77f128513d" />|<video src="https://github.com/software-mansion/react-native-screens/assets/11800297/fa0edd92-1aa2-45e5-a466-516c0ec120d2" />| <details> <summary>Example component used in tests:</summary> ```jsx import * as React from 'react'; import { Button, View, Text, StyleSheet } from 'react-native'; import { NavigationContainer, ParamListBase } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import { NativeStackNavigationProp } from '@react-navigation/native-stack'; const Stack = createNativeStackNavigator(); type NavProp = { navigation: NativeStackNavigationProp<ParamListBase>; }; export default function App() { return ( <NavigationContainer> <Stack.Navigator> <Stack.Screen name="screenA" component={ScreenA} options={{ headerTitle: 'A: Home' }} /> <Stack.Screen name="screenB" component={ScreenB} options={{ headerTitle: 'B: default', backButtonDisplayMode: 'default', }} /> <Stack.Screen name="screenC" component={ScreenC} options={{ headerTitle: 'C: generic', backButtonDisplayMode: 'generic', }} /> <Stack.Screen name="screenD" component={ScreenD} options={{ headerTitle: 'D: minimal', backButtonDisplayMode: 'minimal', }} /> <Stack.Screen name="screenE" component={ScreenE} options={{ headerTitle: 'E: custom', headerBackTitle: 'Back Title', backButtonDisplayMode: 'minimal', }} /> </Stack.Navigator> </NavigationContainer> ); } const ScreenA = ({ navigation }: NavProp) => ( <View style={styles.container}> <Text>Screen A</Text> <Button onPress={() => navigation.navigate('screenB')} title="Go to screen B" /> </View> ); const ScreenB = ({ navigation }: NavProp) => ( <View style={styles.container}> <Text>Screen B</Text> <Text>backButtonDisplayMode: default</Text> <Button onPress={() => navigation.navigate('screenC')} title="Go to screen C" /> </View> ); const ScreenC = ({ navigation }: NavProp) => ( <View style={{ flex: 1, paddingTop: 50 }}> <Text>Screen C</Text> <Text>backButtonDisplayMode: generic</Text> <Button onPress={() => navigation.navigate('screenD')} title="Go to screen D" /> </View> ); const ScreenD = ({ navigation }: NavProp) => ( <View style={styles.container}> <Text>Screen D</Text> <Text>backButtonDisplayMode: minimal</Text> <Button onPress={() => navigation.navigate('screenE')} title="Go to screen E" /> </View> ); const ScreenE = (_props: NavProp) => ( <View style={styles.container}> <Text>Screen E</Text> <Text>backButtonDisplayMode omitted because of the headerBackTitle</Text> </View> ); const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', justifyContent: 'space-around' }, }); ``` </details> ## Checklist - [x] Included code example that can be used to test this change - [x] Updated TS types - [x] Updated documentation: <!-- For adding new props to native-stack --> - [x] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [x] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [x] Ensured that CI passes Tested software-mansion#1864: Paper ✅ Fabric ✅ Tested software-mansion#1646: Paper ❌ Fabric ❌ - but it does not work on main too, could now be achieved using `backButtonDisplayMode: ‘minimal’` --------- Co-authored-by: Kacper Kafara <kacper.kafara@swmansion.com>
Description
In the native-stack, there's a
headerBackTitleVisible
prop which allows hiding the back button title while keeping the default<
arrow. It achieves it by passing an empty string to thebackTitle
header prop.Although it was a proper way of hiding the back button title prior to iOS 14 it has the negative effect of hiding all elements in the back button menu in >=iOS 14.
This can be fixed by a relatively new
backButtonDisplayMode
API by setting its value tominimal
.Fixes react-navigation/react-navigation/issues/11015
Screenshots / GIFs
Before
Screen.Recording.2022-11-22.at.17.01.55.mov
After
Screen.Recording.2022-11-22.at.16.43.58.mov
No effect on iOS 13 (still uses an empty string as there's no back button menu available)
Screen.Recording.2022-11-23.at.11.08.18.mov
Test code and steps to reproduce
TestsExample/Test1646.tsx
Code example
Checklist