Skip to content

WIP on theme-color/viewport-fit - #2010

Draft
dpogue wants to merge 1 commit into
apache:masterfrom
dpogue:theme-color
Draft

dpogue wants to merge 1 commit into
apache:masterfrom
dpogue:theme-color

Conversation

@dpogue

@dpogue dpogue commented Sep 1, 2026

Copy link
Copy Markdown
Member

Not finished, not completely working, but might be good to get some eyes on this.
Hacky test project: https://gist.github.com/dpogue/f548df1ec6adf2662485b29599688f23

Platforms affected

Android

Motivation and Context

Description

  • Fixes the issue where insets were not zeroed out when the WebView was not displayed edge-to-edge

TODO

  • JS to set StatusBarBackgroundColor preference as cdv_statusbar_background_color in cdv_colors.xml during prepare
  • JS to observe changes to the viewport and theme-color meta tags
  • Figure out what to do if the webview is not up to date and doesn't support safe-area-inset variables
  • Figure out what to do with the navigation bar
  • Finish moving the rest of the view logic from SystemBarPlugin to CordovaActivity
  • Make sure hiding the status bar entirely works
  • Make sure fullscreen mode works
  • Make sure immersive mode works
  • Test every combination on every single SDK from 24 to 37 and document the results 😩
  • Figure out if this breaks existing behaviour in cordova-android 15.x

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@dpogue dpogue self-assigned this Sep 1, 2026
@codecov-commenter

codecov-commenter commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.20%. Comparing base (3fd12df) to head (365db93).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2010   +/-   ##
=======================================
  Coverage   63.20%   63.20%           
=======================================
  Files          24       24           
  Lines        4922     4922           
=======================================
  Hits         3111     3111           
  Misses       1811     1811           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GitToTheHub

Copy link
Copy Markdown
Contributor

Cool, nice PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants