-
Notifications
You must be signed in to change notification settings - Fork 0
Adding in the edge to edge behavior that comes standard with cordova-android to our OutSystems branch. #27
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
Conversation
* feat: support previous non-e2e (add FrameLayout wrapper) * feat: implement internal SystemBar plugin * feat: implement StatusBar plugin JS API (SystemBarPlugin) * feat!: force custom statusbarView for all SDKs * chore: various cleanup, refactors, fixes, and docs from recent changes * feat: use getComputedStyle for setBackgroundColor * chore: suppress deprecation warnings for method using setNavigationBarColor * chore: return null when rootView is null * fix: setOnApplyWindowInsetsListener to return insets * fix: setting appearance when e2e is enabled * fix: set statusBarColor to transparent, use new statusBar UI (cherry picked from commit 76aa938)
* feat!: partial night & day theme support * feat!: prefix core resource values files with cdv_
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
00b3386 to
6832792
Compare
|
See ionic-team/capacitor#8121 and ionic-team/capacitor#8180 (comment) for feedback on this approach |
For the approach that you linked, I see a few problems. One, we will have an inconsistent user experience between people using different versions of the webview. Two, padding is being applied automatically instead of passing the responsibility on to users for a truly edge-to-edge experience. Three, removes control from the web developer to make their webview look how they would like. Four, if a user is developing an app on a new webview version and decides to use the env variables to provide custom styling, the app they release could have double handling of the insets on devices running older versions of the webview, as the env variables still exist with values, albeit incorrect values, but they are still there. We went with a different approach that is more closely aligned with what Apache has decided to do on their side. We use a Cordova preference Long term we will remove the CSS injection in favor of just using the env CSS variables, but since we can't force users to update anything our goal is to reduce breaking changes, and provide a path forward for consistent behavior across devices. |
|
Thank you for taking the time to look at the other approach!
You mean that users with a chromium version below m140 will not have full edge to edge support right? I agree that that is suboptimal indeed. But since chromium is an evergreen browser and thus the majority of users will have the most recent version, I think this is a non-issue. Or at the very least the pros will outweigh the cons IMO
This is only true for users with a webview version < m140. For webview >= m140 (and if the meta tag
Again, this is only the case for webview version < m140. Maybe you misunderstood the code where these insets are not consumed from webview version >= m140? That is checked in this line. If the webview support it, the insets are not consumed and passed on to the webview.
This is not the case luckily. If a webview version < m140 is found, the insets are consumed. So the webview insets will always be 0px. On the other hand, for webview version >= m140, the insets will be correctly passed through and be set correctly, I'm not sure about breaking changes, as I'm not sure how it works currently. If currently the approach is to use |
I can't provide all the context to why we want to go this direction for our fork, but we have some reasons around why this is our preferred path. I am going to close this PR due to an issue with the cherry-picks. Here is the new one: #28. For our purposes, though, we will be keeping the injected CSS variables. We are also trying to keep this fork as closely aligned to the base as possible, which uses the preference based edge to edge. I do appreciate your feedback though, and thank you for taking a look! |
Platforms affected
Android
Motivation and Context
Description
This is bringing a more legacy appearance to applications running in edge to edge, unless they specifically opt into edge to edge mode. This will be combined with our native shell and a new plugin that will automatically inject css variables with inset values that will allow users to go edge to edge and do with the edges what they want.
Testing
I tested several versions of android with and without the new flag, and tested against an OutSystems application.
Checklist
(platform)if this change only applies to one platform (e.g.(android))