Skip to content
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

Create MDN macro for building overview page tables #1243

Closed
ExE-Boss opened this issue Mar 1, 2018 · 5 comments
Closed

Create MDN macro for building overview page tables #1243

ExE-Boss opened this issue Mar 1, 2018 · 5 comments
Labels
enhancement 🥇 Nice to have features.

Comments

@ExE-Boss
Copy link
Contributor

ExE-Boss commented Mar 1, 2018

This macro would work by supplying it references to the APIs that belong to that overview page, eg.:

{{CompatOverview("api.Body","api.FetchEvent","api.Headers","api.Request","api.Response")}}

Which would render as:

Desktop Mobile
Chrome Edge Firefox IE Opera Safari Android Webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Body 42 Yes 39 No 29 No 42 42 ? 44 Yes No ?
FetchEvent 40 Yes 44 No 27 No 40 40 ? 44 27 No ?
Headers 42 Yes 39 No 29 10.1 42 42 ? 44 29 No ?
Request 42 Yes 39 No 28 No 42 42 Yes Yes 28 No ?
Response 42 Yes 39 No 29 10.1 42 42 Yes Yes 29 10.1 ?

See also:

@teoli2003
Copy link
Member

Overview tables are one of the reasons we wanted to have BCD in a machine-readable format.

The question here are:

  • How do we indicate features inside an API that are not suppoorted. E.g. Interface1 is supported with property1 and property2. Interface1.property3 is not. How do we indicate this? (If we want)
  • How do we deal with notes, prefixes, and alternative names?

@teoli2003
Copy link
Member

Note that such macro should likely be discussed in more details (especially its implementation) in the kumascript repo :-)

Btw, I'm really excited to be see such macro being a thing we can do now!

@ExE-Boss
Copy link
Contributor Author

ExE-Boss commented Mar 7, 2018

How do we indicate features inside an API that are not suppoorted. E.g. Interface1 is supported with property1 and property2. Interface1.property3 is not. How do we indicate this?

We could probably use the formatting used when partial_implementation is true and only have it be green from the version that fully supports the feature.

How do we deal with notes, prefixes, and alternative names?

If it’s the root feature (eg. api.Body like in the above example), then we would probably hanle it in the same way, as for sub-features, we could probably use the partial_implementation formatting for partial implementations, prefixes and alternative names.

@wbamberg
Copy link
Collaborator

wbamberg commented Mar 7, 2018

In terms of the presentation of the tables, this should be just like the "aggregate tables" that we have in the WebExtension docs, e.g. https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs#Browser_compatibility. There are UI issue with these tables, for sure, but the solutions should be the same I think.

It would be interesting if the macro could make use of the groups in mdn/data, then for example you could do:

{{CompatOverview("css", "CSS Grid Layout")}}

...or something, and have it look up the contents from https://github.com/mdn/data/blob/master/css/properties.json.

@Elchi3
Copy link
Member

Elchi3 commented Apr 18, 2018

Thanks for your issue! This got worked on here mdn/kumascript#650

I'll close this here for now, this repo is just about the data, hopefully https://github.com/mdn/browser-compat-toolkit will deal with all displaying soon. For now issues like this are discussed / worked on in https://github.com/mdn/kumascript still.

@Elchi3 Elchi3 closed this as completed Apr 18, 2018
@queengooborg queengooborg added the enhancement 🥇 Nice to have features. label Aug 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🥇 Nice to have features.
Projects
None yet
Development

No branches or pull requests

5 participants