New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 678047 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 1
Type: Bug

Blocked on:
issue 693789
issue 693794
issue 693800
issue 700569
issue 700571

Blocking:
issue 692303
issue 713212



Sign in to add a comment

Unable to switch back to mobile view

Project Member Reported by jainabhi...@chromium.org, Jan 3 2017

Issue description

Chrome Version: 55.0.2883.79
OS: iOS 10.0.2

What steps will reproduce the problem?
(1) Open google.com
(2) Switch to desktop mode (Click Request Desktop Site)
(3) Try and switch to mobile view

What is the expected result?
User should be able to switch back to mobile view

What happens instead?
Button 'Request Desktop Site' is greyed out.
Refreshing the page does not change site to mobile view either. At this point as a user I have no idea on what I can do to switch back to mobile view.

I was able to replicate this issue after reviewing a feedback spike from users on M55. We also have some small unverified feedback from android users as well.
 
Summary: Unable to switch back to mobile view (was: Unable to switch back to desktop mode)
Cc: hongchic...@chromium.org eugene...@chromium.org
There are two ways of returning to mobile view at the moment:
1) Close the tab
2) Press the back button until you return to a page that isn't in the desktop view. If the user has navigated to multiple pages since turning on desktop view, the back button will need to be pressed the same number of times (until a non-desktop view page is shown).

We should move to a toggle model (as seen on Android).
Cc: mard...@chromium.org
Cc: pschaffner@chromium.org
Cc: pinkerton@chromium.org rohitrao@chromium.org
+ Pinkerton and Rohit to weigh in

AFAIK, this is WAI. It tripped many times and I agree that it's not intuitive and we should move to a toggle model but this might not be straightforward from the eng or UX side at this point.

Jason: You could long press the back button also and pick a URL from before turning on desktop view.
Mardini, do you think it's ok that iOS is different from Android?
It's ok to be different from Android if there is a good reason for the divergence. 

For this particular case, as I mentioned in #5, Chrome iOS behaviour is not intuitive and it has tripped me many times. If we could move to a toggle model like Android, we should. Problem will be scoping/prioritizing AFAICT.
Cc: justincohen@chromium.org
+Justin as well

This was intentional behavior, but I don't remember exactly why.  It may be because a lot of sites used to redirect you to a separate desktop site when they saw a desktop useragent.  In those cases, turning "request desktop site" off wouldn't actually do anything, because the user was now explicitly on a desktop URL.

What happens when you uncheck the box on android?  Do you usually get back to a mobile page, even if you've navigated to another page?  I'm sure we can convert the setting to a toggle, it just might not always do what the user wants.  (This may also be a case where websites have gotten more reasonable over the past 5 years, so this is now more likely to work than not.)
In the past it's been a product decision to not have a toggle.  With a toggle or back-button to disable there will always be failure cases since there's no actual standard way to do this.

See  crbug.com/135300  and b/6759775
Justin, do you know what kind of failure cases are going to occur? Returning to Mobile Version can probably be done with these 2 steps:
1.) Change UA back to mobile
2.) Call reload on WKWebView

Unfortunately neither  crbug.com/135300  nor b/6759775 explain the reason why this bug is WAI.
eugenebut@ it depends on the web site.  In the past some sites redirect to an m.domain, and ignore the user agent.

Per b/6304222, the answer appears to be it's how product preferred the interaction to work.
I believe the desired and intuitive behaviour here is to toggle the menu item. 
i.e.  Request Desktop Site <==> Request Mobile Site 
Do we want the same checkbox ui?
If we did go with an "on/off" UI, I don't want it to be a checkbox, but a switch like the rest of iOS uses. Checkboxes (as they exist on desktop and Android) aren't part of the iOS design language. 
The Android design doc is here (with detailed cases): go/acsko
In short, the solution in #10 would work if we maintain the current behavior of going back to a mobile page negating the desktop view.

UI-wise either the behavior in #12 or changing the text to "See Desktop Site" with a switch looks fine. In the current state, a greyed out menu item is more confusing than simply removing the option altogether.  
Cc: jasonkliu@chromium.org
I agree with Pink in #14. No checkboxes. Are there any objections to #12? 
What's the eng level of effort to get this done?
>> What's the eng level of effort to get this done?
"Request Desktop Site <==> Request Mobile Site" approach (no checkboxes, no switches) would take at least a week. Desktop UA code is in pretty bad shape after unforking and requires refactoring before making any fixes there.
Thanks, Eugene. 
Pink: Let's put it on the roadmap and see where it fits priority-wise.
Status: Available (was: Untriaged)
My opinion on the UX:

Menu items that toggle their text are not good from a usability perspective. The user never knows if the menu displays the current state or the state it will transition to when activated. This has been demonstrated over 30 years of Mac UI, and I don't expect this to be much different. For that reason, the long term UX of this should be a toggle button, not changing the text.

However, if changing the text can be done quickly and easily, we can improve this in the short term while doing it "right" later for Bijou. I guess I'm ok with that.

Remember that about 1M users a week use this menu item, so we should strive to get it right.
Cc: liaoyuke@chromium.org
+ Yuke

If you have bandwidth, this would be a great candidate for moar PE fixes. Thank you.
I'll definitely take a look. Thank you for sharing this with me!
Owner: liaoyuke@chromium.org
Status: Started (was: Available)
Since nobody has taken it yet, I'll look into it to see if I can do something.
I've created a doc for this. Please take a look if you are interested.

https://docs.google.com/document/d/1BMXD7CE91Z2TDuZG5fpX7sIWhUSl8KQWQM0BElC65Mc/edit#

Thanks!
Blocking: 692303
Components: -UI>Settings UI>Browser>Navigation
Blockedon: 693789
Blockedon: 693794
Blockedon: 693800
Project Member

Comment 31 by bugdroid1@chromium.org, Feb 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6e5d49d75e64a08cbe73b4a39bb0a333417f3170

commit 6e5d49d75e64a08cbe73b4a39bb0a333417f3170
Author: liaoyuke <liaoyuke@chromium.org>
Date: Tue Feb 21 04:05:39 2017

[iOS] Refactoring CRWSessionController web user agent code.

This CL refactoring web agent code by moving them from
CRWSessionController to NavigationManager, and updates corresponding
references and unit tests to call methods directly from
NavigationManager instead of CRWSessionController.

This CL also introduces NavigationInitiationType, consisting of
USER_INITIATED and RENDERER_INITIATED, to avoid passing boolean
values as parameters to C++ functions, which is error prone and
un-maintainable.

BUG= 678047 

Review-Url: https://codereview.chromium.org/2698773002
Cr-Commit-Position: refs/heads/master@{#451698}

[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/chrome/browser/native_app_launcher/native_app_navigation_util_unittest.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/chrome/browser/tabs/tab_unittest.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/navigation/crw_session_controller.h
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/navigation/crw_session_controller.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/navigation/crw_session_controller_unittest.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/navigation/navigation_item_impl.h
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/navigation/navigation_item_impl.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/navigation/navigation_manager_impl.h
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/navigation/navigation_manager_impl.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/navigation/navigation_manager_impl_unittest.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/net/crw_ssl_status_updater_unittest.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/public/navigation_manager.h
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/public/test/fakes/test_navigation_manager.h
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/public/test/fakes/test_navigation_manager.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/web_state/ui/crw_web_controller.mm
[modify] https://crrev.com/6e5d49d75e64a08cbe73b4a39bb0a333417f3170/ios/web/web_state/ui/crw_web_controller_unittest.mm

Project Member

Comment 32 by bugdroid1@chromium.org, Mar 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11

commit ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11
Author: liaoyuke <liaoyuke@chromium.org>
Date: Tue Mar 07 22:05:39 2017

[iOS] Add Request Mobile Site cell to tools menu

In the current design of Chrome for iOS, once the user pressed the
"Request Desktop Site", there is no corresponding "Request Mobile Site"
to switch back, which is counter-intuitive and not user-friendly.

This CL adds "Request Mobile Site" cell to the tools menu by placing it
right next to "Request Desktop Site" cell, and make it invisible.

BUG= 678047 

Review-Url: https://codereview.chromium.org/2714813002
Cr-Commit-Position: refs/heads/master@{#455238}

[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/app/strings/ios_strings.grd
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/commands/ios_command_ids.h
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/stack_view/stack_view_controller.mm
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/toolbar/toolbar_controller.h
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/toolbar/toolbar_controller.mm
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/tools_menu/BUILD.gn
[rename] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/tools_menu/tools_menu_configuration.h
[rename] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/tools_menu/tools_menu_configuration.mm
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.h
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm
[add] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller_unittest.mm
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/tools_menu/tools_popup_controller.h
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/ios/chrome/browser/ui/tools_menu/tools_popup_controller.mm
[modify] https://crrev.com/ea9f3ee694c2244bdec23b85bdf9ee4a26e95e11/tools/metrics/actions/actions.xml

Blockedon: 700569
Blockedon: 700571
A user appstore review which is another indicator that we should address this. 
Screen Shot 2017-03-25 at 08.29.41.png
32.3 KB View Download
Project Member

Comment 36 by bugdroid1@chromium.org, Apr 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fbb84a320edb0492eb645530d3b20e9c5ab454ad

commit fbb84a320edb0492eb645530d3b20e9c5ab454ad
Author: liaoyuke <liaoyuke@chromium.org>
Date: Fri Apr 07 18:26:40 2017

Create new pending item if UserAgentOverrideOption is not INHERIT.

The original logic in |AddPendingItem| does nothing if the URL of the
pending item is the same as the last committed item, except that the
pending item is added due to form submission.

However, this doesn't work with the new Request Desktop/Mobile Site
because the new functionality requires adding a pending item with the
same URL, but different UserAgentType.

This CL re-factors |AddPendingItem| so that a pending item with the
same URL can be added successfully as long as the
UserAgentOverrideOption is not INHEIRT.

This CL also adds corresponding unit tests to test the logic.

BUG= 678047 

Review-Url: https://codereview.chromium.org/2794723002
Cr-Commit-Position: refs/heads/master@{#462932}

[modify] https://crrev.com/fbb84a320edb0492eb645530d3b20e9c5ab454ad/ios/web/navigation/crw_session_controller.h
[modify] https://crrev.com/fbb84a320edb0492eb645530d3b20e9c5ab454ad/ios/web/navigation/crw_session_controller.mm
[modify] https://crrev.com/fbb84a320edb0492eb645530d3b20e9c5ab454ad/ios/web/navigation/crw_session_controller_unittest.mm
[modify] https://crrev.com/fbb84a320edb0492eb645530d3b20e9c5ab454ad/ios/web/navigation/navigation_manager_impl.mm
[modify] https://crrev.com/fbb84a320edb0492eb645530d3b20e9c5ab454ad/ios/web/navigation/navigation_manager_impl_unittest.mm
[modify] https://crrev.com/fbb84a320edb0492eb645530d3b20e9c5ab454ad/ios/web/net/crw_ssl_status_updater_unittest.mm

Project Member

Comment 37 by bugdroid1@chromium.org, Apr 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ab36201c67153ba617a6a9817e22bc3d303f927

commit 6ab36201c67153ba617a6a9817e22bc3d303f927
Author: liaoyuke <liaoyuke@chromium.org>
Date: Wed Apr 12 16:10:07 2017

Implement request mobile site.

This CL implements the "Request Mobile Site" functionality to enable
switching from the desktop version of a page to mobile version.

BUG= 678047 

Review-Url: https://codereview.chromium.org/2789433006
Cr-Commit-Position: refs/heads/master@{#464046}

[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/tabs/BUILD.gn
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/tabs/tab.h
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/tabs/tab.mm
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/ui/tools_menu/BUILD.gn
[add] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/ui/tools_menu/request_desktop_mobile_site_egtest.mm
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/ui/tools_menu/tools_menu_configuration.h
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/ui/tools_menu/tools_menu_model.h
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/ui/tools_menu/tools_menu_model.mm
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller.mm
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/ui/tools_menu/tools_menu_view_controller_unittest.mm
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/chrome/browser/ui/tools_menu/tools_popup_menu_egtest.mm
[modify] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/testing/BUILD.gn
[rename] https://crrev.com/6ab36201c67153ba617a6a9817e22bc3d303f927/ios/testing/data/http_server_files/user_agent_test_page.html

Status: Fixed (was: Started)
Blocking: 713212

Sign in to add a comment