-
Notifications
You must be signed in to change notification settings - Fork 518
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 for providing spec URLs when there is no BCD table #4704
Comments
@queengooborg , thanks for filing this! Another area where this is a problem is API overview pages like https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API. BCD doesn't represent APIs, so this also has to be a hardcoded table. This is especially weird because APIs usually map directly onto specs, yet they are one of the few places we don't represent the spec as metadata. |
While I think that would work great, I also think it might be better to have the spec URLs data for all the APIs in one place. So I propose we consider putting the spec URLs in https://github.com/mdn/content/blob/main/files/jsondata/GroupData.json, and having the MDN build pull the spec URLs from there. |
hmm incidentally, I notice/remember that the "Background Fetch API": {
"overview": ["Background Fetch API"],
"interfaces": [ If we put the spec URLs in GroupData.json I am imagining that will make it become useful for some non-MDN consumers — certainly I can say it culd for some new work I am involved in at the W3C on coming up with ways to show better, more clear browser-support metadata at the top of every W3C spec. But unless GroupData.json has the slug rather than the article title, that means my consuming code would need to do an additional lookup for the slug, based on the title which that Given that, I’d like to propose we change all the current |
Fixes #4704 Related: #5277 This change adds support for listing specs in the Specifications section based on the value of the 'spec-urls' frontmatter key — instead of or in addition to listing specs based on the value of the 'browser-compat' frontmatter key, or the value of the parameter passed to the Specifications macro.
I've thought that the use of placing the spec URLs within BCD and using it to render the spec tables has been a wonderful idea, as it helps consolidate the data in one place. However, there are some features that are documented on MDN web docs that do not (and should not) have their own compatibility tables separate from another feature, such as in the case of dictionaries. In these cases, we aren't able to take advantage of the
Specifications
macro and must manually create one.We ran into this issue with mdn/content#8846 recently. Currently, in BCD, we're working to remove all non-interface data from the API folder, which includes enums, typedefs, and dictionaries. Most of the removals have been pretty trivial, where we just need to delete the file and content pages and fold their data into other features. In some cases, like the PR I linked, it's more reasonable to keep the content pages and only remove the compatibility tables.
@wbamberg wrote a comment on the PR suggesting a new key we can add as a fallback for the spec macro:
The text was updated successfully, but these errors were encountered: