Skip to content
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

[Schema] Promote web-features tags to own field #25813

Open
caugner opened this issue Jan 30, 2025 · 2 comments
Open

[Schema] Promote web-features tags to own field #25813

caugner opened this issue Jan 30, 2025 · 2 comments
Labels
enhancement Nice to have features.

Comments

@caugner
Copy link
Contributor

caugner commented Jan 30, 2025

What would you like to see added to BCD?

I'm proposing to replace the web-features:X tag values with a dedicated feature or web_feature field.

Example:

-            "tags": [
-              "web-features:container-scroll-state-queries"
-            ],
+            "feature": "container-scroll-state-queries",

Similarly to spec_url and impl_url, this field should support either a single feature or an array of features, in anticipation of some BCD features becoming part of multiple web features:

-            "tags": [
-              "web-features:foo",
-              "web-features:bar"
-            ],
+            "feature": [
+              "foo",
+              "bar"
+            ],

How impactful do you think this enhancement will be?

I believe that this enhancement will make it easier to consume the web-features.

Do you have anything more you want to share?

No response

@caugner caugner added the enhancement Nice to have features. label Jan 30, 2025
@Elchi3
Copy link
Member

Elchi3 commented Feb 4, 2025

Thanks for your proposal. The reason we chose to do this via tags is that the data model in web-features wasn't quite stable yet (and probably isn't right now either) and tags gives us flexibility to experiment. In web-features, you currently have features (ids), snapshots (e.g. "ecmascript-2015"), and groups ("javascript"). Additionally, aliases might be added soon.

In BCD, tags have helped be flexible with the emerging web-feature data model. So, in BCD you find "web-features:typed-arrays for a web-feature id and "web-features:snapshot:ecmascript-2015" for a web-feature snapshot (your proposal above doesn't discuss what to do with snapshot data). I briefly played with groups in BCD as well but then dropped them again. Daniel is probably soon going to experiment with aliases. So, it ist not just the web-features ID for which we need to think about here.

I agree, though: Long-term it would be good to promote web-feature ids and other data points to permanent own fields in BCD. However, I believe we are not quite there yet. I would at least wait until we saw some development with alias IDs and we need a to think about snapshots again, too.

@caugner
Copy link
Contributor Author

caugner commented Feb 5, 2025

your proposal above doesn't discuss what to do with snapshot data

To clarify, my proposal is to move all web-features: prefixed tags into this new property, which would include snapshots:

-          "tags": [
-            "web-features:snapshot:ecmascript-1",
-            "web-features:javascript"
-          ],
+          "feature": [
+            "snapshot:ecmascript-1",
+            "javascript"
+          ],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Nice to have features.
Projects
None yet
Development

No branches or pull requests

2 participants