Skip to content
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

Add PreferredContentMode preference #886

Merged
merged 2 commits into from
Jun 16, 2020
Merged

Add PreferredContentMode preference #886

merged 2 commits into from
Jun 16, 2020

Conversation

NiklasMerz
Copy link
Member

Platforms affected

iOS

Motivation and Context

This adds a prefrence to the webview which is useful for iPads. Apple introduced a setting which by defaults changes the useragent of iPads from iPad to Macintosh to provide a "desktop browsing experience". The new preference allows to change the default value.

See original issue from IAB: apache/cordova-plugin-inappbrowser#687

Description

Changed like : apache/cordova-plugin-inappbrowser#688

Documenation: apache/cordova-docs#1083

Testing

Automatic tests still pass. I found no automatic tests for preferences at build time.

I created a blank new app, added this platform and checked navigator.userAgent while changing the preference. It should be iPad for mobile and Macintosh for desktop.

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

@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2020

Codecov Report

Merging #886 into master will increase coverage by 1.89%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #886      +/-   ##
==========================================
+ Coverage   74.40%   76.30%   +1.89%     
==========================================
  Files          13       13              
  Lines        1676     1941     +265     
==========================================
+ Hits         1247     1481     +234     
- Misses        429      460      +31     
Impacted Files Coverage Δ
bin/templates/scripts/cordova/lib/prepare.js 86.60% <0.00%> (+1.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 02448ce...d27a366. Read the comment docs.

@dpogue dpogue added this to the 6.0.1 milestone Jun 11, 2020
Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

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.

6 participants