-
Notifications
You must be signed in to change notification settings - Fork 200
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
caniuse integration #645
Comments
Yeah, I'm down with this. I'd put it behind a pref by default, and we should talk about design, but I'd def love to see this integrated. |
Sure, makes sense. Could you point me to an existing pref I could use as a reference when writing the new code? |
The pref for dfn-panels is pretty canonical for this sort of thing: https://github.com/tabatkins/bikeshed/blob/master/bikeshed/MetadataManager.py#L115 (and lines 78 and 173) |
As far as appearance, any qualms with presenting the data roughly the same way the HTML spec does? |
Would adding a pref for the spec's public URL (e.g. |
Yeah, the HTML spec's presentation works for me. We're already copying WHATWG's default styling for dfn-panels. ^_^
We can definitely add whatever additional metadata we need, but I don't think that spec url is useful here. CanIUse's data (from the db) appears to group features pretty arbitrarily. Looking into how CanIUse actually groups things now, I think I see two potential design avenues: Baked into the spec (all done in Python)
Pros:
Cons:
Done Dynamically in JS
Pros and cons are exactly the opposite of the Python solution: data is up-to-date, but panels aren't visible immediately, they depend on the caniuse-db site being available, and error-checks don't happen until people view the spec. |
How so?
This is the route I'm currently pursuing.
Even simpler: Just download https://raw.githubusercontent.com/Fyrd/caniuse/master/fulldata-json/data-2.0.json in the
That seems like unnecessary extra work for the spec writer. |
Ah, didn't see he had an "all data" file; that's exactly what I was suggesting we build. ^_^
This doesn't work, is my point. For example, background-attachment is associated with the url http://www.w3.org/TR/css3-background/#the-background-attachment. This (a) is the TR url, which feels weird to force EDs to refer to, especially if you're writing the ED for the next level, (b) assumes that specs don't split/rename or move properties around, such that they're composed of bits from multiple spec urls in the caniuse db, and (c) requires any specs that want this data to have the exact same anchor as the "official" version that caniuse stores (and assumes that the anchor caniuse chose is the anchor the spec author wants to attach the usage data to). What I suggested is a little bit more work, and less "magic", but it's dependable, as long as caniuse doesn't change their keys. I've gradually learned that depending on URL structures is generally gonna be a bad time. ^_^ |
…specs Enabled via a new "Include Can I Use Panels" metadata setting. Add the Can I Use feature ID as a `caniuse` attribute on a term definition to generate a Can I Use panel near the term. Fixes #645
…specs Enabled via a new "Include Can I Use Panels" metadata setting. Add the Can I Use feature ID as a `caniuse` attribute on a term definition to generate a Can I Use panel near the term. Fixes speced#645
Would you be open to a PR to add caniuse browser support data boxes, like the HTML spec has?
X-Ref: whatwg/dom#69
The text was updated successfully, but these errors were encountered: