Closed zetavg closed 6 days ago
Hey @zetavg! Thanks for opening your first pull request in this repo. If you haven't already, make sure to read our contribution guidelines.
Name | Link |
---|---|
Latest commit | 2573816a7467edf7ebf283e2e4051f4ee128ac12 |
Latest deploy log | https://app.netlify.com/sites/react-navigation-example/deploys/6641d37941fbc800087616dc |
Deploy Preview | https://deploy-preview-11937--react-navigation-example.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Attention: Patch coverage is 33.33333%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 77.00%. Comparing base (
d90ed76
) to head (84cca6c
). Report is 2 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
packages/native-stack/src/views/HeaderConfig.tsx | 33.33% | 1 Missing and 1 partial :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Motivation
According to the docs, setting
headerBackTitleVisible
tofalse
should hide the back title on iOS, while this is not the case withreact-native-screens
v3.29+.Cause
With the current code,
backTitle={headerBackTitleVisible ? headerBackTitle : ' '}
, the back title is set to a blank string ifheaderBackTitleVisible
is false. However, in newer versions ofreact-native-screens
, thebackTitle
will be considered blank if it only contains white spaces, making it fallback to the default title - which makes the back title not hidden at all.Fix
Assign the
backTitleVisible
property ofRNSScreenStackHeaderConfig
native component, which seems to be a legit way to hide the back title.Test plan
backTitleVisible
screen option set tofalse
.react-native-screens
.react-native-screens
3.20.0
and3.21.0
, app does not crash and the back title remains hidden-able.