-
-
Notifications
You must be signed in to change notification settings - Fork 703
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
Baseline query #771
Comments
We can add alias for I, honestly, don’t like Baseline, since it looks like too US centric for me. There are no browsers popular in Asia and Africa there. Should we wait a little to see how popular it will be? |
Waiting seems fine to me, especially since users already have the ability to query for those browsers as you described! |
I think an alias would be helpful, as it's already being actively used by web.dev and MDN. However, this could make it harder to support versioned Baseline lists: web-platform-dx/web-features#264 (comment)
According to Statcounter Global Stats, Chrome still has over 70% market share in Asia and Africa. I believe most of the other popular mobile browsers in these regions are based on Chromium, which is already in Baseline.
I'd argue it's already getting popular, considering it's already been added to many articles on web.dev and MDN, and the WebDx Community Group running it already has 2 chairs and 42 other participants from at least 11 organizations. |
This is not really accurate and doesn't carry any weight. The people behind the WebDx Community Group and web.dev and MDN are the same.
Baseline only includes latest 2 Chrome majors, so any Chromium based browser that is a little bit more behind (e.g. Samsung Internet with ±5% market share) is excluded. In reality Baseline excludes a lot more people than it includes.
It's too soon to create an alias as the definition of Baseline isn't even stable yet. At this time Baseline is harmful towards end users and hostile towards browser vendors not included in their list. They are very actively working on a better definition. |
Perhaps there could be separate lists or envs with more relaxed versioning based on usage of release dates of browser versions. |
That is what is being researched in the WebDx community group. |
The definition was updated and in a very specific way. https://web.dev/blog/baseline-definition-update
I don't think Browserslist doesn't know anything about features. Tools like |
@romainmenke how we can select browsers? Can you show an example? I do not see any logic in queries like |
For example with
But I don't see how this can be easily used by developers. |
@romainmenke the browsers you need can be selected by old query like How Baseline criteria be used here to select browsers? I think we can use Baseline only to select features by browsers list, not in opposite way. |
Yeah, exactly. I think this needs to be implemented in individual tools. |
I think I am confusing myself with the overly complex wording of the definition. On second thought I think it is as simple as : List all versions for Safari, Firefox, Chrome of the last 30 months for both desktop and mobile. Is there any practical example where that would yield a different outcome? They did not expand the set of browsers to include options that are popular in non-western regions but they did address this. 30 months is considered to be a proxy metrics that should in practice cover sufficient users, regardless of the actual browser they use. You can still find significant segments that fall outside of this definition. |
Hi folks, hoping to revisit this issue based on current activity around Baseline. As @romainmenke pointed out in December, there's a valuable use case for developers to state a Baseline preference in tools that depend on browserslist. We've already spotted agencies adopting Baseline Widely Available as their cut off point for new web features, but we also want people to be able to adopt a specific Baseline year if it makes sense for them. This makes sure that We're working towards developers looking at their analytics provider and knowing that e.g. 99% of their users are on a Baseline 2021 or later compatible browser. From a syntax POV, there are two possible queries I'd expect to use:
I can definitely see how use case 2 might be problematic, as it's a moving target. But use case 1 seems pretty cut and dry. Those browser versions per year are fixed and easily collated by year using MDN browser-compat-data's release info, as in this snippet. There are considerations around browsers outside of Chrome/Edge/Firefox/Safari, but as @romainmenke pointed out the 30 month window is at least partly intended to address the time it takes for engines to filter through, OSes to update etc. In addition, browser-compat-data has We're happy to collaborate with you on figuring out the best way to make this work, and if there are things missing or which could be simplified in |
Regarding the problem of |
We can use current user’s time and browser’s release date from We already have queries like Can somebody prepare the PR since I am on the JSNation conference? |
I've edited my previous comment to reflect this, but just for the avoidance of ambiguity, the list that fits the criteria of e.g. |
I am not sure. The The question then is:
The first statement aligns with With the first option you can also get weird results. I prefer resolving |
Yes, we've had some more discussion on this in web-platform-dx/web-features#1047 as well. What it boils down to is that "Baseline 2022" isn't a set of browsers, but a set of features. Any feature that was interoperable across the core set of browsers by the end of 2022 is a "Baseline 2022" feature. Any browser version that supports all of those features is Baseline 2022 compatible. So you can say with some certainty that the final release of each of the core browsers in 2022 and all subsequent releases supports all the features in the Baseline 2022 feature set. There are probably also cases where an earlier release of a given browser supports that feature set, because it already supported all the features therein, but we don't have the data ready yet to specify that with certainty. One day in the future, web-features will have all that data, but right now it doesn't, so "final release of specified year" is the safest selector to get all the features you expect. Thanks Romain for taking the time to create a branch. I put together an alternative that accepts two possible config options:
The only current downside is that it doesn't give you all the versions you would expect for Chrome and Firefox on Android because of caniuse-lite missing older versions. But the desktop versions of both browsers are pretty much exactly aligned on features with their Android counterparts, so the desktop versions should act as a guardrail for feature selection in other tools that depend on browserslist. I also haven't written tests and I'm not sure if the grammar is necessary, happy to be advised as this is my first time contributing. |
@tonypconway said:
@romainmenke said:
If that is the official guidance of the |
I think there is an edge case / bug here. If either conditions results in no versions for a given browser, then the most recent release should be returned instead. This covers two cases :
|
In the case of:
As long as the list here is updated to include the new browser in the set, any Baseline query should return at least the latest release of that browser, because the latest release will fall into all of the possible definitions, right? And that's the case for all browsers, including As for:
I don't know exactly what the plan is for such a situation. I think a browser that has been officially discontinued is no longer suitable for inclusion in Baseline, as it would effectively freeze the standard on the final release of that browser. I can't speak with the authority of the web-dx CG, but I imagine the web-dx CG would remove that browser from the core browser set pretty rapidly. For now, it's a hypothetical that depends on Apple, Mozilla, Microsoft or Google deciding to abandon the browser space entirely on at least one major OS which seems... less than likely! So probably not a case we need to worry about addressing right now. But @atopal and @ddbeck may have more to say on the matter. Footnotes
|
I didn't mean a bug with Baseline.
The goal of Baseline is to help users find features which are safe to use. This is not hypothetical, it has already happened :) Say the same thing happens to Chrome, then there will be a gap when market share is still too large to ignore it, while at the same time the latest release might already be quite old. This will be a painful era when standards seem frozen, but that will accurately reflect what is safe to use for developers. Including the latest release as a fallback is the correct representation of this. Eventually this era will come to an end when support drops low enough to remove that browser from the core set. Here it is important to keep in mind that "30 months" is a proxy for market share. Is there is a scenario where we don't want to do this fallback? |
Chiming in here as a maintainer of web-features and Baseline. The summary is that I endorse the Some notes on definitions here, or jump to the end for specific recommendations:
Some recommendations:
(edited: to fix a mistake in the way I described the YYYY approximation) |
@ddbeck is there a scenario where doing a fallback to the last release would be incorrect? In may 2016 (30 months after release) IE11 still had more than 5% market share. Without a fallback people would have suddenly stopped including polyfills for IE after that date. But even before that, this would have been noticeable in Is there any actual harm in including a fallback? (stats: https://www.w3counter.com/trends) |
We can add an error for this |
🤔 Just to make sure we aren't talking about different things. I am mostly concerned about implementation bugs while using examples like IE to illustrate these. A implementation could do:
If no release is found after that point in time the list will be empty. because condition 2 and 3 never trigger. Doing a fallback to the last release ensures that the list is never empty. Also important to keep in mind that Baseline is tracking interop of features. Excluding a browser has a dramatic effect.
Aside : This is maybe already a flaw with having support for Baseline in If a browser outside of the core set requires a specific polyfill it will never be served such a polyfill when developers use You can easily use it one direction, as a proxy to know if something is safe for most developers, most users. |
I think the main harm of a backstop is that it is surprising. If I plug in |
That would never happen, right? We would never return a browser outside of the core browser set and it is the intention to always keep up to date with the core browser set as maintained by the web-dx CG. The case I outlined is something else but I can understand the confusion :) The examples with IE are purely because IE is the most recent example of a major browser that died. If we created Baseline in 2012 it would have included IE. And in early 2015 it might have still included IE because of market share. The backstop would only do fallbacks for browsers in the Baseline set. So if you define |
The power of Browserslist is query combining. We do not need to create very complex rules for Because it is almost impossible to create a logic for Baseline which will work for all cases. |
I like this @ai! |
I will also omit the |
Ah, I see what you mean now. Sorry for my confusion before. I think it's fine for Eventually |
Do we have user stories? Who, how and why will use it?
If you plan to use it in your config, how you can see the full version of config? In the past we added many queries to Browserslist but almost nobody use them. So we need to think about it for next queries. |
I think there are roughly these cases: Case 1: We have a project without specific support requirements. We want tools to help us achieve these vague requirements:
Setting We can adjust where needed after launch if we receive feedback. Case 2: We need to communicate with clients about support requirements and goals. We can say to clients: "We use We want tools to help us realize what was agreed upon with clients:
Case 3: We have an internal tool/project. We want to use the very new features as this project is a good way to gain experience with new tech. Setting I think it is fine to not support this, users can use I started writing a user story for I think that You would only use Does anyone have a user story for |
I highly against using Baseline for “just a default for people who don’t want to go deeper”. Baseline contains only browsers popular in US and this US-centrism is against the core idea of Browserslist (to fight with discrimination people by browsers; like Opera browser was ignored by US). The current
Yes, it is an interesting example. Do we have real cases of it? Maybe somebody mention in slides, etc? The main problem here is that Baseline works in opposite direction—a way to think about features, not browsers. Maybe nobody used it for target browser and we will increase project’s maintenance without giving tool which people use.
BTW, I really like this idea. Often I need an answer for “when this feature was widely available” and not I need to google browser’s versions release dates.
Yes, I think |
The first thing I'll say is: We're currently working with analytics and RUM providers to get Baseline support built into their tools. One of the end goal is that developers can look at a simple report for an existing site and say "oh, if I target So I would broadly agree with @romainmenke 's Case 1 for a totally new site, but I would propose Case 1a for existing sites:
I agree with you that Baseline could be seen as US-centric, especially the original definition, although I don't think that's so much the case since the definition was changed:
As for Case 2, we've already seen web agencies adopting Baseline in their public browser support statement, for example Clearleft. We're also seeing frameworks move to use Baseline as their yardstick for feature adoption, e.g. Nuxt. I've also had a very popular CMS tell me they are interested in using either Baseline Widely Available or a specific year on their documentation pages and in their dev workflow to simplify their current browser support messaging. So in answer to
Yes, people are starting to do this or are waiting for better tools support to do this. Agreed on Case 3, I don't see Finally
Once Ideally, Baseline WA or Baseline YYYY act as both a guardrail to stop you using features that are too new and/or polyfill ones that can be polyfilled, but also to encourage you to use features that you might not have adopted before, provide clarity when you see those features on Twitter/Mastodon/YouTube/tech blogs about whether they're ready for you to use. I'm on parental leave from next Monday until end of August, but I'll be peeking in on this periodically. @ddbeck and @atopal are both around and happy to chime in more. |
@tonypconway honestly, your answer about US-centric problem made me worry even more. Is it possible for Baseline team to speak with different communities to devel a proper rules? I can’t talk for everyone else, because I definitely don’t know enough from browers in different countries.
I agree that webdev platform needs some new standards about target browsers and browser support. But I see in the current approach a very dangerous way to discrimination.
Interesting examples, thanks.
Hm, maybe I know some theoretical case. For instance, you are developing startup which will be available for end-user only next year. It will be better for you to support only latest browser since when the product will be releases, they will be widely available. For instance, I am using Relative Colors in my project for that reason.
But in Browserslist we have |
I agree that the current definition is an improvement but it is not neutral :) Because of the delay in engine version adoption there will still be a gap between Chrome and Samsung Internet. A user with a browser version of Samsung Internet that is 29 months behind will fall outside of the Baseline definition while a user of Chrome with the same delay will not. Same for all the other browsers based on Blink, Gecko and Webkit. The core browsers will always be ahead of the other vendors with the same engines. And the core browsers happen to be the western browsers :) I fully understand @ai's concerns about this and if |
My apologies for taking so long to come back to this and to follow up in Tony's stead. It's been a busy few weeks. 😅 I want to respond to a couple of key things: Tony hinted in this direction, but I'd like to make it really clear: first and foremost, Baseline is a communications tool. I know it won't ever be as precise as targeting some specific set of browsers derived from analytics data for a specific application (assuming it exists—there are lots of developers who won't or can't engage with that). But since it appears on MDN, caniuse, and elsewhere, Baseline can offer something that a more precise "X% of users" can't: a shared terminology for coordination. "X% of users" encompasses lots of nuance and context: which users, how you measure them, what you think of users you can't or won't track, the browser releases that number translates to, and so on. Absent that context, you can't really know when you're talking about the same X% (and odds are you aren't). So even if Baseline doesn't directly capture the audience I'm building for, it can still be a useful tool for collaborating with colleagues as a shorthand. "We are targeting the Baseline YYYY feature set" is rather more portable and transparent than having to do a fresh analysis with your analytics when you see an unfamiliar feature on MDN. That's the chief difference between Second, I appreciate hearing about Baseline's limitations—it's interesting to know which ones folks notice and which ones they don't (and the rarer limitations I didn't even know about!). To briefly acknowledge a raft of issues: there was a very long process to come up with the current definition (it was one of the most meeting-filled 6 months of my career). We considered things like including more browsers or deriving the set of included releases from StatCounter data. I think the governance team still has a lot of interest in increasing Baseline's breadth, but data sources backing that up need to be sufficiently accurate, trustworthy, and transparent. That's just not the world we live in (yet). That said, we put in place a process to periodically review and revise the definition. This is why we don't strongly emphasize the 30-month time horizon: the definition should adapt to changing developer needs and our ability to report on those things. (Someday, I hope we can even de-emphasize the specific browsers—the dream would be for developers to think about the web instead of browsers.) I think we'll eventually get closer to that idealized version of Baseline, tethered closely to usage data and developer surveys and the like. That's also why I'd like to see Baseline get into more places, like browserslist, so that when we do refine what Baseline is capable of (in incremental ways like regular data updates or big ways like new data sources), developers will get the benefits in lots of places at once: their docs, their editor, their build tools, dependencies, and so on. |
I am open to Baseline in Browserslist only when non-Western communities will agree that this communication tools works for them and not only for Western developers speaking between each other. Just ask them to join your discussions (I believe any big team have a lot of people from Chinese-speaking, Latam and Magrib). As I told right now I do not believe that this communication tool was created thinking about this problem. So I believe that right now Baseline will force communication to think less about non-Western markets which is against the philosophy behind Browserlist. But I am not against the idea of Baseline, and when this problem will be fixed (just by communicating with non-Western communities), I am fully open to help and support. |
This work has been in ongoing, though @atopal has been much closer to it than I have been. He was in India just last week and recently in China talking to developers. He's told me some interesting things he's learned in this area (e.g., some regional developer communities don't have a strong interest in interoperability, due to local super app or OS monocultures). I'll ask him to chime in in more detail about what he's learned. |
I can't speak for all non-Western developers, but I can offer the perspective of a company that operates in such markets. |
Thank you for these insights @just-jeb,
Are these features that fall within Can you share how often this happens? (even a vague estimate would be informative) It isn't really clear from your comment if Are there browser versions you still support for specific regions that fall outside the current definition of |
It's not that we regularly check what feature we want to use and then assess whether we can or not. Usually, it's the other way around—our devs want to use something for a certain product feature, start checking around our supported browsers, and then find out they can't use it. We also don't look at specific regions when we stop supporting certain browser versions. It's usually just about the amount of traffic. Currently, this is how it works: we have this Supported Browsers article, which serves as a source of truth for both our users and our devs. This article is not updated often, and the process is cumbersome because it includes traffic analysis by browser versions and involves some high-level decision makers. Often, when someone gets around to updating this article, the listed versions represent a very small amount of traffic (which basically means we could have used certain features, but we didn’t, simply because no one cared to update the article). Our infra team (which is responsible for the build chain and the browserslist used across the company) also uses this article as the source of truth. Hence, I can confidently say that officially we support browsers that fall outside of the Baseline Widely Available category—not because we want to support them, but because the article needs to be updated 🙂. This is what we'd like to solve with Baselines—we want to use the same Baseline in the article, in Browserslist, and in our code for feature detection. Then we wouldn't need this whole process: the article is always up to date, the Hope this makes sense 🙏. |
Still kind of vague to me if you are saying that Baseline would help to streamline an internal process or that Baseline Widely available is known to be sufficient for non-western regions. I imagine it is both but that makes the message less clear ;) Between the lines I am reading that you don't know that is sufficient without first doing a full analysis of traffic. And that not needing to do such analysis is why you want to use Baseline in the first place. I think we need to clearly separate:
You can already define an equivalent browserslist query today. For example something like:
Doing so might be a good way to gather more data for wix.com on how this works for various regions. |
As an author of JavaScript libraries published to npm, I'd be very glad to see Baseline added! Not because it's necessarily what authors of web applications should all be using (that does require some consideration of your users and traffic), but because Baseline represents a pretty good snapshot of "modern JavaScript" as an authoring language and lets me more easily and consistently publish code to npm that is neither too old nor too experimental. As it is, I find it difficult to achieve that balance. See The state of ES5 on the web for background on how/why this is useful to package authors. |
Is that really true? More users on the internet are stuck on browsers >30 months old than are running the current? |
It was true for the first definition of baseline as it existed when I posted that comment. There is a totally new definition now and luckily it is no longer true today 😊 |
The problem of Baseline is that it uses only selected list of browsers made by big US companies (Chrome, Firefox, Safari, Edge). For instance, there is no UC Browser in Baseline, but it is very popular worldwide. |
What were the changes? I see the same 4 US’ browsers on https://web.dev/baseline |
The set of browsers didn't change. The original definition was only |
It's a Chromium-based browser with a relatively slow release cycle, right? Features in Baseline Newly Available may not be in UC for a while but once a feature reaches Widely Available, it will have been in Chromium for at least 30 months, if they were the last to implement it. I think the "Widely Available" definition exists not only to account for people who are slow to upgrade the browser on their device but also for browser makers who use one of the engines from the browsers that are in the Baseline list.
Is it? StatCounter Global Stats says (the data CanIUse uses and therefore Browserslist) it's 1.11% of global browsers. Even looking only at Mobile & Tablet in Asia, it's 3.04%, less than Samsung Internet, Safari, Chrome (it's declined a lot from its peak in 2016). I know reliable browser market share data is hard to come by, maybe other sources have higher figures. |
Here’s some brief research. The current UC Browser 13.7.8.1322 version is using Chromium 100, according to the UA:
The lag between Chrome 100 and Chrome 129 is 29 months. It’s funny: it takes 30 months or 2.5 years to get to the “widely available” Baseline status. So, adding the UC Browser to Baseline would keep many features at bay for a long, long time. Imagine no |
If Baseline defines browser engines (like all Chromium-based browser is hidden inside Chrome), why we have Edge in explicit list? Having Edge but avoiding explicitly adding other Chromium-based browser is defiantly a way of discrimination for me.
Yes, maybe For instance, Firefox has around 2.3 %. We have it explicitly in the list, but not UC. In Asia Edge has the same 3% as UC, but we have Edge and not UC in the list. 1% is a lot in the context of global market share. 500M users.
Unfortunately, diversity is always less convenient in practical short-term terms. But the same Baseline will block the market from accepting future more advanced browsers (by keeping eyes only on US browsers from big companies). If we want a way to define browsers with modern features, the allow-list of 4 browsers is not a way. In Browserslist there is more a better way to define target browsers by features, etc. |
It seems like it might be useful to provide a "baseline" query to account for the target browsers of https://web.dev/baseline/!
The text was updated successfully, but these errors were encountered: