GitToTheHub opened a new pull request, #1132:
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/1132

   ### Platforms affected
   iOS
   
   ### Motivation and Context
   - The toolbar and address bar take some amount of space and obscures web 
content. To put the elements over the WebView, more content can be seen.
   - Since iOS 26 the toolbar's background is not configurable anymore. To 
achieve this, a custom toolbar background is added, which is also used on iOS 
18 and older to keep the code simple.
   
   ### Description
   - Insets are set for the web view to to take the toolbar and address bar 
into account, so the content can always be scrolled in a visible area
   - Depends on https://github.com/apache/cordova-plugin-inappbrowser/pull/1128 
and https://github.com/apache/cordova-plugin-inappbrowser/pull/1129
   - Overseeds https://github.com/apache/cordova-plugin-inappbrowser/pull/1097
   
   #### iOS 26
   
   | Before | After |
   | :---: | :---: |
   | <img width="300" 
src="https://github.com/user-attachments/assets/72116815-ba2c-4e90-8ad6-d48cea308cdb";
 /> | <img width="300" 
src="https://github.com/user-attachments/assets/de3ada8f-a184-4d12-b31e-7566d452a90b";
 /> |
   | The green color shines through the transparent parts of the web view | The 
in-app browser covers the whole screen and has no unhandled transparent parts |
   
   #### iOS 18 and older
   
   | Before | After |
   | :---: | :---: |
   | <img width="300" 
src="https://github.com/user-attachments/assets/6fb65202-332c-4b5d-a34e-510fa8209535";
 /> | <img width="300" 
src="https://github.com/user-attachments/assets/52c00e80-e2c9-415f-8938-6e1cfe275549";
 /> |
   | The green color shines through the transparent parts of the web view | The 
in-app browser covers the whole screen and has no unhandled transparent parts |
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   All options were tested with the new layout:
   - Toolbar and address bar hidden
   - Toolbar visible at bottom or top, address bar hidden
   - Toolbar visible at bottom or top, address bar visible
   
   #### Set Custom Toolbar Background Color
   
   | Before | After |
   | :---: | :---: |
   | <img width="300" 
src="https://github.com/user-attachments/assets/fe2f16d1-5f41-4b3c-a7b4-40d274811550";
 /> | <img width="300" 
src="https://github.com/user-attachments/assets/d79417f8-9fa9-4b5c-b7c6-8f30ca826ec4";
 /> |
   | Set `toolbarcolor=#FF0000` with`toolbartranslucent=yes` which is the 
default | Set `toolbarcolor=#FF0000` and `toolbartranslucent=no` |
   
   #### Landscape Toolbar Top fix
   
   On landscape, when the toolbar is at top it was too close to the top edge, 
which is fixed:
   
   | Before | After |
   | :---: | :---: |
   | <img width="350" 
src="https://github.com/user-attachments/assets/28a5abe7-35f9-43a9-8a9a-c8bec8d28b48";
 /> | <img width="350" 
src="https://github.com/user-attachments/assets/79ab9464-396f-423d-9bb6-89955c8f6234";
 /> |
   
   ### Other changes
   - Fixes the toolbar is glued at the top on landscape
   - Address bar
     - Text is black by default and the background transparent white
     - Removed some unnecessary assigned properties
   - Removed some unnecessary assigned properties for toolbar
   - doc(readme): change some wording for iOS option `toolbartranslucent`
   - Use always `[NSLayoutConstraint activateConstraints:]` to activate 
constraints
   
   ### Testing
   
   All options were tested with the new layout:
   - Toolbar and address bar hidden
   - Toolbar visible at bottom or top, address bar hidden
   - Toolbar visible at bottom or top, address bar visible
   - Test on iOS 18 and iOS 26
   
   ### 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](https://help.github.com/articles/closing-issues-using-keywords/))
   - [ ] 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to