-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add initial feature support definition #40
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2e4b186
Add intial constituent feature data
ddbeck 9ae1238
Enforce formatting on YAML files
ddbeck f297f3d
Merge branch 'main' into constituent-features
ddbeck 04c1d22
Use underscores for constituent features
ddbeck 4ad53d0
Merge branch 'main' into constituent-features
ddbeck 832c458
Flatten constituent features
ddbeck 309208d
Fix typo
ddbeck 4b93376
Rename "constituent_features" to "compat_features"
ddbeck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* | ||
|
||
# Opt-in the YAML files only (at least for now) | ||
!/feature-group-definitions/*.yml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
spec: https://drafts.csswg.org/css-cascade-5/#layering | ||
caniuse: css-cascade-layers | ||
constituentFeatures: | ||
- source: "@mdn/browser-compat-data" | ||
query: css.at-rules.layer | ||
- source: "@mdn/browser-compat-data" | ||
query: css.at-rules.import.layer | ||
- source: "@mdn/browser-compat-data" | ||
query: api.CSSImportRule.layerName | ||
- source: "@mdn/browser-compat-data" | ||
query: api.CSSLayerBlockRule | ||
- source: "@mdn/browser-compat-data" | ||
query: api.CSSLayerBlockRule.name | ||
- source: "@mdn/browser-compat-data" | ||
query: api.CSSLayerStatementRule | ||
- source: "@mdn/browser-compat-data" | ||
query: api.CSSLayerStatementRule.nameList | ||
This file contains 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
This file contains 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
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.
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 wonder if we can't separate mappings between different data sources and make this one BCD specific for simplicty? Something like:
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 think that's a possibility, though I have a concern about what it implies about the relationship between the feature and its constituents. For instance, if I migrate something here like the mockup's
array.json
and we split them up by source, we might end up with something like:If we structure the data like this, I'm concerned that it:
localFeatures
plusbcdFeatures
describes a complete thing (i.e., neither key alone describes the feature)That said, I recognize that the form I've presented is verbose and repetitious (though I'm not 100% certain if that's your concern, exactly). I think it would be OK to be terser, use short hands, and set defaults (or some combination thereof). Some ideas along these lines:
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.
@foolip I've switched the name of the new key to underscores and merged in the usage stats from main. I was wondering if you had any more thoughts on the mapping situation. Happy to move forward with any reasonable suggestion (of which they're all reasonable, including separating the data sources). But I wanted to give you another opportunity to chime in before I moved forward on migrating more data out of the mockup.
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 thought I had replied here last week, but no.
Unless we have another data source in mind that we could use for computing web-feature statuses I think we should simplify and optimize for the case that all constituent features are from BCD.
But I think that if I'm right about this it will quickly become evident just by trying to maintain the data, so I don't need to get my way if your hunch is different.