Closed Bug 1306198 Opened 9 years ago Closed 6 years ago

[UX] No way to know what user agent will be applied for a device

Categories

(DevTools :: Responsive Design Mode, defect, P3)

49 Branch
defect

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox73 --- fixed

People

(Reporter: karlcow, Assigned: daisuke)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [multiviewport][reserve-rdm][ux])

Attachments

(21 files, 2 obsolete files)

116.49 KB, image/png
Details
98.54 KB, image/png
Details
31.38 KB, image/png
Details
557.43 KB, image/png
Details
300.55 KB, image/png
Details
1.85 MB, video/mp4
Details
20.02 KB, image/png
Details
9.34 KB, image/png
Details
987.31 KB, video/mp4
Details
303.57 KB, image/png
Details
340.50 KB, image/png
Details
102.13 KB, image/png
Details
613.12 KB, image/png
Details
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47.73 KB, image/png
Details
Attached image devices-list
After activating the responsive design mode. The list make the assumption of one device == one browser (which is something we are fighting against). Two issues with the current setup: * The default list doesn't contain any Firefox on Android choice (Ooops). * The list doesn't say which browsers and its version we are talking about (aka Chrome 42 for example)
(In reply to Karl Dubost :karlcow from comment #0) > Created attachment 8795981 [details] > devices-list > > After activating the responsive design mode. The list make the assumption of > one device == one browser (which is something we are fighting against). > > Two issues with the current setup: > > * The default list doesn't contain any Firefox on Android choice (Ooops). The default enabled set was taken from BrowserStack's list[1] for the "Growing Business" segment in bug 1247302 comment 2. Looks like it has changed a bit already since first looked at their data ~8 months ago. For the UA string for each device, I believe we've tried to use whatever the default browser is that ships with the device, at least to have a starting point. Since Firefox for Android is not a default browser (AFAIK) on any device, it happens to mean that it's not represented at the moment. Anyway, I think it would be fine to add a few device entries to cover this case (since they aren't user editable yet). Maybe you know of a few that would be good to include? The device list is maintained at https://github.com/mozilla/simulated-devices, feel free to submit a PR to add them! [1]: https://www.browserstack.com/test-on-the-right-mobile-devices
> * The list doesn't say which browsers and its version we are talking about > (aka Chrome 42 for example) Right, I agree that's confusing especially for UA issues (when you need more than just the device size). Maybe we could show browser's logo next to device name, and when you hover the icon, it could show the browser name and version? I'm trying to think of a way to represent this info without add lots of extra text (the modal UI is already somewhat busy). Helen, any thoughts about this?
Flags: needinfo?(hholmes)
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #2) > Maybe we could show browser's logo next to > device name, and when you hover the icon, it could show the browser name and > version? That sounds like a good compromise. you could have a pop-up infocard for each browser with an icon. Pitching the why this is important: Some JS libraries and CSS will react to different type of parameters and displays a very different site depending on the user agent. It's not only about the form factor (screen size), but also ua string, dpi, touch or not. So having a full picture of what scenario we are in is really helpful. Let me add a couple of screenshots for Opera devtools
Attached image general-view
The general view offers a summary of the settings.
When you add the custom device you can really configure things.
Opera has the same issue about not showing which browser we are talking about.
(In reply to Karl Dubost :karlcow from comment #4) > Created attachment 8796392 [details] > general-view > > The general view offers a summary of the settings. Our plan was to capture this kind of information in the same place, instead of in the device picker itself.
Flags: needinfo?(hholmes)
Summary: List of browser/devices lacks information → No way to know what user agent will be applied for a device
This is related to bug 1297431, which is about the UA _currently_ applied. This bug is more about the UA that _will_ be applied when a device is chosen.
Flags: qe-verify-
Priority: -- → P3
See Also: → 1297431
Summary: No way to know what user agent will be applied for a device → [UX] No way to know what user agent will be applied for a device
Whiteboard: [multiviewport][reserve-rdm][ux]
Bug 1321675 has just landed in Nightly, and along with allowing devices to be added, the device modal also learned how to show the properties of existing devices in a tooltip on hover. I am definitely not saying that's a _good_ UI to show the info at all, but it's more than nothing! :) I'd still eventually like to summarize the UA with an icon.
Product: Firefox → DevTools
Hi Gabriel, do you think this is now fixed since bug 1297431 landed in 64? If so, could you please close this one?
Flags: needinfo?(gl)
Honestly, I am not sure since Bug 1297431 is about what UA is applied versus this bug is about what will be applied as described in Comment 8. Forwarding this to Karl to see if this kind of feature is still needed. It is a bit niche of a feature I think, so, I think it is most appropriate if the WebCompat team determines if this is really essential or if we should just close it.
Flags: needinfo?(gl) → needinfo?(kdubost)
Bug 1297431 gives the possibility to give a User Agent on the fly. This is useful. This issue here is a bit different and about pre-recorded profiles. It also depends on expectations for Web developers in general (apart of webcompat team). Basically Websites currently offer different behaviors on mobile, tablets, touch screens, depending on the user-agent string and a couple of other things. Different behaviors mean: * server-side UA sniffing for CSS and JS * client-side UA sniffing for JS Sometimes you will get a totally different UX, user experience, or specific code paths in a JS. In this screenshot for example, I have added * Firefox Mobile on Android * Firefox Tablet on Android (I had to reset recently, but usually I have a longer list of custom profiles. Another pain point being able to export/import a list of profiles will save time ;) I'll open a different issue for this.) If we (Mozilla) want to invite web developers to test a bit more on Firefox Android, they can use remote debugging, but responsive design mode is a quicker path and cover often 80% of the cases. In the next comment, I will address the current list with a screenshot.
Flags: needinfo?(kdubost)
So this screenshot is the current list of devices in Nightly 65. This devices list associates * iOS -> Safari UA * Android -> Chrome UA The issue with this is that testing a website on an Android device is about testing: * Android: - Firefox - Chrome - sometimes other This will lead to very different results in some circumstances outside of the Gecko rendering engine. * iOS - Firefox - Safari This one is a bit funkier. Firefox on iOS is using WebKitView but with a specific UA. This sometimes creates differences in what we receive. Hope it helps.
As for the initial summary [UX] No way to know what user agent will be applied for a device I guess this is indeed solved by Bug 1297431 in the sense that it makes it visible. It addresses my second point in Comment #1, not the first one. I guess my initial summary was… lacking of substance. :) Sorry about that.
To add to that, in bug 1317721 we described that we actually want to switch all UAs to be Firefox on the device (where possible). That will make things at least a little bit more predictable, though I see that other issues remain.
No longer blocks: rdm-web-compat
Blocks: rdm-ux
Blocks: rdm-device
No longer blocks: rdm-ux
Assignee: nobody → daisuke
Status: NEW → ASSIGNED
Attached video ua-prototype.mp4

Hi, I have made the first prototype which shows the browser and os information which the user agent string has.
The changes are the followings:

  • Show the browser and os info on the device menu items.
  • Show the browser and os info on the device list of the popup.
  • Reduce the device list column from 3 to 2 in order to show the text as one line.

Hi! I'd like to hear your opinion about the prototype above.
What do you think??

Flags: needinfo?(victoria)
Flags: needinfo?(pbrosset)
Flags: needinfo?(mbalfanz)
Flags: needinfo?(kdubost)
Attached image browser-list

Daisuke,
Very cool.
I think you can probably drop the parenthesis by making the information glanceable.
https://codepen.io/webcompat/pen/oNNGGyG

That should be easier on the eyes.

Flags: needinfo?(kdubost)

Indeed! Thank you very much for your feedback, Karl-san!

Thanks Daisuke, this looks great!

I agree with Karls comment. Also, we could consider using the icons again similar to the webcompat tool, this might help us to save some space.

Flags: needinfo?(mbalfanz)

Thanks, Martin!
Yeah, it seems that the icon helps to reduce the space. If we introduce icons, I'm wondering how we should show the version. Tooltip? But we are using a tooltip to show the device all info which includes the entire UA string.
And, can we also show the OS as an icon?

Clearing my needinfo on this one as I agree with what has been said so far: this is a great prototype!

Flags: needinfo?(pbrosset)
Attached image image.png

This is looking great, and I like the idea for adding the browser icons!

It would be nice to use icons for the OS as well. Attached tiny mockup for how this could look.

I think it would be fine to add the browser name/version to the beginning of the tooltip (in its own row). The full tooltip could look like this:

Firefox 68 on Android 5
DPR: 3
Touch: True
UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:72.0) Gecko/20100101 Firefox/72.0

(When a version number ends in '.0' we can truncate that part for the top line)

I'll attach the Android and iOS icons separately.

Flags: needinfo?(victoria)

On second thought, do we really need Android/iOS indicators? It seems intuitive enough that everything is Android, besides iPhone (and Nokia?). Is it fine to just have that in the tooltip?

Thank you very much for the mockup, Victoria!
Yep, the mockup and the tooltip idea is great :)
And regarding the OS icon, we don't have to use it for the mobile but may be able to use for other devices such as laptop type (windows, osx, linux and so on?).
I'll proceed using the browser icon at least.
Thanks!

Laptop OS would only show for custom devices, right? Maybe we can follow up in a later patch since it seems like a much less common need.

In fact Laptop OS are parts of the use cases, some issues happens only on certain OSes (it's more rare indeed). So yes please, we need to open another issue if it's not part of the MVP for this one :)

Ah, I see. To clarify, is this mostly an internal WebCompat use case, with custom Laptop entries? In that case, could the OS be indicated in the title of the device? The icon part is what I'm suggesting can come later. I'll check with UX to see if someone might already have a set somewhere.

Attached video prototype-with-icon.mp4

Hi Victoria!
Because I made a new prototype, could you confirm the UI??
I used the icon for browsers, but I changed the order of displaying from device name, os name, icon to icon, device name, os name.
The reason why I changed the order is that the menu to select the device is created by xul menu, then we can't put the icon to except most left place on the menu. So, in order to keep the UI consistency, I changed.
What do you think??

Flags: needinfo?(victoria)

Awesome, this is looking great! Would you mind attaching a hi-resolution screenshot as well? I'll mark up a few minor tweaks to spacing.

Attached image device-settings.png

Thank you, Victoria! I'll attach the screenshots.

Attached image device-selection.png
Attached image selected-device.png
Attached image image.png

Thank you! Attached is some minor spacing tweaks. I forgot to mention that this doesn't actually need to block this work and can be done in a followup polish bug.

A bit more polish re: the OS version numbers:

  • We can remove the trailing zeros from the iOS version numbers
  • Android 8.0.0 can just be 8.0
  • We can remove the parentheses from the numbers
Flags: needinfo?(victoria)

Thank you so much, Victoria!
I will introduce your suggestions!

Depends on D55250

Attachment #9113120 - Attachment is obsolete: true
Attachment #9112490 - Attachment is obsolete: true
Pushed by dakatsuka.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d0a20aae4d2a Introduce user agent parser. r=pbro,mtigley https://hg.mozilla.org/integration/autoland/rev/975949070c3b Show browser and os info which is from the UA in the device list. r=pbro,mtigley https://hg.mozilla.org/integration/autoland/rev/c446bdb23bd1 Show browser and os info on the device menu item. r=pbro,mtigley https://hg.mozilla.org/integration/autoland/rev/d374533152c9 Show device info on device selector button. r=pbro,mtigley https://hg.mozilla.org/integration/autoland/rev/f038e448c900 Change the tooltip of device items in the device modal. r=pbro,mtigley,flod https://hg.mozilla.org/integration/autoland/rev/7800ce1ac4df Add an unit test for user agent parser. r=pbro,mtigley https://hg.mozilla.org/integration/autoland/rev/b7864d9346d5 Add a test to confirm the content of device item in the modal. r=pbro,mtigley
Regressions: 1601243

The Kindle Fire HDX is the only tablet without icon. Is this intended?

The Firefox icon is truncated. Also the decice name no longer fits the device field and is truncated.

Flags: needinfo?(daisuke)
Attached image screen.png

Hello Sören, thank you very much for your reporting!

Regarding Kindle Fire HDX icon:
We support only the following major browsers for now.
https://searchfox.org/mozilla-central/source/devtools/client/responsive/utils/ua.js#7-33
Thus, silk browser is not supported yet.

Regarding the truncated icon and the label:
Thank you for finding this!
I'll file the bug.

Flags: needinfo?(daisuke)
See Also: → 1601853
See Also: → 1601854

Filed

  • Bug 1601853 - Firefox icon is truncated on the device list modal in RDM
  • Bug 1601854 - The device label of the menu button is truncated
No longer regressions: 1601243
Regressions: 1610594
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: