You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/03/25 17:28:39 UTC

[GitHub] [cordova-plugin-inappbrowser] PDLMobileApps opened a new pull request #655: (ios & android) Reduce IAB Web View height from the bottom

PDLMobileApps opened a new pull request #655: (ios & android) Reduce IAB Web View height from the bottom
URL: https://github.com/apache/cordova-plugin-inappbrowser/pull/655
 
 
   <!--
   Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   iOS & Android
   
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   This change is needed in situations where the main app has some content on the bottom of the screen that should be visible even when the IAB web view is shown.
   For instance, clickable footer, ad content, etc.
   
   <!-- If it fixes an open issue, please link to the issue here. -->
   This change addresses a similar issue to feature request #409, which is limited to Android only. This solution also includes iOS.
   
   
   ### Description
   <!-- Describe your changes in detail -->
   This change adds a new setting in both Android and iOS named: **bottomreduceheightby** which takes an integer as value. It defaults to 0 to maintain backward compatibility.
   When a value different than 0 is specified, the IAB web view height is reduced by that amount of pixels and aligned to the top of the screen. That results in a portion of the underlying Cordova window to be shown (as much as the value assigned to the setting) so that its content is fully visible and accessible.
   
   NOTE: if needed, a similar option can be added for the top of the IAB web view.
   
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   Testing was done manually as I am not sure on how to automate it.
   
   1. Created a new Cordova test app using cordova-plugin-inappbrowser.
   
   2. Executed:
       `cordova.InAppBrowser.open(url, "_blank", "");`
       and verified the web view is occupying the entire screen (default behavior).
   
   3. Executed:
       `cordova.InAppBrowser.open(url, "_blank", "bottomreduceheightby=0");`
        and verified the web view is occupying the entire screen (default behavior).
   
   4. Executed:
       `cordova.InAppBrowser.open(url, "_blank", "bottomreduceheightby=60");`
       and verified the web view is occupying the entire screen minus 60 pixels at the bottom.
       Also, verified the possibility to interact with the content in the underlying Cordova window.
   
   We repeated the above tests with both Android and iOS.
   
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [ ] I added automated test coverage as appropriate for this change
   - [x] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [x] 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/))
   - [x] 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org