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)
- [low] css.properties.hyphens - extraneous line (pt-BR)
- Revert #22250 ? HOT 1
- light-dark() - Already supported in Safari TP
- css.properties.display - no compatibility information for run-in
- api.RTCStatsReport.type_inbound-rtp.nackCount - reported by at least Safari for iOS 17.1.2 HOT 9
- css.selectors.hover - Opera and Chrome bug when scrolling
- css.selectors.disabled - Edge recognise fieldset:disabled
- api.PointerEvent.pressure - Not supported in any Windows browser
- css.properties.justify-content - `safe` and `unsafe` keywords for `<overflow-position>` in Safari HOT 3
- text-align values (left, center and right) mistakenly marked as deprecated and non-standard? HOT 2
- api.MIDIAccess - <SUMMARIZE THE PROBLEM> HOT 1
- css.properties.overflow-* - Merge "overlay" value into "auto"
- http.status.404
- http.status.404 - <SUMMARIZE THE PROBLEM> HOT 1
- firefox support is not available and throwing error on it fedcm HOT 1
- _ HOT 1
- CSSStyleSheet - Not supported on iOS HOT 2
- html.manifest.categories - Update Safari Support for 'categories' Manifest Member to Include Safari 17.4
- javascript.builtins.Intl.NumberFormat.NumberFormat - roundingMode firefox compatibility version seems wrong HOT 2
- http.headers.Permissions-Policy - <SUMMARIZE THE PROBLEM> HOT 1
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.