Add compat sets to authoring format#4015
Conversation
| An alternative doesn't have to be a narrow drop-in replacement for the discouraged feature but it must handle some use case of the discouraged feature. | ||
| Guide developers to the most relevant features that would help them stop using the discouraged feature. | ||
|
|
||
| ## Status overrides |
There was a problem hiding this comment.
I'm not a big fan of the location of this guideline. It would make more sense to me if this section immediately followed the Associate BCD keys with your feature, under Set the status of a feature in CONTRIBUTING.md.
This feels more closely related than our writing style guide.
Perhaps we should also move the Groups and Discouraged sections to the CONTRIBUTING.md file.
There was a problem hiding this comment.
@captainbrosset I tried doing as you suggested, but it ended up feeling pretty weird. CONTRIBUTING.md is a kind of tutorial on minting a feature. From here onward, most new feature minting should be flat compat_features, so it seemed kinda weird to introduce people to something that they should only do in exceptional circumstances.
Meanwhile, the Status overrides doc section is more of a policy: here's how to override a status and the situations when you might consider doing it. We could break up the guidelines.md file into something like style-guide.md and data-policies.md or something like that but I think it's out of scope for this PR.
That said, I did think it only fair to acknowledge the existence of overrides in CONTRIBUTING.md, so I added a cross reference with 364b592.
| The keys in `modifier` are validated to have the same status _level_ as the `core` keys (for example, if the `core` set of keys is newly available, then the keys in `modifier` must be too), but not necessarily the same Baseline dates or initial browser releases. | ||
| The keys in `spare` relate to the feature but do not affect the feature's status. | ||
|
|
||
| For example, this override sets the status on the basis of key `a` and `b`, validates that key `c` is at the same level as `core`, and ignores `x` for the purpose of calculating a status. |
There was a problem hiding this comment.
A real example would also be useful. This can be done in a separate PR though.
Without it, we're telling authors that there's another, weird, way to write features, but we're not really telling them why.
I see you wrote a "You can use an override method in the following situations" section, which is great. But I feel like a real example would go a long way.
There was a problem hiding this comment.
I tried to do this but quickly found that it's difficult to find a good example that is short and doesn't have some data oddities underneath. I'll come back to this in a follow up PR, probably when we do the conversion where I'll have to look at one in turn anyway.
This reverts commit c1123ec. This was a mistake. It won't survive long term because some of this data is non-standard.
See the previous PR #3902 for background. This PR subsumes the changes in that PR.
This implements part one of the so-called aspects proposal, which creates a ratcheting mechanism for compat key status calculation and validation. This is a precursor to feature merging.