-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
Safe areas are not handled correctly on iPhone X #3066
Comments
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
Blocked on the React Navigation v2 upgrade #2702 . |
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
@jackrzhang provided (on #3389) some handy screenshots that very clearly demonstrate one of the symptoms of this issue:
|
I think #3370 is probably also a symptom, indirectly:
Didn't repro for me on Android, and @jackrzhang reported it repro'd for him on a simulated iPhone XR but not on an iPhone 7. So that's consistent with it happening only on iOS devices that have a display cutout. I suspect it's caused by the logic we have for attempting to avoid the cutout, i.e. by a bug in that logic. |
Additional info from the dupe issue #3064 (filed just before this one), quoting @borisyankov:
|
Fixes zulip#3066 Previous approach almost worked correctly, but there was one case it didn't - when the keyboard did pop on an iPhone, the bottom space was sill there, though it shouldn't, as the keyboard is located over the `Home Indicator`.
#4315 would have us using a more maintained thing for getting the safe-area insets. |
OK, now that #4315 is merged, we're using As discussed around here, the new module is not without flaws, though. It offers a The preferred solution to try will be to try to use If that doesn't work and we have to use |
I plan to make a focused PR to fix this issue after #4468 is in. |
Each of these UI elements is a row that has meaningful content that we need to keep within the safe areas, but the rest of the row (its distinct background color, its touchable area, etc.) is meant to extend through the insets to the extreme left and right of the screen. See example screenshots at zulip#4683 (comment). So, make that happen. We do so by giving the rows left and right padding. This is easy and makes the row elements' styles pretty intuitive, but it does mean we'll have to take care, in the next few commits, not to add any padding to the elements that contain the rows -- we don't want to double up the padding by mistake. (This requirement ends up being kind of annoying on screens that have a mix of these kinds of rows and regular elements. Possibly there's a better design pattern we haven't yet considered.) Related: zulip#3066
This isn't ideal; it just puts the whole message list in a box that's contained within the safe area. The message list was designed to span the entire width of the screen, and some things look pretty bad when the insets are nonzero [1]: the timestamp pills, for one example, look like they get cut off artificially instead of being tucked away somewhere offscreen. Things like that would best be solved with a more in-depth design discussion. A more complete solution might start with the "env" CSS function [2], or, less optimally, a new WebView inbound event to be fired whenever the insets change. At least this solution lets things be visible and interactable that weren't before. I think this completes zulip#3066 (modulo this message-list issues discussed here), which is our current audit for safe-area handling. [1] So far, I think this is just landscape mode on newer iOS devices, but I might be missing something. [2] https://webkit.org/blog/7929/designing-websites-for-iphone-x/ Fixes: zulip#3066
Each of these UI elements is a row that has meaningful content that we need to keep within the safe areas, but the rest of the row (its distinct background color, its touchable area, etc.) is meant to extend through the insets to the extreme left and right of the screen. See example screenshots at zulip#4683 (comment). So, make that happen. We do so by giving the rows left and right padding. This is easy and makes the row elements' styles pretty intuitive, but it does mean we'll have to take care, in the next few commits, not to add any padding to the elements that contain the rows -- we don't want to double up the padding by mistake. (This requirement ends up being kind of annoying on screens that have a mix of these kinds of rows and regular elements. But this is unfortunately the workable design we've found; see our architecture doc on handling safe areas.) Related: zulip#3066
This isn't ideal; it just puts the whole message list in a box that's contained within the safe area. The message list was designed to span the entire width of the screen, and some things look pretty bad when the insets are nonzero [1]: the timestamp pills, for one example, look like they get cut off artificially instead of being tucked away somewhere offscreen. Things like that would best be solved with a more in-depth design discussion. A more complete solution might start with the "env" CSS function [2], or, less optimally, a new WebView inbound event to be fired whenever the insets change. At least this solution lets things be visible and interactable that weren't before. I think this completes zulip#3066 (modulo this message-list issue discussed here), which is our current audit for safe-area handling. [1] So far, I think this is just landscape mode on newer iOS devices, but I might be missing something. [2] https://webkit.org/blog/7929/designing-websites-for-iphone-x/ Fixes: zulip#3066
Each of these UI elements is a row that has meaningful content that we need to keep within the safe areas, but the rest of the row (its distinct background color, its touchable area, etc.) is meant to extend through the insets to the extreme left and right of the screen. See example screenshots at zulip#4683 (comment). So, make that happen. We do so by giving the rows left and right padding. This is easy and makes the row elements' styles pretty intuitive, but it does mean we'll have to take care, in the next few commits, not to add any padding to the elements that contain the rows -- we don't want to double up the padding by mistake. (This requirement ends up being kind of annoying on screens that have a mix of these kinds of rows and regular elements. But this is unfortunately the workable design we've found; see our architecture doc on handling safe areas.) Related: zulip#3066
This isn't ideal; it just puts the whole message list in a box that's contained within the safe area. The message list was designed to span the entire width of the screen, and some things look pretty bad when the insets are nonzero [1]: the timestamp pills, for one example, look like they get cut off artificially instead of being tucked away somewhere offscreen. Things like that would best be solved with a more in-depth design discussion. A more complete solution might start with the "env" CSS function [2], or, less optimally, a new WebView inbound event to be fired whenever the insets change. At least this solution lets things be visible and interactable that weren't before. I think this completes zulip#3066 (modulo this message-list issue discussed here), which is our current audit for safe-area handling. [1] So far, I think this is just landscape mode on newer iOS devices, but I might be missing something. [2] https://webkit.org/blog/7929/designing-websites-for-iphone-x/ Fixes: zulip#3066
Each of these UI elements is a row that has meaningful content that we need to keep within the safe areas, but the rest of the row (its distinct background color, its touchable area, etc.) is meant to extend through the insets to the extreme left and right of the screen. See example screenshots at zulip#4683 (comment). So, make that happen. We do so by giving the rows left and right padding. This is easy and makes the row elements' styles pretty intuitive, but it does mean we'll have to take care, in the next few commits, not to add any padding to the elements that contain the rows -- we don't want to double up the padding by mistake. (This requirement ends up being kind of annoying on screens that have a mix of these kinds of rows and regular elements. But this is unfortunately the workable design we've found; see our architecture doc on handling safe areas.) Related: zulip#3066
This isn't ideal; it just puts the whole message list in a box that's contained within the safe area. The message list was designed to span the entire width of the screen, and some things look pretty bad when the insets are nonzero [1]: the timestamp pills, for one example, look like they get cut off artificially instead of being tucked away somewhere offscreen. Things like that would best be solved with a more in-depth design discussion. A more complete solution might start with the "env" CSS function [2], or, less optimally, a new WebView inbound event to be fired whenever the insets change. At least this solution lets things be visible and interactable that weren't before. I think this completes zulip#3066 (modulo this message-list issue discussed here), which is our current audit for safe-area handling. [1] So far, I think this is just landscape mode on newer iOS devices, but I might be missing something. [2] https://webkit.org/blog/7929/designing-websites-for-iphone-x/ Fixes: zulip#3066
We are currently handling, but not 100% correctly, the 'screen border offsets' known as 'safe areas' on iOS. One such bug: iPhone X with a popped keyboard has some extra space below the compose box
The text was updated successfully, but these errors were encountered: