-
Notifications
You must be signed in to change notification settings - Fork 77
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
Make Sec-CH-UA-Form-Factor a list, add meanings #343
Conversation
This adds non-normative meanings for the suggested values.
"Automotive", "Mobile", "Tablet", "TV", "VR", or "XR". Order of the values | ||
in the list is not significant. | ||
|
||
<div class="note" heading=""> |
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.
This heading=""
seems to be required in order to get the green "NOTE:"?
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.
That's weird! You can also just do:
Note: ....
and it'll generate the markdown for you.
https://speced.github.io/bikeshed/#notes-etc does reference the heading attribute. But if what you have works, I'm not particularly worried about it.
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.
Should this be a note at all? It seems like important normative content
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.
My understanding was that the language is too vague to be normative, and making it more precise would be counter-productive. But I definitely can't afford an editor's hat, so I'll defer to those with better headware.
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.
I don't have strong opinions one way or the other here, and it's easy to swap between the two.
index.bs
Outdated
* "VR" refers to an immersive, gesture-oriented device. | ||
* "XR" is similar to "VR" but includes devices that integrate with the | ||
environment around the user. |
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.
I'm not really sure how to distinguish these two. Maybe this is an example where the list would be useful ("XR" for XR things that aren't VR goggles and "XR, VR" for things that are VR goggles).
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.
I think that's one way we could add it in if we hear of use cases for "just VR". We could start conservative like @nielsbasjes suggests at first, WDYT?
index.bs
Outdated
typically carried on a user's person. | ||
* "TV" refers to a large, multi-user device desiged primarily for viewing videos. | ||
* "VR" refers to an immersive, gesture-oriented device. | ||
* "XR" is similar to "VR" but includes devices that integrate with the |
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's not called AR?
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.
I don't know! A brief search found a page explaining that AR, VR, and a few other R's are sub-categories of XR. I'm happy to be educated here :)
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.
When looking for some understanding on the difference I found this page which says
Extended Reality includes all its descriptive forms like the Augmented Reality (AR), Virtual Reality (VR), Mixed Reality (MR). In other words, XR can be defined as an umbrella, which brings all three Reality (AR, VR, MR) together under one term, leading to less public confusion.
So my current understanding is that XR
is intended to include AR
, VR
and MR
.
So either we should have (XR
) OR (AR
, VR
, MR
).
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.
That sounds pretty good to me @nielsbasjes. Why don't we start with XR, and if someone claims to have a different use case for VR (or MR)... we can consider adding it.
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.
Got linked to this by a colleague. XR is generally used as a catchall for the spectrum of devices from Augmented Reality to Mixed Reality to Virtual reality, hence WebXR and OpenXR are named as such. If you are trying to differentiate those kinds of devices from other kinds, that makes sense. If you are trying to differentiate head mounted displays (HMDs) from non HMDs, this gets a bit trickier. XR typically includes phone AR and other non-head mounted spatial computing form factors.
@miketaylr I'd be interested in your opinions here, and would appreciate it if you can draw the attention of other interested stakeholders. |
Will try to get this reviewed before EOW! (was OOO 😎 🙇 ) |
Just to introduce myself: I'm an IT Architect at a really large online retailer. I have been doing large data processing for ~25 years and I have been doing large scale webanalytics for about 18 years now. I have written several opensource libraries to support these kinds of usecases and I have contributed to (just about) all Apache Software Foundation "Big Data" projects. In light of the definitions of these ClientHints; this project of mine is most relevant to mention: Yauaa https://yauaa.basjes.nl/ (https://github.com/nielsbasjes/yauaa). This library tries to parse and analyse the useragent and clienthints to make this available to (usually) analytics systems. Looking at the usecases of the output of Yauaa at the place where I work I see some things that would really benefit from having good values in the Sec-CH-UA-Form-Factor header. Disclaimer: I have NOT discussed any of this below with any of my colleagues; This is all on me. Essentially the key question is about what kinds of devices should the website work on and which variant of the website should we send to the visitor that just arrived. Looking at the Client Hints the As I mentioned here there is great diversity you could include in a header like this. But having too much detail would make it a fingerprinting feature. So just let me propose how I would approach this and hear what you think. I need a clear indicator for:
I'm in doubt if "How mobile" the device is (like wall mounted, handheld, vehicle mounted) would add any value to this. Note that some of these dimensions are not independent: So a watch, phone and tablet are almost always touch screens for example. I did some more digging about what VR, AR and MR really mean and on this (Dutch, sorry) site they explained with some images https://cadcompany.nl/blog/vr-ar-en-mr-verschillen/ My summary:
Now all of this does NOT mean you are using a headset. To give an example the kids app created for my work is a clear example of MR that is intended to work on phones and tablets as demonstrated in this video https://youtu.be/fZZCAs4G9Zg?t=36 So when the key question is "which content should we show" the key question becomes: Can the device mix the real world and the virtual world? My initial proposal for this header where I'm trying to stay at ScreenType indicator: s="ScreenType" With allowed values:
Interaction indicator: i="InteractionType" With allowed values:
Discussion: Perhaps "Game" and "Remote" should be merged to "Joystick"? Attention indicator: a="AttentionType" With allowed values:
Examples: Watch: s="Watch";i="Touch";a="High" I would set the standard to require all 3 always and given the intended usecase |
Additional thought: |
Additional: eInk screens should be clear. No colors, no animations, ... |
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.
LGTM! Let's chat about removing VR then land this.
index.bs
Outdated
typically carried on a user's person. | ||
* "TV" refers to a large, multi-user device desiged primarily for viewing videos. | ||
* "VR" refers to an immersive, gesture-oriented device. | ||
* "XR" is similar to "VR" but includes devices that integrate with the |
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.
That sounds pretty good to me @nielsbasjes. Why don't we start with XR, and if someone claims to have a different use case for VR (or MR)... we can consider adding it.
"Automotive", "Mobile", "Tablet", "TV", "VR", or "XR". Order of the values | ||
in the list is not significant. | ||
|
||
<div class="note" heading=""> |
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.
That's weird! You can also just do:
Note: ....
and it'll generate the markdown for you.
https://speced.github.io/bikeshed/#notes-etc does reference the heading attribute. But if what you have works, I'm not particularly worried about it.
index.bs
Outdated
* "VR" refers to an immersive, gesture-oriented device. | ||
* "XR" is similar to "VR" but includes devices that integrate with the | ||
environment around the user. |
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.
I think that's one way we could add it in if we hear of use cases for "just VR". We could start conservative like @nielsbasjes suggests at first, WDYT?
@nielsbasjes really appreciate your input! |
My current view of this header is that is an indication on the kind of content the device/agent the user has can handle. |
The goal for this header (the way I see it) is that it tells the website what the device/agent the user has can handle. This is also what my (bit too long) response earlier was about:
Do you guys have a similar goal/mindset for this header or do you have something completely different in mind? |
@nielsbasjes that's great input -- thank you! I appreciate that you've broken things into a lower-level ontology, and that feels like the right way to go here: a few well-defined bits of data that a site can use to make its own decisions about what kind of content to serve, in a manner likely to continue to work in the future when new forms of user-agents are introduced. That said, it's quite different from what I've proposed in this PR. Would you mind creating an issue to continue discussion, perhaps copy/pasting some of the text you've written above? I'll work to pull in some more feedback, and as that develops decide whether to merge or abandon this PR, and whether to create a PR implementing something closer to your suggestions. |
- Remove "VR" (as it is encompassed by XR) - Remove "TV" (as there is no current use-case for this value) - Include non-normative language around what a form-factor is and what the allowed values mean. This specifically refers to user interaction, as distinguished from screen-size or other physical aspects of the device.
OK, I've updated this based on the conversation in #344:
Please let me know what you think. |
If this is close to being committed can you update the PR description? |
This looks very good to me. Given that a new value is valid if "that users interact with in a meaningfully different way" then I propose 2 additions because to me they are "meaningfully different":
Also I think it would be a good idea to explicitly define approximate screen sizes in the documentation (similar to what I have done here https://yauaa.basjes.nl/expect/fieldvalues/#deviceclass ) My personal opinion is that the term "Mobile" is vague; I would use "Phone". Proposal:
|
Thanks! I had chosen "Mobile" to try to indicate that I'll add Watch and EInk as options, and include screen size descriptions. I'll also clarify that values should be given as written (including capitalization) to avoid providing additional fingerprinting entropy. |
I'm Dutch and here the terms "Telefoon" and "Mobieltje" are used by many people interchangeable. The online shop I work for shows them as Smartphone to the customers. So calling it "Phone" is not a US term from where I'm standing. |
Still LGTM :) |
I've had some positive private reactions, and nothing suggesting a change, so I'm going to merge this as-is. |
SHA: 6bcecb6 Reason: push, by miketaylr Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Seems like this was missing from the actual commit? @djmitche |
Should https://wicg.github.io/ua-client-hints/#dom-uadatavalues-formfactor be a |
Both good points. I'll make a new PR. |
This
Preview | Diff