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

NavigationBar "overlay-swipe" mode incompatible with useVisibility hook, setButtonStyleAsync, and setBackgroundColorAsync #21395

Open
i-in-range opened this issue Feb 25, 2023 · 2 comments

Comments

@i-in-range
Copy link

Minimal reproducible example

https://snack.expo.dev/1UjHwrnG1

Summary

In "overlay-swipe" mode NavigationBar is became transparent and moves over my BottomTab. It looks messy because I see buttons of two interfaces at the same area concurrently.

The first intension was to set solid NavigationBar background, but setBackgroundColorAsync doesn't work.
By the way I noticed, that setButtonStyleAsync doesn't work in "overlay-swipe" mode too.

The next and the last idea was to hide my BottomTab programmatically, when NavigationBar is visible, using useVisibility hook. It doesn't work too.

Any other workaround?

Environment

expo-env-info 1.0.5 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 18.12.1 - C:\Program Files\nodejs\node.EXE
npm: 9.1.2 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ^47.0.13 => 47.0.13
react: 18.1.0 => 18.1.0
react-dom: 18.1.0 => 18.1.0
react-native: 0.70.5 => 0.70.5
react-native-web: ~0.18.7 => 0.18.12
Expo Workflow: managed

@i-in-range i-in-range added the needs validation Issue needs to be validated label Feb 25, 2023
@brentvatne
Copy link
Member

brentvatne commented Feb 25, 2023

hey @i-in-range - it sounds like your report here is that:

-useVisibility is not reporting the expected values when overlay-swipe is enabled (it always reports hidden)

  • setButtonStyleAsync doesn't have the documented effect when overlay-swipe is enabled
  • setBackgroundColorAsync doesn't have the documented effect when overlay-swipe is enabled

if so, I believe this may be a documentation issue, I'm not sure that the underlying Android APIs allow for this - can you point to any relevant Android API docs?

@brentvatne brentvatne changed the title expo-navigation-bar: Behavior "overlay-swipe" of NavigationBar somehow blocks "useVisibility" hook and work of "setButtonStyleAsync" and "setBackgroundColorAsync" NavigationBar "overlay-swipe" mode incompatible with useVisibility hook, setButtonStyleAsync, and setBackgroundColorAsync Feb 25, 2023
@brentvatne brentvatne added help wanted Android Issue accepted NavigationBar expo-navigation-bar and removed needs validation Issue needs to be validated labels Feb 25, 2023
@expo-bot
Copy link
Collaborator

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants