Comments (11)
I'm leaning towards more id-like names and thus the data consumers can decide how to display the user agent's names in their application.
To avoid mistakes (like spelling/duplicates), I think we should validate the user agent's IDs. I think that a compat entry should not require listing all of them (maybe one user agent entry is required but not more). So each of the following is optional, but at least 1 of them would be required.
Proposal for user agent IDs:
android_webview
android_chrome
android_firefox
android_opera
chrome
edge
ie
opera
safari
ios_safari
ios_firefox
ios_opera
nodejs
servo
Sometimes needed, due to OS-specific support limitations:
windows_chrome
macos_chrome
windows_firefox
macos_firefox
etc.
This avoids the terms "mobile" or "desktop" and focuses on the OS and/or environment. If data consumers want to display user agents in categories like "mobile", "desktop", "server" or something else, then they can do the mapping based on our user agent IDs themselves.
from browser-compat-data.
I think we have consensus about have ids here. I will try to have them in a separate JSON file so that we can extend it with classification data in the future and also to see if I can use this new files to validate the browser compat json files (as proposed by @Elchi3)
from browser-compat-data.
The valid user agent IDs could be another JSON file in the repository, perhaps as a map of IDs to "friendly" names, with classification data (desktop, engine name, etc.), version numbers, etc.
Another benefit of using id-like names is that you can more easily get them into class names, to allow CSS styling on HTML representations, or transform them into filenames for icons, images, and other JSON files.
from browser-compat-data.
Can you add android_webview to your list? Android is way too overloaded. I have for the last two years been treating 'Android' as a catch-all for all the various Android flavors before android used Chromium for it's webview. It's also separate from android_chrome because there are differences between that and the webview, particularly where service workers are concerned.
from browser-compat-data.
Thanks Joe, that makes sense to me.
I've updated my list above to replace android with android_webview.
from browser-compat-data.
When I broached this subject 2 years ago I was told we couldn't get rid of android because people were still using it. I don't object to getting rid of android, but you might get some pushback from within your own house.
from browser-compat-data.
Rude of me not to say thank you. Thank you.
from browser-compat-data.
Responding late on this. Just wanted to say that the user agent IDs should be explained somewhere (e.g. in the MDN meta-documentation). Especially the different Android flavors are hard to distinguish.
Sebastian
from browser-compat-data.
+1
Give me a location and I'll write descriptions of the Android flavors.
from browser-compat-data.
Sorry for the long delay again! Too busy lately.
I'd say the user agent IDs could be added to the Compatibility tables guideline.
If someone has a better place, please post it here!
Sebastian
from browser-compat-data.
IDs won here, see in the new schema: https://github.com/mdn/browser-compat-data/blob/master/compat-data.schema.json#L65
Let's open new issues about adding other UAs or changing what the new schema does. Thanks for everyone's valuable input here!
from browser-compat-data.
Related Issues (20)
- {svg.global_attributes,css.properties}.{buffered-rendering,color-rendering} - missing
- javascript.operators.import_meta.resolve - latest Node also returns a string
- api.Navigator.share - Now supported on Chrome on macOS
- svg.elements.a.xlink_href - <SUMMARIZE THE PROBLEM>fariborz HOT 2
- api.History.pushState - <SUMMARIZE THE PROBLEM> HOT 1
- html.elements.input.type_time - widget is not shown on mac on firefox 128 HOT 1
- api.Document.Document - <SUMMARIZE THE PROBLEM> HOT 1
- css.properties.backdrop-filter - SVG filters not supported in Firefox or Safari
- api.TextDecoder - <SUMMARIZE THE PROBLEM> HOT 1
- Seems reasonable, we could add `Reserved` together with `MadeToOrder` as proposed in #3183 (which also seems related to #2926)
- `api.HTMLFormElement` - `api.HTMLFormElement` precedes support for `<form>` HOT 1
- css.properties.font-variant-position - problems with this compatibility data - not working on chrome/edge 127
- api.Geolocation - <SUMMARIZE THE PROBLEM> HOT 1
- `css.properties.cursor` - Conflicting reports about support on iOS HOT 1
- api.KeyboardEvent.key - may be undefined
- http.headers.Expect-CT - should be deprecated
- A
- http.headers.Access-Control-Allow-Headers - <SUMMARIZE THE PROBLEM> HOT 1
- api.MediaDevices.selectAudioOutput - <SUMMARIZE THE PROBLEM> HOT 2
- SVG attributes - add spec URLs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browser-compat-data.