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: Add SafeAreaView to FAB Group #831

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

gawrysiak
Copy link
Collaborator

FAB Group currently doesn't support SafeAreaView. It results in an inconsistent behavior between different phones when using a bottom navigation or such.

Since SafeAreaView is already there for components like Snackbar or BottomNavigation, it might be a good idea to add it here as well.

It's also not so obvious to handle it per project cause of the dark overlay that breaks when SafeAreaView applied outside the component. For now I've ended up using react-native-iphone-x-helper package for my local projects to apply different padding values when notch is there, so hopefully the PR provides a better solution.

Before:
unadjustednonraw_thumb_b4a

After:
unadjustednonraw_thumb_b4b

@callstack-bot
Copy link

Hey @gawrysiak, thank you for your pull request 🤗. The documentation from this branch can be viewed here. Please remember to update Typescript types if you changed API.

@Trancever
Copy link
Contributor

Hey @gawrysiak Thanks for PR. Should this fix this issue #830 ?

@gawrysiak
Copy link
Collaborator Author

hi @Trancever, I don't think that's related. The issue seems to be about standard FAB + Snackbar. Although it might be worth looking into how does it all play together

@RichardLindhout
Copy link
Contributor

I think we should not add SafeAreaView around all components but reference it in the docs it's available so we don't have safeareaviews all over the place.

@gawrysiak
Copy link
Collaborator Author

@RichardLindhout normally I'm using a SafeAreaView inside my app files, so I don't really need that for most of the components, but this case is slightly different. The component inside is using StyleSheet.absoluteFillObject, so my SafeAreaView is ignored. It's not really possible to apply it from outside

@RichardLindhout
Copy link
Contributor

Ah got it ;-)

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.

5 participants