Skip to content
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 headerBackTitleVisible in native-stack #11423

Conversation

kacperkapusciak
Copy link
Member

@kacperkapusciak kacperkapusciak commented Jun 15, 2023

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

Code example
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;

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 ✅

Screen.Recording.2023-06-21.at.08.02.25.mov

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 ❌

Screen.Recording.2023-06-21.at.08.14.43.mov

react-native-screens v3.20.0:

Here the back button is all over the place ❌

Screen.Recording.2023-06-21.at.08.05.20.mov

react-native-screens v3.18.2:

Backward compatibility is kept in place (but back button menu doesn't work as expected in v3.18) ✅

Screen.Recording.2023-06-21.at.08.09.28.mov

@kacperkapusciak kacperkapusciak changed the title fix: fix headerBackTitle & headerBackTitleVisible prop in native-stack fix: fix headerBackTitleVisible in native-stack Jun 15, 2023
kkafar pushed a commit to software-mansion/react-native-screens that referenced this pull request Jun 19, 2023
## 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
Base automatically changed from @kacperkapusciak/upgrade-dependencies-on-6.x to 6.x June 21, 2023 13:03
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.01 ⚠️

Comparison is base (42f32d4) 74.04% compared to head (18648d5) 74.04%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##              6.x   #11423      +/-   ##
==========================================
- Coverage   74.04%   74.04%   -0.01%     
==========================================
  Files         177      177              
  Lines        5626     5628       +2     
  Branches     2212     2214       +2     
==========================================
+ Hits         4166     4167       +1     
- Misses       1411     1412       +1     
  Partials       49       49              
Impacted Files Coverage Δ
packages/native-stack/src/views/HeaderConfig.tsx 61.79% <66.66%> (-0.28%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kacperkapusciak kacperkapusciak merged commit 596c633 into 6.x Jun 22, 2023
8 checks passed
@kacperkapusciak kacperkapusciak deleted the @kacperkapusciak/fix-header-back-title-visible-in-native-stack branch June 22, 2023 05:52
@febis001 febis001 mentioned this pull request Jun 23, 2023
11 tasks
creature-water-valley added a commit to ws-4020/mobile-app-crib-notes that referenced this pull request Sep 25, 2023
renovate bot added a commit to valora-inc/wallet that referenced this pull request Oct 17, 2023
[![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://togithub.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://togithub.com/software-mansion/react-native-screens/releases/tag/3.25.0)

[Compare
Source](https://togithub.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
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1855
- Android: Shorten alpha animation to 83ms on default enter-out by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1835
- iOS: Wrong title in back button menu for screens w/ hidden header by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1866
- iOS: Full window overlay cannot receive tap when modal is full screen
by
[@&#8203;intergalacticspacehighway](https://togithub.com/intergalacticspacehighway)
in
[software-mansion/react-native-screens#1872

#### 🔢 Miscellaneous

- Reinstall deps & pods in example apps after release by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1862
- Fix typo in docs on `sheetCornerRadius` by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1863
- Use `PlatformColor` instead of plain `string` for color related props
by [@&#8203;retyui](https://togithub.com/retyui) in
[software-mansion/react-native-screens#1846
- Android: Migrate `replaceSystemWindowInsets` to
`Builder.setSystemWindowInsets` by
[@&#8203;kirillzyusko](https://togithub.com/kirillzyusko) in
[software-mansion/react-native-screens#1868

#### New Contributors

-
[@&#8203;intergalacticspacehighway](https://togithub.com/intergalacticspacehighway)
made their first contribution in
[software-mansion/react-native-screens#1872
- [@&#8203;retyui](https://togithub.com/retyui) made their first
contribution in
[software-mansion/react-native-screens#1846

**Full Changelog**:
software-mansion/react-native-screens@3.24.0...3.25.0

###
[`v3.24.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.24.0)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.23.0...3.24.0)

Minor release focused on fixing build issues reported in
[#&#8203;1859](https://togithub.com/software-mansion/react-native-screens/issues/1859).

#### What's Changed

#### 🐛 Bug fixes

- Bad parameter type in `toggleCancelButton` search bar command by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1854
- Add missing iOS API availbility checks by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1860

#### 🔢 Miscellaneous

- Update RN + other deps in example apps by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1847
- Annotate `sheetExpandsWhenScrollingToEdge` prop as iOS specific by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1851
- Improve readability of C++ namespaced types by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1856

**Full Changelog**:
software-mansion/react-native-screens@3.23.0...3.24.0

###
[`v3.23.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.23.0)

[Compare
Source](https://togithub.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
[@&#8203;dylancom](https://togithub.com/dylancom) in
[software-mansion/react-native-screens#1784
- Buggy search bar / large title behaviour on Fabric by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1825
- Make RNSFullWindowOverlay a modal for accessibility by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1842
- Calculate large headers in `useHeaderHeight` hook by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1844

#### 👍 Improvements

- Add onGestureCancel event by
[@&#8203;piaskowyk](https://togithub.com/piaskowyk) in
[software-mansion/react-native-screens#1810
- Add support for search bar placement by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1843

#### 🔢 Miscellaneous

- Update `tough-cookie` and `semver` dependencies by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1823
- Bump versions of RNScreens, FBReactNativeSpec and RCTAppDelegate deps
by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1827
- Update `word-wrap` by [@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1834
- Format code in test examples by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1812
- Unify class & method naming with respect to conventions by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1841

#### New Contributors

- [@&#8203;piaskowyk](https://togithub.com/piaskowyk) made their first
contribution in
[software-mansion/react-native-screens#1810
- [@&#8203;tboba](https://togithub.com/tboba) made their first
contribution in
[software-mansion/react-native-screens#1823

**Full Changelog**:
software-mansion/react-native-screens@3.22.1...3.23.0

###
[`v3.22.1`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.22.1)

[Compare
Source](https://togithub.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 [@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1811

##### Internal

- chore: fix CI by [@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1803
- chore(deps): update selected deps in examples by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1807
- chore: fix typo in docs by
[@&#8203;aleqsio](https://togithub.com/aleqsio) in
[software-mansion/react-native-screens#1808

#### New Contributors

- [@&#8203;aleqsio](https://togithub.com/aleqsio) made their first
contribution in
[software-mansion/react-native-screens#1808

**Full Changelog**:
software-mansion/react-native-screens@3.22.0...3.22.1

###
[`v3.22.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.22.0)

[Compare
Source](https://togithub.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
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1795
- fix: ifdef orientation code that requries iOS 16 by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1794
- chore: update & reinstall selected deps by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1798

**Full Changelog**:
software-mansion/react-native-screens@3.21.1...3.22.0

###
[`v3.21.1`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.21.1)

[Compare
Source](https://togithub.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
[#&#8203;1791](https://togithub.com/software-mansion/react-native-screens/issues/1791)
&
[react-navigation/react-navigation#11423
for details.

###
[`v3.21.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.21.0)

[Compare
Source](https://togithub.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
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1600
- chore: update README on Fabric support by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1687
- feat(iOS): back button subview for Fabric by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1581
- fix(iOS): image loading for back button on Fabric by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1688
- chore: refactor medium detent iOS implementation by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1699
- feat(Android): add native default animations on Android 13 by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1693
- chore: fix e2e detox tests & `Example` by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1681
- fix(iOS): status bar does not respect app theme by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1708
- chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#1709
- chore: change fabric flag by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1705
- chore(CI): extend timeout for Android e2e by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1711
- chore: update deps in examples by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1714
- chore: update library & examples dependencies by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1721
- fix: Android build for `compileSdk < 33` by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1723
- feat: add imperative API for search bar by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1610
- chore(deps): bump shell-quote from 1.6.1 to 1.8.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#1725
- chore: improve Android anim resource management by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1727
- chore: fix typo in build script by
[@&#8203;Jace-Samsung](https://togithub.com/Jace-Samsung) in
[software-mansion/react-native-screens#1733
- chore: set library namespace in build script by
[@&#8203;Sprimage](https://togithub.com/Sprimage) in
[software-mansion/react-native-screens#1717
- fix(iOS): back button not respecting style options by
[@&#8203;tyler-coleman](https://togithub.com/tyler-coleman) in
[software-mansion/react-native-screens#1726
- chore: override `onCreate` in example apps by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1736
- feat: add `setText` command on SearchBar by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1739
- chore(deps): bump activesupport from 6.1.4.6 to 7.0.4.3 by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1744
- fix: do not apply namespace if it is not available in agp by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1749
- chore(deps): bump vm2 from 3.9.14 to 3.9.15 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#1752
- fix: use new rotation API for iOS 16 by
[@&#8203;kirillzyusko](https://togithub.com/kirillzyusko) in
[software-mansion/react-native-screens#1732
- chore: improve Android 13 animations by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1756
- chore(deps): bump vm2 from 3.9.15 to 3.9.16 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#1755
- fix: ScreenStackHeaderConfig type by
[@&#8203;tomekzaw](https://togithub.com/tomekzaw) in
[software-mansion/react-native-screens#1760
- feat: remove v4 from repo by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1790
- fix:Compatible with version 0.72 by
[@&#8203;NiuGuohui](https://togithub.com/NiuGuohui) in
[software-mansion/react-native-screens#1765
- fix: proper handling of header events on Fabric and bumping examples
to 0.72 by [@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1783
- feat: prevent native back button dismissal on iOS by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1773

#### New Contributors

- [@&#8203;Jace-Samsung](https://togithub.com/Jace-Samsung) made their
first contribution in
[software-mansion/react-native-screens#1733
- [@&#8203;Sprimage](https://togithub.com/Sprimage) made their first
contribution in
[software-mansion/react-native-screens#1717
- [@&#8203;tyler-coleman](https://togithub.com/tyler-coleman) made their
first contribution in
[software-mansion/react-native-screens#1726
- [@&#8203;NiuGuohui](https://togithub.com/NiuGuohui) made their first
contribution in
[software-mansion/react-native-screens#1765

**Full Changelog**:
software-mansion/react-native-screens@3.20.0...3.21.0

###
[`v3.20.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.20.0)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.19.0...3.20.0)

Minior release aimed at fixing
[#&#8203;1686](https://togithub.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://togithub.com/software-mansion/react-native-screens/releases/tag/3.19.0)

[Compare
Source](https://togithub.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
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1582
- Make enabling device orientation notifications internal by
[@&#8203;kacperkapusciak](https://togithub.com/kacperkapusciak) &
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1596
- Fix back button menu for headerBackTitleVisible prop by
[@&#8203;kacperkapusciak](https://togithub.com/kacperkapusciak) in
[software-mansion/react-native-screens#1646
- Override requiresMainQueueSetup in RNSScreenManager by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1670

#### 👍 Improvements

- Support for React Native 0.71.0 by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1631
- Clarify installation instructions for Android by
[@&#8203;evan1715](https://togithub.com/evan1715) in
[software-mansion/react-native-screens#1633

#### 🔢 Miscellaneous

- Fix FabricTestExample fails to start due to new
`react-native.config.js` by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1624
- Examples stopped to work after RN issue by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1632
- Exclude android/.settings file form repo by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1642
- Bump deps & fix tvOS build by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1667
- Unify CI between platforms by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1676

#### New Contributors

- [@&#8203;evan1715](https://togithub.com/evan1715) made their first
contribution in
[software-mansion/react-native-screens#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>
bakoushin pushed a commit to valora-inc/wallet that referenced this pull request Oct 17, 2023
[![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://togithub.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://togithub.com/software-mansion/react-native-screens/releases/tag/3.25.0)

[Compare
Source](https://togithub.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
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1855
- Android: Shorten alpha animation to 83ms on default enter-out by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1835
- iOS: Wrong title in back button menu for screens w/ hidden header by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1866
- iOS: Full window overlay cannot receive tap when modal is full screen
by
[@&#8203;intergalacticspacehighway](https://togithub.com/intergalacticspacehighway)
in
[software-mansion/react-native-screens#1872

#### 🔢 Miscellaneous

- Reinstall deps & pods in example apps after release by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1862
- Fix typo in docs on `sheetCornerRadius` by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1863
- Use `PlatformColor` instead of plain `string` for color related props
by [@&#8203;retyui](https://togithub.com/retyui) in
[software-mansion/react-native-screens#1846
- Android: Migrate `replaceSystemWindowInsets` to
`Builder.setSystemWindowInsets` by
[@&#8203;kirillzyusko](https://togithub.com/kirillzyusko) in
[software-mansion/react-native-screens#1868

#### New Contributors

-
[@&#8203;intergalacticspacehighway](https://togithub.com/intergalacticspacehighway)
made their first contribution in
[software-mansion/react-native-screens#1872
- [@&#8203;retyui](https://togithub.com/retyui) made their first
contribution in
[software-mansion/react-native-screens#1846

**Full Changelog**:
software-mansion/react-native-screens@3.24.0...3.25.0

###
[`v3.24.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.24.0)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.23.0...3.24.0)

Minor release focused on fixing build issues reported in
[#&#8203;1859](https://togithub.com/software-mansion/react-native-screens/issues/1859).

#### What's Changed

#### 🐛 Bug fixes

- Bad parameter type in `toggleCancelButton` search bar command by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1854
- Add missing iOS API availbility checks by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1860

#### 🔢 Miscellaneous

- Update RN + other deps in example apps by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1847
- Annotate `sheetExpandsWhenScrollingToEdge` prop as iOS specific by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1851
- Improve readability of C++ namespaced types by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1856

**Full Changelog**:
software-mansion/react-native-screens@3.23.0...3.24.0

###
[`v3.23.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.23.0)

[Compare
Source](https://togithub.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
[@&#8203;dylancom](https://togithub.com/dylancom) in
[software-mansion/react-native-screens#1784
- Buggy search bar / large title behaviour on Fabric by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1825
- Make RNSFullWindowOverlay a modal for accessibility by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1842
- Calculate large headers in `useHeaderHeight` hook by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1844

#### 👍 Improvements

- Add onGestureCancel event by
[@&#8203;piaskowyk](https://togithub.com/piaskowyk) in
[software-mansion/react-native-screens#1810
- Add support for search bar placement by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1843

#### 🔢 Miscellaneous

- Update `tough-cookie` and `semver` dependencies by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1823
- Bump versions of RNScreens, FBReactNativeSpec and RCTAppDelegate deps
by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1827
- Update `word-wrap` by [@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1834
- Format code in test examples by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1812
- Unify class & method naming with respect to conventions by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1841

#### New Contributors

- [@&#8203;piaskowyk](https://togithub.com/piaskowyk) made their first
contribution in
[software-mansion/react-native-screens#1810
- [@&#8203;tboba](https://togithub.com/tboba) made their first
contribution in
[software-mansion/react-native-screens#1823

**Full Changelog**:
software-mansion/react-native-screens@3.22.1...3.23.0

###
[`v3.22.1`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.22.1)

[Compare
Source](https://togithub.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 [@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1811

##### Internal

- chore: fix CI by [@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1803
- chore(deps): update selected deps in examples by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1807
- chore: fix typo in docs by
[@&#8203;aleqsio](https://togithub.com/aleqsio) in
[software-mansion/react-native-screens#1808

#### New Contributors

- [@&#8203;aleqsio](https://togithub.com/aleqsio) made their first
contribution in
[software-mansion/react-native-screens#1808

**Full Changelog**:
software-mansion/react-native-screens@3.22.0...3.22.1

###
[`v3.22.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.22.0)

[Compare
Source](https://togithub.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
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1795
- fix: ifdef orientation code that requries iOS 16 by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1794
- chore: update & reinstall selected deps by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1798

**Full Changelog**:
software-mansion/react-native-screens@3.21.1...3.22.0

###
[`v3.21.1`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.21.1)

[Compare
Source](https://togithub.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
[#&#8203;1791](https://togithub.com/software-mansion/react-native-screens/issues/1791)
&
[react-navigation/react-navigation#11423
for details.

###
[`v3.21.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.21.0)

[Compare
Source](https://togithub.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
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1600
- chore: update README on Fabric support by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1687
- feat(iOS): back button subview for Fabric by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1581
- fix(iOS): image loading for back button on Fabric by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1688
- chore: refactor medium detent iOS implementation by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1699
- feat(Android): add native default animations on Android 13 by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1693
- chore: fix e2e detox tests & `Example` by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1681
- fix(iOS): status bar does not respect app theme by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1708
- chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#1709
- chore: change fabric flag by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1705
- chore(CI): extend timeout for Android e2e by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1711
- chore: update deps in examples by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1714
- chore: update library & examples dependencies by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1721
- fix: Android build for `compileSdk < 33` by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1723
- feat: add imperative API for search bar by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1610
- chore(deps): bump shell-quote from 1.6.1 to 1.8.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#1725
- chore: improve Android anim resource management by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1727
- chore: fix typo in build script by
[@&#8203;Jace-Samsung](https://togithub.com/Jace-Samsung) in
[software-mansion/react-native-screens#1733
- chore: set library namespace in build script by
[@&#8203;Sprimage](https://togithub.com/Sprimage) in
[software-mansion/react-native-screens#1717
- fix(iOS): back button not respecting style options by
[@&#8203;tyler-coleman](https://togithub.com/tyler-coleman) in
[software-mansion/react-native-screens#1726
- chore: override `onCreate` in example apps by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1736
- feat: add `setText` command on SearchBar by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1739
- chore(deps): bump activesupport from 6.1.4.6 to 7.0.4.3 by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1744
- fix: do not apply namespace if it is not available in agp by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1749
- chore(deps): bump vm2 from 3.9.14 to 3.9.15 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#1752
- fix: use new rotation API for iOS 16 by
[@&#8203;kirillzyusko](https://togithub.com/kirillzyusko) in
[software-mansion/react-native-screens#1732
- chore: improve Android 13 animations by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1756
- chore(deps): bump vm2 from 3.9.15 to 3.9.16 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#1755
- fix: ScreenStackHeaderConfig type by
[@&#8203;tomekzaw](https://togithub.com/tomekzaw) in
[software-mansion/react-native-screens#1760
- feat: remove v4 from repo by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1790
- fix:Compatible with version 0.72 by
[@&#8203;NiuGuohui](https://togithub.com/NiuGuohui) in
[software-mansion/react-native-screens#1765
- fix: proper handling of header events on Fabric and bumping examples
to 0.72 by [@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1783
- feat: prevent native back button dismissal on iOS by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1773

#### New Contributors

- [@&#8203;Jace-Samsung](https://togithub.com/Jace-Samsung) made their
first contribution in
[software-mansion/react-native-screens#1733
- [@&#8203;Sprimage](https://togithub.com/Sprimage) made their first
contribution in
[software-mansion/react-native-screens#1717
- [@&#8203;tyler-coleman](https://togithub.com/tyler-coleman) made their
first contribution in
[software-mansion/react-native-screens#1726
- [@&#8203;NiuGuohui](https://togithub.com/NiuGuohui) made their first
contribution in
[software-mansion/react-native-screens#1765

**Full Changelog**:
software-mansion/react-native-screens@3.20.0...3.21.0

###
[`v3.20.0`](https://togithub.com/software-mansion/react-native-screens/releases/tag/3.20.0)

[Compare
Source](https://togithub.com/software-mansion/react-native-screens/compare/3.19.0...3.20.0)

Minior release aimed at fixing
[#&#8203;1686](https://togithub.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://togithub.com/software-mansion/react-native-screens/releases/tag/3.19.0)

[Compare
Source](https://togithub.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
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1582
- Make enabling device orientation notifications internal by
[@&#8203;kacperkapusciak](https://togithub.com/kacperkapusciak) &
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1596
- Fix back button menu for headerBackTitleVisible prop by
[@&#8203;kacperkapusciak](https://togithub.com/kacperkapusciak) in
[software-mansion/react-native-screens#1646
- Override requiresMainQueueSetup in RNSScreenManager by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1670

#### 👍 Improvements

- Support for React Native 0.71.0 by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1631
- Clarify installation instructions for Android by
[@&#8203;evan1715](https://togithub.com/evan1715) in
[software-mansion/react-native-screens#1633

#### 🔢 Miscellaneous

- Fix FabricTestExample fails to start due to new
`react-native.config.js` by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1624
- Examples stopped to work after RN issue by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1632
- Exclude android/.settings file form repo by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1642
- Bump deps & fix tvOS build by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1667
- Unify CI between platforms by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1676

#### New Contributors

- [@&#8203;evan1715](https://togithub.com/evan1715) made their first
contribution in
[software-mansion/react-native-screens#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>
mccoyplayer pushed a commit to mccoyplayer/reactScreen that referenced this pull request Feb 9, 2024
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants