Closed
Bug 1109675
Opened 11 years ago
Closed 10 years ago
Implement 'Request Desktop Site'
Categories
(Firefox for iOS :: Browser, defect)
Tracking
()
VERIFIED
FIXED
1.3
Tracking | Status | |
---|---|---|
fxios | 2.0+ | --- |
People
(Reporter: st3fan, Assigned: n0-0ne+mozilla)
References
Details
(Whiteboard: [ios9][needstrings])
Attachments
(2 files, 1 obsolete file)
Find out if we can do the 'Request Desktop Site' thing that Safari has.
(Assuming that is something we will want.)
Comment 1•11 years ago
|
||
It is possible. Placing the following code in AppDelegate will allow you to change the user agent. (I don't know if this is the best or only way)
NSUserDefaults.standardUserDefaults().registerDefaults(["UserAgent" : "Custom Agent"])
for example I can load the Facebook desktop site like this:
NSUserDefaults.standardUserDefaults().registerDefaults(["UserAgent" : "Macintosh; Max OS 10_10"])
Reporter | ||
Comment 2•11 years ago
|
||
Aaron this is a good method to globally change the user agent. I'm not sure if it is the best way to go for Request Desktop Site though since we cannot do this per tab. Would you mind doing an experiment to see if we can change this value for individual WKWebView instances?
(In reply to Aaron Raimist [:aaronraimist] from comment #1)
> Created attachment 8539821 [details]
> User agents from Safari and Chrome on iOS
>
> It is possible. Placing the following code in AppDelegate will allow you to
> change the user agent. (I don't know if this is the best or only way)
>
> NSUserDefaults.standardUserDefaults().registerDefaults(["UserAgent" :
> "Custom Agent"])
>
> for example I can load the Facebook desktop site like this:
>
> NSUserDefaults.standardUserDefaults().registerDefaults(["UserAgent" :
> "Macintosh; Max OS 10_10"])
Flags: needinfo?(aaronraimist)
Updated•11 years ago
|
Blocks: iosbrowsingui
Updated•10 years ago
|
tracking-fennec: --- → ?
Updated•10 years ago
|
tracking-fennec: ? → -
Updated•10 years ago
|
Summary: Find out if we can do the 'Request Desktop Site' thing that Safari has → Implement 'Request Desktop Site'
Updated•10 years ago
|
Assignee | ||
Comment 3•10 years ago
|
||
Since this ticket is targeting iOS9, we could simply take advantage of WKWebView's customUserAgent property. The attached patch is meant as a prrof of concept and applies a custom user agent of "Macintosh; Max OS 10_10" to each newly created tab which forces all content to be loaded in the desktop representation.
tracking-fennec: - → ---
Assignee | ||
Comment 4•10 years ago
|
||
Are there any UI mocks for how to opt in and out of desktop mode?
Flags: needinfo?(sarentz)
Comment 5•10 years ago
|
||
Comment on attachment 8681865 [details] [diff] [review]
desktop-only.diff
Just making sure some set of eyes sees this as I believe it's on a roadmap.
Attachment #8681865 -
Flags: feedback?(bnicholson)
Reporter | ||
Comment 6•10 years ago
|
||
Thank you Hennes. Please ask :bnicholson for a review. He has this feature on his personal roadmap but I am sure he would happily work with you if you are interested in taking this on.
Do know that we are still in the process of figuring out where the button should go. The UX team is experimenting with a place for 'tools' where things like Request Desktop Site and Find In Page can live.
So this bug may be on hold for a little while until we figure that part out.
Flags: needinfo?(bnicholson)
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(sarentz)
Updated•10 years ago
|
tracking-fxios:
--- → 2.0+
Flags: needinfo?(bnicholson)
Comment 7•10 years ago
|
||
Comment on attachment 8681865 [details] [diff] [review]
desktop-only.diff
Hi Hennes,
When we last talked about this feature, I think the UX was to long-press the reload button to reload the current page with a desktop UA (what Safari does). I think the only visible UI was simply a small bar that floats right above the bottom toolbar that says "Request Desktop Site", which appears after the long press, and disappears when the user lets go. I think Darrin had mockups for this.
For now, a good start would be to simply implement this without any UI. That is, reload with the desktop UA after long-pressing the reload button, then reset the UA to mobile whenever the user navigates away from that page.
Flags: needinfo?(dhenein)
Attachment #8681865 -
Flags: feedback?(bnicholson) → feedback+
Assignee | ||
Comment 8•10 years ago
|
||
Hi Brian,
Thanks a lot for the info. I got a basic version of what you described working in this pull request. I also have a few follow-up questions that I added in the comments of the pull request.
Attachment #8682082 -
Flags: review?(bnicholson)
Updated•10 years ago
|
Attachment #8681865 -
Attachment is obsolete: true
Updated•10 years ago
|
Assignee: nobody → johannesmarbach
Status: NEW → ASSIGNED
Comment 9•10 years ago
|
||
Comment on attachment 8682082 [details] [review]
Pull request
Looking good! Left a few comments in the PR.
Attachment #8682082 -
Flags: review?(bnicholson) → feedback+
Comment 10•10 years ago
|
||
I think for now we want to just use a system action sheet, with one primary action ("Request Desktop Site" or "Request Mobile Site") and a system Cancel item. We lose the one gesture (long-press and then release) for two taps (long-press then tap sheet item) but I think this is fine for now.
Let me know if there are any questions.
Flags: needinfo?(dhenein)
Assignee | ||
Comment 11•10 years ago
|
||
I added the action sheet toggling to the PR.
Comment 12•10 years ago
|
||
See also Bug 1222423, which is worth testing for our iOS implementation.
See Also: → 1222423
Assignee | ||
Comment 13•10 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #12)
> See also Bug 1222423, which is worth testing for our iOS implementation.
I was actually already able to work this out with Brian's help. The web view gives us access to the initial unredirected URL of a page which we use for requesting the desktop (or mobile) presentation.
Updated•10 years ago
|
Attachment #8682082 -
Flags: feedback+ → review?(bnicholson)
Comment 14•10 years ago
|
||
Comment on attachment 8682082 [details] [review]
Pull request
This looks great...thanks for all your work so far! Left a few suggested cleanup comments in the PR, but I think this is about ready to land.
Attachment #8682082 -
Flags: review?(bnicholson) → feedback+
Comment 15•10 years ago
|
||
Comment on attachment 8682082 [details] [review]
Pull request
Awesome, thanks a ton for the patch and all of the follow-up fixes! :)
Attachment #8682082 -
Flags: feedback+ → review+
Comment 16•10 years ago
|
||
Comment 18•10 years ago
|
||
Comment 19•10 years ago
|
||
Backed out v1.x (7ed4b63) due to bug 1228547.
Reporter | ||
Updated•10 years ago
|
Whiteboard: ios9 → [ios9][needs strings]
Reporter | ||
Updated•10 years ago
|
Whiteboard: [ios9][needs strings] → [ios9][needstrings]
Updated•10 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•