Coder Social home page Coder Social logo

Comments (11)

Elchi3 avatar Elchi3 commented on April 28, 2024 2

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.

teoli2003 avatar teoli2003 commented on April 28, 2024 2

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.

jwhitlock avatar jwhitlock commented on April 28, 2024 1

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.

jpmedley avatar jpmedley commented on April 28, 2024

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.

Elchi3 avatar Elchi3 commented on April 28, 2024

Thanks Joe, that makes sense to me.
I've updated my list above to replace android with android_webview.

from browser-compat-data.

jpmedley avatar jpmedley commented on April 28, 2024

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.

jpmedley avatar jpmedley commented on April 28, 2024

Rude of me not to say thank you. Thank you.

from browser-compat-data.

SebastianZ avatar SebastianZ commented on April 28, 2024

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.

jpmedley avatar jpmedley commented on April 28, 2024

+1

Give me a location and I'll write descriptions of the Android flavors.

from browser-compat-data.

SebastianZ avatar SebastianZ commented on April 28, 2024

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.

Elchi3 avatar Elchi3 commented on April 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.