dpogue opened a new pull request, #1523:
URL: https://github.com/apache/cordova-ios/pull/1523

   ### Platforms affected
   iOS
   
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   Web content authors should have control over how the status bar is handled 
using the built-in web platform functionality for UI colouring and opting in to 
showing behind the status bar or not.
   
   
   ### Description
   <!-- Describe your changes in detail -->
   This adds a background behind the status bar automatically when a page does 
not request to extend itself behind the status bar using a meta tag with 
`viewport-fit=cover`. It automatically shows and hides as the value of the 
viewport-fit option changes.
   
   On iOS 16.4 and newer, it will be coloured according to the meta 
`theme-color` tag, and a default colour can be set in the storyboard for a 
CDVViewController.
   
   We expose a very basic JS API hanging off the existing `window.statusbar` 
property that allows controlling the visibility (of the status bar contents 
entirely, not just of the background view) and overriding the background colour.
   
   The colour is determined as follows:
     1. Any colour set explicitly with the JS API (if any)
     2. Any colour pulled from the meta tag (iOS 16.4+, if any)
     3. The status bar background colour specified in the storyboard (if any)
     4. The general background colour specified in the storyboard (if any)
     5. The default system background colour
   
   Efforts were made to ensure that this does not interfere with the existing 
CDVStatusBar plugin implementation (although maybe this can replace it for most 
common use cases), by making the display of this built-in conditional on not 
having the CDVStatusBar plugin installed.
   
   ### Remaining Work
   - [ ] Wire the `StatusBarBackgroundColor` preference up to an XCAsset 
colorset in the template and set it in the Main.storyboard file
   - [ ] Do a bunch of testing with `CDVStatusBar` installed to make sure there 
are no conflicts
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   Tested locally in an iPhone 16 Pro Max simulator.
   
   
   ### Checklist
   
   - [ ] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [ ] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to