Skip to content

Commit f25f24b

Browse files
authored
Add lightweight guidelines for grouping features (#1737)
1 parent 8c2d58a commit f25f24b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/guidelines.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,3 +269,17 @@ Follow these guidelines when setting a `caniuse` value:
269269
Can I Use isn't perfect.
270270
Don't use `compute_from` in a way that would not make sense if the corresponding `caniuse` value didn't exist (for example, by pinning support before the introduction of an essential component of the feature).
271271
In such situations, it's better to comment out the `caniuse` value, make a `TODO` comment, and open an issue about why you did it.
272+
273+
## Groups
274+
275+
The `group` field references one or more groups.
276+
You can find group definitions in the [`groups/`](../groups/) directory.
277+
278+
Groups are experimental.
279+
It might not be clear how to group features until more features have been defined.
280+
281+
Don't assign features to two or more groups such that one group is an ancestor of another.
282+
For example, don't assign a feature to both `css` and `fonts`, since `css` is the parent of `fonts`.
283+
284+
Do assign features to groups when there's an opportunity for future feature composition (see [#971](https://github.com/web-platform-dx/web-features/issues/971)).
285+
For example, several features for the JavaScript `Array` interface are members of the `array` group.

0 commit comments

Comments
 (0)