Skip to content

Feature parent relationships #217

Closed
Closed

Description

@foolip

caniuse has a parent field used to group one feature under another. For example, the "AAC audio file format" feature has the "Audio element" feature as its parent.

#215 is a draft PR for doing this in feature-set.

We'd need a lint to check for cycles, which wouldn't make sense.

Activity

  1. foolip commented on Oct 16, 2023

    @foolip
    CollaboratorAuthor

    In discussion with @ddbeck we've realized that there are at least two different kind of relationship here.

    One is a dependency, where Subgrid depends on Grid, but Subgrid isn't part of Grid. In other words, it makes sense to say that Grid was introduced before Subgrid, and defining the Subgrid subfeature shouldn't change anything about Grid.

    Another is parts of a whole, where Web Components consists of multiple technologies, like Shadow DOM and Custom Elements.

  2. foolip commented on Nov 14, 2023

    @foolip
    CollaboratorAuthor

    #290 is a concrete examples to guide the design here. For WebCodecs, it makes sense as a whole feature, but it would also be useful to talk about just the video parts of it which Safari ship. That would be a case of "parts of a whole", where it doesn't make sense to say that WebCodecs is fully supported until all of its parts are.

    #422 is a concrete example of a dependency, where custom properties can be (and was) supported before registered custom properties, but the reverse doesn't make sense.

  3. foolip commented on Jan 29, 2024

    @foolip
    CollaboratorAuthor

    I've now come across 4 different cases that feel similar to me:

    In these cases, there are related features, and the parent/umbrella feature should be for grouping only. I don't think it would make sense to have a Container Queries feature whose Baseline status keeps changing as new kinds of container queries are added to the platform.

    If we need to track such relationships at all, I think they would be similar to categories like "CSS" or "WebRTC", not features.

  4. atopal commented on Jan 29, 2024

    @atopal
    Collaborator

    I agree in general, Web Codecs is a good case for that, but container queries is different. I can't quite put my finger on it. Maybe it's because we have been referring to size container queries as just container queries for quite some time, that not having a Baseline status seems odd. Container Queries used to refer to exactly one specific feature, that's not the case with Web Codecs.

  5. foolip commented on Jan 29, 2024

    @foolip
    CollaboratorAuthor

    @atopal if there is a Container Queries in addition to Size Container Queries, what would it represent? Something like "abstract support for some kind of container query" which means Size Container Queries in practice since that shipped first in all engines?

    That would suggest we need a kind of feature group where the earliest support of anything in the group is what determines the group status.

  6. atopal commented on Jan 30, 2024

    @atopal
    Collaborator

    Yeah, maybe. Isn't that the same with Grid and Subgrid though? Alexis uses the spec level (level 1) for CSS grid to denote that on caniuse.com.

    The reason I brought that up is because I recently listed to a podcast where the presenters didn't even mention style container queries and just kept referring to size container queries as simply container queries. Granted, that was from a year ago, and over time there should be some sensitivity to it, but my general point still stands, I think.

    We need a way to denote that what people used to talk about as container queries is now in Baseline and works on its own, and ideally we have a way that is not a one-off, like in this case with "size container queries" or grid with (level 1), but something that can become a convention that people can learn and make sense of. I think we discussed version numbers in the past (Container Queries v1), or maybe a year (Container Queries 2022). In terms of relationships you could have a parent Container Queries v1 with just size container queries as a child and Container Queries v2 with both of them.

    There are downsides with that for sure. For one you lose any semantics in cases where that is straight forward. Size container queries have meaning, v1 does not.

  7. foolip commented on Jan 31, 2024

    @foolip
    CollaboratorAuthor

    @atopal I don't think it's quite the same. It's possible to point to container queries as a concept with concrete features like size/style/state container queries within it. But for Grid, the name of the concept and the first concrete feature of it are the same – Grid.

    Certainly I think developers will continue to talk about container queries as a concrete feature, meaning size container queries. We should not try to be pedantic and discourage that terminology. But we do need a way of representing style container queries in web-features pretty soon, and it doesn't have a parent-child relationship with the existing container queries feature, they are siblings rather.

  8. foolip commented on Jan 31, 2024

    @foolip
    CollaboratorAuthor

    #558 will also necessitate some kind of hierarchy. We'll have some features like array-at which also belong to a specific version of ECMAScript, ES2022 if https://blog.saeloun.com/2022/02/24/ecmascript2022-adds-add-method/ is correct.

    I'm starting to think that perhaps we should think about hierarchy and features more separately. "HTML5" or "ES2022" are not features, they are technology areas. Perhaps we should have a hierarchy of such groups, but features (with browser support and Baseline statuses) can only be attached to a group, not have their own "subfeatures". Like this:

    
    web-features
    ├─ CSS
    │  ├─ Container queries
    │  │  ├─ Size container queries
    │  │  ├─ Style container queries
    │  ├─ Grid
    │  │  ├─ Grid (Level 1)
    │  │  ├─ Subgrid
    ├─ Speech API
    │  ├─ Speech recognition
    │  ├─ Speech synthesis
    
  9. jgraham commented on Feb 1, 2024

    @jgraham
    Collaborator

    I think I agree with foolip here. In general it doesn't make sense to ask what the status of the non-leaf groupings is, or at least it only makes sense when all the child groups have the same status (and in some cases it will change if new functionality is added).

    A question is whether we want to explicitly merge groups when they no longer represent distinct features (consider an Array group vs a group that contains Array.map and the other functional methods; those were distinct when first introduced, but no one cares now).

  10. foolip commented on Feb 1, 2024

    @foolip
    CollaboratorAuthor

    Yes, we'll need to think about evolution over time for groups if we do it this way. I think a somewhat common situation is that everything in a group starts to resemble a single feature, where eventually people would consider "Speech" a single feature. When that happens I think we might need to retire both the group and its child features in favor of a single feature.

  11. added
    feature evolution
    on Apr 17, 2025
  12. foolip commented on May 8, 2025

    @foolip
    CollaboratorAuthor

    We now have groups, which have a hierarchy. We don't have parent-child relationships between features, and I think we shouldn't pursue this now as the need in general isn't clear. #971 is still a need, but I see that as a narrower change to handle feature evolution, not support for feature parents generally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature evolution

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions