Skip to content

Conversation

@jamesnw
Copy link
Collaborator

@jamesnw jamesnw commented Oct 17, 2024

Before, if a BCD key didn't have a spec_url, it did not show up in the draft features. With this change, if a BCD key doesn't have a spec_url, it will use the closest ancestor's spec.

Apologies for the diff and for resurrecting deleted drafts, but a quick glance looks like most will be simple additions to existing specs.

These don't have a spec or an ancestor with a spec
  • api.CommandEvent
  • api.CommandEvent.CommandEvent
  • api.CommandEvent.command
  • api.CommandEvent.source
  • api.EXT_disjoint_timer_query_webgl2
  • api.EXT_disjoint_timer_query_webgl2.queryCounterEXT
  • api.FeaturePolicy
  • api.FeaturePolicy.allowedFeatures
  • api.FeaturePolicy.allowsFeature
  • api.FeaturePolicy.features
  • api.FeaturePolicy.getAllowlistForFeature
  • api.WebSocketError
  • api.WebSocketError.WebSocketError
  • api.WebSocketError.closeCode
  • api.WebSocketError.reason
  • api.WebSocketStream
  • api.WebSocketStream.WebSocketStream
  • api.WebSocketStream.close
  • api.WebSocketStream.closed
  • api.WebSocketStream.opened
  • api.WebSocketStream.url
  • css.properties.-webkit-mask-box-image-outset
  • css.properties.-webkit-mask-box-image-repeat
  • css.properties.-webkit-mask-box-image-slice
  • css.properties.-webkit-mask-box-image-source
  • css.properties.-webkit-mask-box-image-width
  • css.selectors.-webkit-slider-runnable-track
  • css.selectors.-webkit-slider-thumb
  • css.types.global_keywords
  • http.headers.No-Vary-Search
  • http.headers.Sec-CH-Save-Data
  • javascript.grammar.shorthand_object_literals
  • svg.global_attributes.requiredExtensions
  • svg.global_attributes.requiredExtensions.mathml
  • webassembly.jsStringBuiltins

Notes: for -webkit-mask-box-image-*, these will be removed pending mdn/browser-compat-data#22727.

@github-actions github-actions bot added the tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings label Oct 17, 2024
@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Oct 21, 2024
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions on the code itself, but this seems like a good idea.

Comment on lines 145 to 148
let parentFeature = compat.data as Identifier;
while (path.length > 1) {
parentFeature = parentFeature[path.shift()];
const parent_spec = parentFeature.__compat?.spec_url;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, you can use compat.features to get an object with a spec_url getter (probably):

Suggested change
let parentFeature = compat.data as Identifier;
while (path.length > 1) {
parentFeature = parentFeature[path.shift()];
const parent_spec = parentFeature.__compat?.spec_url;
while (path.length > 1) {
const parent_spec = compat.features.get(path.shift())?.spec_url ?? [];

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't quite work- it was calling compat.features.get('properties') instead of compat.features.get('css.properties'). I did switch to building a path up and using compat.features.get() instead of drilling through the raw data.

@jamesnw jamesnw requested a review from ddbeck October 21, 2024 16:40
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'm happy with this, but I have a question about webgpu.

Also, I merged the update-drafts workflow earlier today—you might need to merge main into this branch and rerun the script to avoid conflicts.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were the changes to webgpu done by hand or caused by the script? This is the only thing that worries me—I want to preserve the mostly hands-off use of the update-drafts Actions workflow.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question on webgpu. #1948 moved the draft to the features folder, and because this PR was updating the draft, merging that move in added the keys to the non-draft feature.

This PR doesn't increase the likelihood that that would happen in the future, but this PR is where it's most likely to happen. It's slightly mitigated by the fact that the action only adds the draft folder, but a simultaneous move could theoretically add keys to a non-draft feature.

I reset features/webgpu.yml to match main, and updated the drafts, so now the new keys are in features/draft/spec/webgpu.yml.

Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Let's go!

@ddbeck ddbeck merged commit bd53806 into web-platform-dx:main Oct 22, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features. tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants