Add ability to render preview browsers (introduced in BCD 4.0.0)#3997
Conversation
escattone
suggested changes
Aug 11, 2021
Contributor
There was a problem hiding this comment.
Here's what I did to test this:
- Fetched the
Elchi3:preview-browsersbranch ofmdn/browser-compat-datalocally - Fetched the
Elchi3:preview-browsersbranch ofmdn/yarilocally, and re-based it on the latestmainbranch ofmdn/yarito prevent an error related to a popularities file. - Changed line 52 in
package.jsonto use my localElchi3:preview-browsersbranch ofmdn/browser-compat-dataso I'm using the new BCD 4.0.0 data and format:"@mdn/browser-compat-data": "file:../browser-compat-data",
- Copied the
api/ANGLE_instanced_arrays.jsonfrom the introduction into my localmdn/browser-compat-data - Ran the tests (looked good)
- Ran a complete build of the English docs (no errors)
- Checked the BCD table that was built locally (looked good!)
I did have to make one minor change that's also necessary to change in this PR (see below), but otherwise, this looks good to me!
client/src/document/ingredients/browser-compatibility-table/atoms/_bc-supports.scss
Outdated
Show resolved
Hide resolved
…oms/_bc-supports.scss Co-authored-by: Ryan Johnson <escattone@gmail.com>
Member
Author
|
Thank you so much Ryan! 🎉 |
escattone
approved these changes
Aug 12, 2021
Contributor
escattone
left a comment
There was a problem hiding this comment.
Thanks @Elchi3! This is ready to go once version 4.0.0 of @mdn/browser-compat-data is released and Yari is updated to use that version. 🎉 🚀
FYI, the tests should all pass once Yari is updated to use version 4.0.0 of @mdn/browser-compat-data.
Contributor
|
When Yari upgrades to v4.0.0, this PR needs to go along with it. |
Contributor
|
What are some good pages to test it on? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

(This will fail as it depends on BCD 4.0.0 which will include mdn/browser-compat-data#10334.
Edit: Marked as draft to prevent it from being merged early. This is ready for review but needs a coordinated merge with the release of BCD 4.0.0.)
For a long time BCD contributors and browser vendors have asked for a way to include preview browsers, that is, data for Firefox Nightly, Chrome Canary, and Safari Technical Preview. In mdn/browser-compat-data#10334 we modeled and agreed on a way forward: The BCD data model will be extended to include a "preview" enum to indicate support in these browsers.
So, BCD 4.0.0 can include compat data like this:
Expand
{ "api": { "ANGLE_instanced_arrays": { "__compat": { "mdn_url": "https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays", "support": { "chrome": { "version_added": "preview" }, "chrome_android": { "version_added": "32" }, "edge": { "version_added": "12" }, "firefox": { "version_added": "preview" }, "firefox_android": { "version_added": true }, "ie": { "version_added": "11" }, "opera": { "version_added": "19" }, "opera_android": { "version_added": "19" }, "safari": { "version_added": "preview" }, "safari_ios": { "version_added": "8" }, "samsunginternet_android": { "version_added": "2.0" }, "webview_android": { "version_added": "4.4" } }, "status": { "experimental": false, "standard_track": true, "deprecated": false } }, "drawArraysInstancedANGLE": { "__compat": { "mdn_url": "https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/drawArraysInstancedANGLE", "support": { "chrome": { "version_added": "32" }, "chrome_android": { "version_added": "32" }, "edge": { "version_added": "12" }, "firefox": { "version_added": "47" }, "firefox_android": { "version_added": true }, "ie": { "version_added": "11" }, "opera": { "version_added": "19" }, "opera_android": { "version_added": "19" }, "safari": { "version_added": "8", "version_removed": "preview" }, "safari_ios": { "version_added": "8" }, "samsunginternet_android": { "version_added": "2.0" }, "webview_android": { "version_added": "4.4" } }, "status": { "experimental": false, "standard_track": true, "deprecated": false } } }, "drawElementsInstancedANGLE": { "__compat": { "mdn_url": "https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/drawElementsInstancedANGLE", "support": { "chrome": [ { "version_added": "preview" }, { "alternative_name": "foo", "version_added": "39", "version_removed": "45" } ], "chrome_android": { "version_added": "32" }, "edge": { "version_added": "12" }, "firefox": { "version_added": "47" }, "firefox_android": { "version_added": true }, "ie": { "version_added": "11" }, "opera": { "version_added": "19" }, "opera_android": { "version_added": "19" }, "safari": { "version_added": "8" }, "safari_ios": { "version_added": "8" }, "samsunginternet_android": { "version_added": "2.0" }, "webview_android": { "version_added": "4.4" } }, "status": { "experimental": false, "standard_track": true, "deprecated": false } } }, "vertexAttribDivisorANGLE": { "__compat": { "mdn_url": "https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/vertexAttribDivisorANGLE", "support": { "chrome": [ { "prefix": "webkit", "version_added": "15" }, { "version_added": "preview" } ], "chrome_android": { "version_added": "32" }, "edge": { "version_added": "12" }, "firefox": { "version_added": "47" }, "firefox_android": { "version_added": true }, "ie": { "version_added": "11" }, "opera": { "version_added": "19" }, "opera_android": { "version_added": "19" }, "safari": { "version_added": "8" }, "safari_ios": { "version_added": "8" }, "samsunginternet_android": { "version_added": "2.0" }, "webview_android": { "version_added": "4.4" } }, "status": { "experimental": false, "standard_track": true, "deprecated": false } } } } } }This PR aims to extend the BCD renderer so that the data can be displayed like this: