-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I was going to submit a PR from this, and am still happy to do so, but I'd probably make some bad assumptions without getting feedback here on if and how to do it first.
Currently, the message bar doesn't account for the notch on iPhone X, so by default, the message will be partially obscured by the notch. If the message is coming from the top, setting viewTopInset to around 24 got it safely under the notch:
This could be a viable workaround, except landscape mode doesn't need the additional padding, and maybe some left/right inset is needed for the bar in landscape (not sure, haven't tried yet). And then there's bars coming up from the bottom, which need to be aware of the 34 px tall home bar area.
Anyway, I was thinking that probably the best thing in the long run is to use SafeAreaView - it takes care of things from all directions without having to think about it. However, that requires React Native 0.50.1. I'm guessing Expo 23 will ship by the end of the month, and it seems likely that it would support RN 50, so at that point, expecting folks to adopt RN 50 for proper iPhone X support seems pretty reasonable. It would probably also make sense for such a change to trigger a new major or minor revision number and list RN 50 as a peer dependency, so it's easy to opt out of until folks are ready to upgrade their RN.
Alternatively, it could check for the availability of SafeAreaView and not support iPhone X automatically if it's not available, or implement the necessary paddings manually without SafeAreaView (ugh).