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(Android): modify the decorFitsSystemWindow parameter in setNavigationBarHidden #1988

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

jiyong1
Copy link
Contributor

@jiyong1 jiyong1 commented Dec 12, 2023

Description

Currently when user tries to change the appearance of the navigation bar (using navigationBarHidden / navigationBarColor props) the content of the screen jumps to the place that does not respect safeAreaView. This PR fixes it by removing decorFitsSystemWindow declaration, as it breaks the interface by matching it to fit system window.

Resolves #1719.

Changes

  • Removed decorFitsSystemWindow call from ScreenWindowTraits.kt

Checklist

  • Ensured that CI passes

@tboba
Copy link
Member

tboba commented Dec 12, 2023

Hi @jiyong1! Thanks for creating this issue!
I have one question about your changes - as I was testing couple months ago a behaviour of decorFitsSystemWindows I believe that without this method changing the appearance of the navigation bar (changing color / hiding it) looks better, as the content doesn't jump while fast reloading the app on debug mode. Have you tested how the content of the screen without calling decorFitsSystemWindows? If not, could you test it? 🙏

@jiyong1
Copy link
Contributor Author

jiyong1 commented Dec 12, 2023

Hi @tboba
I tested as you suggested and it seems better without the method. Can I push a commit that removes the method to this pull request?

@tboba
Copy link
Member

tboba commented Dec 12, 2023

@jiyong1 Sure! But do you know if removing this line still resolves the issue mentioned in the description?

@jiyong1
Copy link
Contributor Author

jiyong1 commented Dec 13, 2023

@tboba Yes, I have confirmed that the issue is still resolved even after removing it.

Copy link
Member

@tboba tboba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested that right now and it works like a charm! 🚀

Thanks! ❤️

@tboba tboba merged commit c2b68ba into software-mansion:main Dec 21, 2023
4 checks passed
github-merge-queue bot pushed a commit to valora-inc/wallet that referenced this pull request Apr 13, 2024
[![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.29.0` ->
`^3.30.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.29.0/3.30.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.29.0/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.29.0/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>software-mansion/react-native-screens
(react-native-screens)</summary>

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

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

Patch release addressing an issue with building a package due to the
missing submodule from `postinstall` command.

#### 🔢 Miscellaneous

- Remove postinstall step from package.json by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2081

**Full Changelog**:
software-mansion/react-native-screens@3.30.0...3.30.1

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

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

Minor release including custom screen transitions, adding support for
VisionOS, supporting `slide_from_left` animation on iOS and fixing other
aspects (including wrong targets for touchable components on Fabric).
Thanks for following along! 💙

**Note**: Please note that support for React Native versions lower than
0.68 have been **dropped**. Older versions may still continue to work
with this and newer releases of react-native-screens, but bugs from
deprecated versions will not be considered for repair.

#### What's Changed

#### 👍 Improvements

- **Custom screen transitions** - In 3.30.0, we've introduced a support
for custom transition animations while making a "go back" gesture. Made
by [@&#8203;piaskowyk](https://togithub.com/piaskowyk) and
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1913

- **Support for VisionOS is here!** - From now, react-native-screens
offers bundled support for VisionOS platform. Made by
[@&#8203;okwasniewski](https://togithub.com/okwasniewski) in
[software-mansion/react-native-screens#2025

- **`slide_from_left` transition on iOS** - You can use
`slide_from_left` animation that will be used for pushing or popping a
new screen. Made by
[@&#8203;kirillzyusko](https://togithub.com/kirillzyusko) in
[software-mansion/react-native-screens#2057

- Add `cancelSearch` command on SearchBar by
[@&#8203;Jasonzj](https://togithub.com/Jasonzj) in
[software-mansion/react-native-screens#1987

- Fixed Android screen stack animation by
[@&#8203;janicduplessis](https://togithub.com/janicduplessis) in
[software-mansion/react-native-screens#2019

#### 🐛 Bug fixes

- Not working hitslop for headerRight/Left views by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1995
- App freeze when navigating back from any modal nested in contained
modal by [@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1996
- Incorrect safe area on transparent modals using landscape orientation
by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2008
- Invalid orientation of contained modals by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2011
- Modify the decorFitsSystemWindow parameter in setNavigationBarHidden
by [@&#8203;jiyong1](https://togithub.com/jiyong1) in
[software-mansion/react-native-screens#1988
- Avoid race condition related to state on the new arch by
[@&#8203;j-piasecki](https://togithub.com/j-piasecki) in
[software-mansion/react-native-screens#2024
- Check for multiple screens while changing screen orientation by
[@&#8203;uzegonemad](https://togithub.com/uzegonemad) in
[software-mansion/react-native-screens#2035
- Fix setting incorrect measure with native header by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) and
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2028
- Add notifying for header height change, fix header height values by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2075
- Change context while running `runOnUiQueueThread` on 0.73 with
Bridgeless by [@&#8203;cortinico](https://togithub.com/cortinico) in
[software-mansion/react-native-screens#2022
- Use reactApplicationContext in onScreenChanged by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#2046
- Remove calculating status bar height in useAnimatedHeaderHeight when
header is not shown by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2033
- Handle setting `display` for `_viewConfig` attribute by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) and
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2071
- Fix crash with searchResultsController in RNSSearchBar by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2004
- Add constraints for velocity in `goBackGesture` screen transition by
[@&#8203;piaskowyk](https://togithub.com/piaskowyk) in
[software-mansion/react-native-screens#2061
- Add view check for getting StackView in `goBackGesture` by
[@&#8203;piaskowyk](https://togithub.com/piaskowyk) in
[software-mansion/react-native-screens#2060
- Change default value of context of ScreenGestureDetector, add warning
for goBackGesture by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2013
- Move GHContext from gesture-handler to native-stack by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2017
- Change default gesture from Tap to Fling, fix failing CI by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2023

#### 🔢 Miscellaneous

- **Drop React Native 0.64 - 0.67 since 3.30.0** by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2036
- Remove mixed CJS/ESM, refactorize index.native.tsx by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1982
- Add react-navigation as submodule & use it in test applications by
[@&#8203;kkafar](https://togithub.com/kkafar) and
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1993
- Unify member-field naming convention in Kotlin by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1999
- Update compatibility table with supported RN versions with Fabric by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#2001
- Change name of `headerBackButtonClicked` event by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#2015
- Stabilize Android E2E tests by
[@&#8203;kirillzyusko](https://togithub.com/kirillzyusko) in
[software-mansion/react-native-screens#2062
- Update Podfiles in Example projects, update RN in FabricExample to
0.73 by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1989
- Update React Native to 0.73.4, change Cocoapods version by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2032
- Configure yarn version in package.json by
[@&#8203;bakkerjoeri](https://togithub.com/bakkerjoeri) in
[software-mansion/react-native-screens#2077
- Bump ip from 1.1.8 to 1.1.9 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#2038
- Bump ip from 1.1.8 to 1.1.9 in example apps by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2044

#### New Contributors

- [@&#8203;jiyong1](https://togithub.com/jiyong1) made their first
contribution in
[software-mansion/react-native-screens#1988
- [@&#8203;Jasonzj](https://togithub.com/Jasonzj) made their first
contribution in
[software-mansion/react-native-screens#1987
- [@&#8203;j-piasecki](https://togithub.com/j-piasecki) made their first
contribution in
[software-mansion/react-native-screens#2024
- [@&#8203;cortinico](https://togithub.com/cortinico) made their first
contribution in
[software-mansion/react-native-screens#2022
- [@&#8203;okwasniewski](https://togithub.com/okwasniewski) made their
first contribution in
[software-mansion/react-native-screens#2025
- [@&#8203;uzegonemad](https://togithub.com/uzegonemad) made their first
contribution in
[software-mansion/react-native-screens#2035
- [@&#8203;bakkerjoeri](https://togithub.com/bakkerjoeri) made their
first contribution in
[software-mansion/react-native-screens#2077

#### 🙌 Thank you for your contributions!

**Full Changelog**:
software-mansion/react-native-screens@3.29.0...3.30.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
shottah pushed a commit to zed-io/kolektivo that referenced this pull request May 15, 2024
…inc#5239)

[![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.29.0` ->
`^3.30.1`](https://renovatebot.com/diffs/npm/react-native-screens/3.29.0/3.30.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-screens/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-screens/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-screens/3.29.0/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-screens/3.29.0/3.30.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>software-mansion/react-native-screens
(react-native-screens)</summary>

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

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

Patch release addressing an issue with building a package due to the
missing submodule from `postinstall` command.

#### 🔢 Miscellaneous

- Remove postinstall step from package.json by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2081

**Full Changelog**:
software-mansion/react-native-screens@3.30.0...3.30.1

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

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

Minor release including custom screen transitions, adding support for
VisionOS, supporting `slide_from_left` animation on iOS and fixing other
aspects (including wrong targets for touchable components on Fabric).
Thanks for following along! 💙

**Note**: Please note that support for React Native versions lower than
0.68 have been **dropped**. Older versions may still continue to work
with this and newer releases of react-native-screens, but bugs from
deprecated versions will not be considered for repair.

#### What's Changed

#### 👍 Improvements

- **Custom screen transitions** - In 3.30.0, we've introduced a support
for custom transition animations while making a "go back" gesture. Made
by [@&#8203;piaskowyk](https://togithub.com/piaskowyk) and
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#1913

- **Support for VisionOS is here!** - From now, react-native-screens
offers bundled support for VisionOS platform. Made by
[@&#8203;okwasniewski](https://togithub.com/okwasniewski) in
[software-mansion/react-native-screens#2025

- **`slide_from_left` transition on iOS** - You can use
`slide_from_left` animation that will be used for pushing or popping a
new screen. Made by
[@&#8203;kirillzyusko](https://togithub.com/kirillzyusko) in
[software-mansion/react-native-screens#2057

- Add `cancelSearch` command on SearchBar by
[@&#8203;Jasonzj](https://togithub.com/Jasonzj) in
[software-mansion/react-native-screens#1987

- Fixed Android screen stack animation by
[@&#8203;janicduplessis](https://togithub.com/janicduplessis) in
[software-mansion/react-native-screens#2019

#### 🐛 Bug fixes

- Not working hitslop for headerRight/Left views by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1995
- App freeze when navigating back from any modal nested in contained
modal by [@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1996
- Incorrect safe area on transparent modals using landscape orientation
by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2008
- Invalid orientation of contained modals by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2011
- Modify the decorFitsSystemWindow parameter in setNavigationBarHidden
by [@&#8203;jiyong1](https://togithub.com/jiyong1) in
[software-mansion/react-native-screens#1988
- Avoid race condition related to state on the new arch by
[@&#8203;j-piasecki](https://togithub.com/j-piasecki) in
[software-mansion/react-native-screens#2024
- Check for multiple screens while changing screen orientation by
[@&#8203;uzegonemad](https://togithub.com/uzegonemad) in
[software-mansion/react-native-screens#2035
- Fix setting incorrect measure with native header by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) and
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2028
- Add notifying for header height change, fix header height values by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2075
- Change context while running `runOnUiQueueThread` on 0.73 with
Bridgeless by [@&#8203;cortinico](https://togithub.com/cortinico) in
[software-mansion/react-native-screens#2022
- Use reactApplicationContext in onScreenChanged by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#2046
- Remove calculating status bar height in useAnimatedHeaderHeight when
header is not shown by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2033
- Handle setting `display` for `_viewConfig` attribute by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) and
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2071
- Fix crash with searchResultsController in RNSSearchBar by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2004
- Add constraints for velocity in `goBackGesture` screen transition by
[@&#8203;piaskowyk](https://togithub.com/piaskowyk) in
[software-mansion/react-native-screens#2061
- Add view check for getting StackView in `goBackGesture` by
[@&#8203;piaskowyk](https://togithub.com/piaskowyk) in
[software-mansion/react-native-screens#2060
- Change default value of context of ScreenGestureDetector, add warning
for goBackGesture by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2013
- Move GHContext from gesture-handler to native-stack by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2017
- Change default gesture from Tap to Fling, fix failing CI by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2023

#### 🔢 Miscellaneous

- **Drop React Native 0.64 - 0.67 since 3.30.0** by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2036
- Remove mixed CJS/ESM, refactorize index.native.tsx by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1982
- Add react-navigation as submodule & use it in test applications by
[@&#8203;kkafar](https://togithub.com/kkafar) and
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1993
- Unify member-field naming convention in Kotlin by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#1999
- Update compatibility table with supported RN versions with Fabric by
[@&#8203;kkafar](https://togithub.com/kkafar) in
[software-mansion/react-native-screens#2001
- Change name of `headerBackButtonClicked` event by
[@&#8203;WoLewicki](https://togithub.com/WoLewicki) in
[software-mansion/react-native-screens#2015
- Stabilize Android E2E tests by
[@&#8203;kirillzyusko](https://togithub.com/kirillzyusko) in
[software-mansion/react-native-screens#2062
- Update Podfiles in Example projects, update RN in FabricExample to
0.73 by [@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#1989
- Update React Native to 0.73.4, change Cocoapods version by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2032
- Configure yarn version in package.json by
[@&#8203;bakkerjoeri](https://togithub.com/bakkerjoeri) in
[software-mansion/react-native-screens#2077
- Bump ip from 1.1.8 to 1.1.9 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[software-mansion/react-native-screens#2038
- Bump ip from 1.1.8 to 1.1.9 in example apps by
[@&#8203;tboba](https://togithub.com/tboba) in
[software-mansion/react-native-screens#2044

#### New Contributors

- [@&#8203;jiyong1](https://togithub.com/jiyong1) made their first
contribution in
[software-mansion/react-native-screens#1988
- [@&#8203;Jasonzj](https://togithub.com/Jasonzj) made their first
contribution in
[software-mansion/react-native-screens#1987
- [@&#8203;j-piasecki](https://togithub.com/j-piasecki) made their first
contribution in
[software-mansion/react-native-screens#2024
- [@&#8203;cortinico](https://togithub.com/cortinico) made their first
contribution in
[software-mansion/react-native-screens#2022
- [@&#8203;okwasniewski](https://togithub.com/okwasniewski) made their
first contribution in
[software-mansion/react-native-screens#2025
- [@&#8203;uzegonemad](https://togithub.com/uzegonemad) made their first
contribution in
[software-mansion/react-native-screens#2035
- [@&#8203;bakkerjoeri](https://togithub.com/bakkerjoeri) made their
first contribution in
[software-mansion/react-native-screens#2077

#### 🙌 Thank you for your contributions!

**Full Changelog**:
software-mansion/react-native-screens@3.29.0...3.30.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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
@kkafar kkafar self-requested a review May 22, 2024 06:43
alduzy added a commit that referenced this pull request Jun 3, 2024
## Description

Once upon a time there was an
[issue](#1719)
regarding navigation bar. The problem was that the background color set
to the navigation bar covered the content behind, see examples:

<table>
<tr>
<th>navigationBarColor: 'transparent'</th>
<th>navigationBarColor: 'yellow'</th>
</tr>
<tr>
<td>

![Screenshot 2024-05-22 at 10 33
28](https://github.com/software-mansion/react-native-screens/assets/91994767/eb3ea5a5-4617-4547-a052-ab0612872697)

</td>
<td>

![Screenshot 2024-05-22 at 10 34
08](https://github.com/software-mansion/react-native-screens/assets/91994767/805fa199-b90c-40aa-9ef5-b5ab8abef71a)

</td>
</tr>
</table>

Then [PR
1988](#1988)
solved the issue, but introduced another problem: sometimes it may be
intended to have content behind the navigation bar.

<table>
<tr>
<th>navigationBarColor: 'transparent' after PR 1988</th>
<th>navigationBarColor: 'transparent' before PR 1988</th>
</tr>
<tr>
<td>

![Screenshot 2024-05-21 at 13 00
23](https://github.com/software-mansion/react-native-screens/assets/91994767/76ec2fa1-e212-4725-a1da-32bcf8c5eb84)

</td>
<td>

![Screenshot 2024-05-21 at 13 07
19](https://github.com/software-mansion/react-native-screens/assets/91994767/8fa15e57-7168-4fec-b8e7-3cce29eeebdc)

</td>
</tr>
</table>

This PR intents to add a new screen option, enabling navigation bar
translucency control, so that the developers can decide if they want to
show content behind the navigation bar independently.

Fixes #2122 #1719

## Changes

- added navigationBarTranslucent option

## Test code and steps to reproduce

<!--
Please include code that can be used to test this change and short
description how this example should work.
This snippet should be as minimal as possible and ready to be pasted
into editor (don't exclude exports or remove "not important" parts of
reproduction example)
-->

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Updated documentation: <!-- For adding new props to native-stack
-->
- [ ]
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
- [ ]
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
- [ ] Ensured that CI passes
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.

navigationBarColor props breaking safeArea / textinput & more
2 participants