-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Allow preview browsers in the data structure #10334
Conversation
@apple-web-evangelist @jensimmons @sideshowbarker @foolip here's a PR that follows up on our conversation in our last BCD call regarding preview browsers (Technical Preview, Nightly, Canary). I would be interested in hearing your thoughts on this proposal. @Fyrd This PR changes BCD to take into account preview browsers. So, for example on https://caniuse.com/mdn-api_abortsignal_abort Safari TP is currently grey/unsupported, but if BCD had |
Thanks for pushing this forward. Above, you wrote
Are you thinking that when support ships in an official public release that the "preview" designation should always be removed? |
@Elchi3 Yes, this PR makes sense and would work for caniuse. Thanks! |
No, I made this example to illustrate where we want to allow "preview" and where not. In this example, a feature is unshipped in a preview browser. For example, an API like AppCache can be removed in TP already, so the Contrary to that example, the following should not be allowed, because a feature added in preview and having it removed in a stable version makes no sense in my understanding.
This is similar to us also disallowing earlier versions for
|
Cool, cool. Just checking. Because, of course, the most common pattern will be that something lands in a preview browser. Then later it's also added to the release version. And stays in both forever.... I'm glad this is getting figured out! |
I love it! Is the intention that we should now stop recording pre-stable releases as numbers, thus combining beta+dev+canary into a single "preview" release? I think that would be great, but it increases the scope of the changes needed. Perhaps they can be phased out by no longer adding new numbered pre-stable represses? |
As discussed in the call yesterday, the additional policies you describe here can be decided on (and linted for) at a later stage, if needed. |
I'm testing stuff on the rendering side. Please send me "weird" data. So far I have this:
If you have more scenarios, I would love to test them so I can make the rendering as solid as possible. Just comment with some BCD JSON here, thanks :) Edit: Found a realistic third example. |
A fairly plausible scenario is where a prefixed API remains but the unprefixed API is in preview. That was the case for the Fullscreen API at some point. Something like:
|
For experimental removal in the I'm also not sure about the color for these. You can in fact still use such features, and there's no guarantee that the removal will work out. But I don't have a suggestion, I think red is better than any other existing color here. |
@Elchi3 I guess the BCD order is taken as-is? How would this render?
Preview features are like flags in many ways, and I think in BCD review I'd ask for this order to show that you can in fact use this feature already, just with a prefix. |
Yeah, I think this is the known
I guess the only alternative would be blue to show something is up in a preview browser but I wonder if that's more confusing than helpful.
Yes, it is. And I think BCD should order in a sensible way so that all consumers would benefit from a good order. This is filed in #1596
Looking at this I think the label text "Preview browser support only" should rather just be "Preview browser support" because it doesn't really know if it's the "only" support. |
I've sent mdn/yari#3997 to Yari, so that MDN would be able to render this. |
It might be worth treating beta slightly differently to anything further from release; it's relatively unusual for there to be so much difference to the final release. Developers often expect MDN to be up-to-date pretty much as soon as a browser is released, which implies that the data needs to be in MDN prior to release. |
7612337
to
8b84bb9
Compare
8b84bb9
to
d250f27
Compare
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 happy with this. I think we've given this enough thought and it's time to exercise it!
* Bump version to v4.0.0 * Add release note for #11234 * Bump known issues * Add release note for #11760 * Add release note for #11286 * Add release note for #9830 * Add release note for #10334 * Add v4.0.0 highlights to release notes * Add release note for #10753 * Revise description of `accepts_flags` hint * Add release note for #11961 * Add release note for #12059 * Add stats
This PR is based on a discussion that is going on for quite some time now. BCD has no way to represent "Preview browsers". Instead two main workaround have been used:
Both approaches aren't ideal.
This PR experiments with allowing "preview" as an allowed version string for
version_added
andversion_removed
.Further, the browser objects are extended with an optional property
preview_name
that contains the brand name for these preview browsers ("Canary", "Nightly", "TP") - these names are meant to be short, so that e.g. the MDN compat table renderer can pick them up and displays them in the table cells.If a browser has a
preview_name
declared in itsbrowsers/*
file, the following statements are allowed:Disallowed is this:
In trees, a parent feature is not allowed to be "preview" when sub features are a version number.
Parent:
Child:
Opening this as a draft for now to collect feedback. If this seems plausible, it probably means a major version release for BCD.