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

v4.0.0-alpha.8: does not comply with statusbarPadding #14742

Closed
ghybs opened this issue Jul 10, 2018 · 10 comments
Closed

v4.0.0-alpha.8: does not comply with statusbarPadding #14742

ghybs opened this issue Jul 10, 2018 · 10 comments
Labels
needs: reply the issue needs a response from the user

Comments

@ghybs
Copy link
Contributor

ghybs commented Jul 10, 2018

Bug Report

Ionic Info
Using @ionic/core version 4.0.0-alpha.8 directly from npm / unpkg CDN.
Chromium and Firefox browsers

Describe the Bug
Ionic retrieves some configuration options from the location query parameters that start with ionic:.
In particular, ionic:statusbarPadding=true adds a top margin to account for the mobile status bar / notch (iPhone X).
But in version 4.0.0-alpha.8, this configuration option is no longer applied.

Steps to Reproduce

  1. Go to https://beta.ionicframework.com/docs/api/action-sheet/
  2. In "ios" mode (as default), the top toolbar displays behind the mobile simulator notch.

It was working fine in previous versions, e.g. in 4.0.0-alpha.7:
https://beta.ionicframework.com/docs/api/4.0.0-alpha.7/action-sheet

Related Code
Direct link to demo app: https://beta.ionicframework.com/docs/content/api//action-sheet-demo.html?ionic:mode=ios&ionic:statusbarPadding=true
With a Plunker: https://plnkr.co/edit/Iy74e71fNDoiYPm7VcBo?p=preview (includes an iframe calling a 2nd HTML page so that we can set the option in the src query params)

Expected Behavior
When the location includes the query parameter ionic:statusbarPadding=true, the App should add an extra top margin to account for the device status bar / notch.

Additional Context
None.

@ionitron-bot ionitron-bot bot added the triage label Jul 10, 2018
@jgw96
Copy link
Contributor

jgw96 commented Jul 12, 2018

Hello! Are you still running into this issue with alpha.10 ?

@ionitron-bot ionitron-bot bot removed the triage label Jul 12, 2018
@jgw96 jgw96 added needs: reply the issue needs a response from the user and removed needs info labels Jul 12, 2018
@ghybs
Copy link
Contributor Author

ghybs commented Jul 13, 2018

Hi, thank you for your message!

Yes indeed, the situation is the same with latest release version alpha.10:
https://plnkr.co/edit/W9JuuGZ8zeSuurbEndwV?p=preview

Same with the demo apps on Ionic docs beta, which seem to have been updated to alpha.10 as well:

@ghybs
Copy link
Contributor Author

ghybs commented Jul 18, 2018

FWIW, same with alpha.11:
https://plnkr.co/edit/kfrB50EfgHmdqOqyjtMr?p=preview

@silverio
Copy link

Same issue on beta.0

I made a fresh install of the tabs app, both nav bar and tabs rendered without the proper padding on an iPhone X.

@Mobiletainment
Copy link
Contributor

Mobiletainment commented Aug 1, 2018

Same issue on 4.0.0-beta.1

Update: after rebuilding everything I noticed that the opposite happened. It's too much padding now:

img_3707

ion-header ion-toolbar:first-child: {
    padding-top: calc(env(safe-area-inset-top) + var(--ion-statusbar-padding))
}

@silverio
Copy link

silverio commented Aug 1, 2018

I agree @Mobiletainment. I am having the same issue, there is too much padding now on 4.0.0-beta.1

@philmerrell
Copy link

Yes! Thank you for posting the issue. Too much padding now on 4.0.0-beta.1

@brandyscarney
Copy link
Member

This should be fixed in beta.3. I updated your sample demos and I see it working now so I am going to close this. Please let me know if you're still seeing issues though, thanks!

@ghybs
Copy link
Contributor Author

ghybs commented Aug 17, 2018

Works fine now indeed! 👍

Just for the sake of testing, here is a Plunker updated with @ionic/core@4.0.0-beta.3 and some radio inputs to easily switch between modes and statusbarPadding config:
https://plnkr.co/edit/GJnEC8qpfit8fWuWDdIa?p=preview

=> statusbarPadding correctly applied for both iOS and MD modes, and hidden when statusbarPadding query parameter is omitted.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 16, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: reply the issue needs a response from the user
Projects
None yet
Development

No branches or pull requests

6 participants