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(menu): dropdown position with translucent status bar #4495

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alex-fournier
Copy link
Contributor

@alex-fournier alex-fournier commented Sep 13, 2024

This PR replaces the way the status bar height is calculated on Android. Now I use react-native-safe-area-context to get the top inset. The old way using NativeModules.NativeUnimoduleProxy?.modulesConstants was no longer working since this commit in Expo: https://github.com/expo/expo/pull/28014/files

I removed the expo-constants dependency as it was only used for the old way of calculating status bar height that has been removed.

Motivation

The initial problem was an incorrect position of the menu under the anchor when using anchorPosition=bottom with a translucent status bar in Android.

Related issue

#4493

Test plan

I added a test case in the example app. A menu with anchor position set to bottom. It is displayed the same, either with a status bar translucent or not.

@callstack-bot
Copy link

callstack-bot commented Sep 13, 2024

Hey @alex-fournier, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

@alex-fournier alex-fournier force-pushed the fix/menu-dropdown-position branch from 7e676f3 to 66b8bfd Compare September 13, 2024 13:02
@alex-fournier
Copy link
Contributor Author

alex-fournier commented Sep 13, 2024

In 66b8bfd, I fixed the component name of Menu and Card for the documentation website. (Menu vs. MenuComponent and Card vs. CardComponent)

Capture d’écran 2024-09-13 à 15 03 05

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.

2 participants