-
Notifications
You must be signed in to change notification settings - Fork 30
MOBILE-2278: Add support for iOS WKWebView #8
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
MOBILE-2278: Add support for iOS WKWebView #8
Conversation
RavenNumber of Findings: 0 |
|
Current coverage is 89.87% (diff: 100%)@@ master #8 diff @@
==========================================
Files 2 2
Lines 66 79 +13
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 58 71 +13
Misses 8 8
Partials 0 0
|
FYI @clairesarsam-wf |
_safari, | ||
_internetExplorer | ||
_internetExplorer, | ||
_wkWebView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clairesarsam-wf @robbecker-wf what do you guys think about detecting these "sub" type browsers like WkWebView is for the most part the same as Safari, similar to Rob's question about separating the detection of IE vs Edge from earlier. When WKWebView is detected, should isSafari return true as well as isWKWebView?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@travissanderson-wf We could do that but the issue is if we return true for isSafari
in the WKWebView
the there would not be a version because the Safari
and the WKWebView
have different version strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could still have a version, currently it would be different depending on if it was parsed out by _Safari or _WKWebView, I just mean we could change the getter for isSafari = this == _safari || this == _wkWebView
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I could see it being useful to know if you're running in a webview.
|
||
script: | ||
- pub get | ||
- pub run dart_dev format --check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@greglittlefield-wf says UIP does not use the dart formatter so it has been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does that have to do with this repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @travissanderson-wf, I was under the impression that UIP was now maintaining this repo.
Brian was running into issues with builds failing due to the formatter enforcing an 80 line length, so I told him to just remove the formatter step from the build as opposed to fixing the issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, it's presently officially owned by CP but so far it's just been me and I don't expect a whole lot of churn here TBH. In the interest of consistency, I'd prefer to keep dartfmt enforced. It's pretty easy to fix the build with ddev format
:)
I'm good with this as-is but would be curious to hear others' input on whether WkWebView should report as both Safari and WKWebView or only WKWebView. My suspicion is that code checking for Safari should probably also run when you're in a WKWebView and so it would be desirable as the consumer if isSafari checks would be true in that case. Special cases for WKWebView could still explicitly check for isWKWebView. |
I'm of the opinion that isSafari should return true for wkwebview and a webview property it is a more specific version of the main browser type. For instance, it may be possible that: Not to bikeshed, but perhaps we should just renamed wkWebView to just webView ? UPDATE: To be clear, I'm ok with this PR as-is, just my 2c. |
Wk is specific to and short for WebKit so it would be mutually exclusive with Chrome as currently defined
|
@robbecker-wf @travissanderson-wf I think that it would be good to detect webviews for sure but in a different ticket. |
+1 |
@brianblanchard-wf can you add a QA p1 (assuming this fixes your issue)? |
@kerbyseeley-wf is also taking a look at it from a datatables perspective |
+10 as far as datatables is concerned. Ran a smoke test in Chrome/Firefox/Safari/IE. |
QA +1 |
rosie |
RM +1 Manually verified dependencies and configured correctly to scan for them |
Description
Version/X.X.X
string in the string returned fromnavigator.appVersion
when running within aWKWebView
.What Was Changed
isSafari
Browser
subclass for theWKWebView
@travissanderson-wf @dustyholmes-wf @kerbyseeley-wf