-
Notifications
You must be signed in to change notification settings - Fork 13.4k
fix(core): use Capacitor's new safe area variables #30865
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff is only the new toggle button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really should update these tests so all screenshots aren't updated when a new button is added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Excellent work 🎉
core/src/css/core.scss
Outdated
| --ion-safe-area-right: env(safe-area-inset-right); | ||
| // `--safe-area-inset-*` are set by Capacitor | ||
| // @see https://capacitorjs.com/docs/apis/system-bars#android-note | ||
| --ion-safe-area-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to fallback to 0px here? I remember it causing issues for us in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
brandyscarney
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions / feedback on tests here.
| --ion-safe-area-left: 40px; | ||
| } | ||
|
|
||
| .safe-area-capacitor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to add much to this test besides forcing all screenshots to be updated and adding new ones. Even the values are the exact same so there won't be any screenshot difference. Can we not just check that the right value is being used (see my e2e edit)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really should update these tests so all screenshots aren't updated when a new button is added.
Co-authored-by: Brandy Smith <[email protected]>
Co-authored-by: Brandy Smith <[email protected]>
Issue number: internal
What is the current behavior?
The safe area variables are only reliant on
envvariables that are provided by devices.What is the new behavior?
Capacitor 8 has released safe area variable fallbacks to provide consistent behaviors with older Android devices:
Does this introduce a breaking change?
Other information
N/A