Add a features/draft/proposed/ directory an exempt it from CI#3726
Add a features/draft/proposed/ directory an exempt it from CI#3726
Conversation
|
I don't really understand how this is going to work. If a vendor adds a draft feature here, how do they refer to the feature in e.g. an intent to prototype email or standards-position request? If the feature is updated "later" how is one supposed to handle references to the old name in immutable data (e.g. email)? Basically I don't understand the concept of an "unpublished web feature". I think the use cases require there to be an agreed ID for early stage features, but which tools that don't care about early stage features can filter out. If this proposal amounts to features getting an like |
That is effectively the proposal, yes. This PR doesn't say how to refer to these features externally, but |
I think we should make that explicit, and ensure that we have group agreement on the proposal. Having a feature lifecycle that makes sense across a range of usecases feels like the important part; exactly how we represent that in the repo feels like implementation details. |
There was a problem hiding this comment.
I'll start with my assumptions. I'm expecting a loop like this:
- Vendor creates a draft
.ymlfile for vendor-originating feature X. - web-features mints a real feature Y.
- web-features deletes draft X and records somewhere that draft X became real feature Y.
- Vendor checks that record and replaces their feature X identifier with real feature identifier Y (or however they want to handle that mapping on their end).
I'm also assuming that we do not expect vendors to do any reconciliation with each other (we'll do that when we mint a feature). For example, two standards positions requests on the same day could trigger the creation of two vendor drafts referring to the same feature and we don't care, as long as everyone's generating unique vendor draft IDs.
If that's right, then I think this is a good place to start. I've left some comments on some specifics.
features/draft/vendor/README.md
Outdated
| - A web-features maintainer creates a real feature entry and replaces the draft | ||
| feature with a pointer to that feature. |
There was a problem hiding this comment.
It would be nice to have a stub/example file showing a mapping from a completed draft to a real feature ID.
Or we could have a JSON file showing former vendor draft paths (this would be nicer for us, to have the folder contain only un-minted features, but would require vendors to do a little more than not overwrite an existing file).
There was a problem hiding this comment.
This has been resolved below. After the live review session with Philip, I was brought around to the idea that the resolution of a draft can and should happen in-place, rather than deleting or moving the files. While this is less convenient for me personally as a maintainer, it's less complex for the bots that are going to commit this stuff (e.g., the process for creating a draft file is, more or less, "don't clobber an existing file").
|
Also, FWIW, I have been reading "vendor" in the sense of "vendorization" and not that these things would be the sole domain of browser vendors. If, for instance, WPT or State of… surveys wanted to get in on this process, then that could happen here just as well. |
|
@ddbeck and I live reviewed this just now. I've updated the README to say that Note that I don't think we need to publish these anywhere to start out. |
ddbeck
left a comment
There was a problem hiding this comment.
I'm much happier with the examples here. I think this is enough for us to go on to start experimenting with this.
features/draft/vendor/README.md
Outdated
| - A web-features maintainer creates a real feature entry and replaces the draft | ||
| feature with a pointer to that feature. |
There was a problem hiding this comment.
This has been resolved below. After the live review session with Philip, I was brought around to the idea that the resolution of a draft can and should happen in-place, rather than deleting or moving the files. While this is less convenient for me personally as a maintainer, it's less complex for the bots that are going to commit this stuff (e.g., the process for creating a draft file is, more or less, "don't clobber an existing file").
features/draft/vendor/README.md
Outdated
| ## Example | ||
|
|
||
| The [processing instructions in HTML](https://chromestatus.com/feature/6534495085920256) | ||
| feature is created as `vendor/html-pis.yml` file with this contents: | ||
|
|
||
| ```yml | ||
| # features/draft/vendor/html-pis.yml | ||
| explainer: https://github.com/WICG/declarative-partial-updates/blob/main/patching-explainer.md | ||
| chrometatus: https://chromestatus.com/feature/6534495085920256 | ||
| ``` | ||
|
|
||
| When the real web-features entry is created, it is decided to consider this part | ||
| of `<template for>`, so the draft vendor feature is updated like this: | ||
|
|
||
| ```yml | ||
| # features/draft/vendor/html-pis.yml | ||
| kind: moved | ||
| redirect_target: template-for | ||
| ``` | ||
|
|
||
| Any references to `vendor/html-pis` can be updated to refer to `template-for`. |
There was a problem hiding this comment.
It's my expectation that we'll revise this to use a fully-realized example, once we've been through it once or twice.
ddbeck
left a comment
There was a problem hiding this comment.
I'm much happier with the examples here. I think this is enough for us to go on to start experimenting with this.
jgraham
left a comment
There was a problem hiding this comment.
I think this needs to consider the workflow for consumption, rather than just the publishing workflow. If these feature names are going to appear anywhere in public (explainers, s-p requests, status counters, intent emails), it needs to be possible for people to reference them just like other feature ids.
features/draft/vendor/README.md
Outdated
| # Draft vendor features | ||
|
|
||
| This directory is for features proposed by a browser vendor, to support the | ||
| early use of web-features before there is a published web-features ID, and a |
There was a problem hiding this comment.
If we don't publish these anywhere we still can't reference them from e.g. standards positions without recreating all the build infrastructure to know what are valid definitions.
There was a problem hiding this comment.
If you expect to reference these in standards positions, we can publish somewhere. How about a JSON file on GitHub pages that's updated for every commit to this repo?
There was a problem hiding this comment.
Well, I expect you to reference them in standards positions (requests) :p
But yes, publishing them separately to the main ids would be fine for me.
There was a problem hiding this comment.
I see, I wasn't sure how you plan to reference web-features in https://github.com/mozilla/standards-positions. If you add it to the template, then allowing proposed/* IDs there would make sense.
|
What's still missing here is building {
"html-pis": {
"explainer": "https://github.com/WICG/declarative-partial-updates/blob/main/patching-explainer.md",
"chromestatus": "https://chromestatus.com/feature/6534495085920256"
}
}If a file doesn't parse into an object, that should be a warning where maintainers will see it, but not block releases. An empty object would be used, so that consumers of |
|
As a consumer, something that exactly matches the normal format, but with all the fields optional (for feature definitions; "metadata: entries like moves should be identical to the normal format) would be ideal. |
|
@jgraham that sounds reasonable, we'd just add a top-level "features" object I think, and maybe a few other things that consumers of the current |
|
@foolip and I had a conversation today about how to make the 'all fields optional' stuff work cooperatively with the existing schema. We talked through one idea that goes something like this: Create a new superset schema with a On publishing the mainstream |
Add html-pis as a first proposed feature to show that it works.
|
@ddbeck I've added the bits for publishing |
ddbeck
left a comment
There was a problem hiding this comment.
I like this. I would like to get rid of the hard-coded schema, but I'm willing to take that part on (see #3726 (comment) for my proposed approach), if you don't have the time for it.
One optional suggestion in a line comment.
| - run: npm ci | ||
| - run: npm run build | ||
| - run: gh release upload ${{ github.ref_name }} packages/web-features/data.json data.extended.json schemas/data.schema.json | ||
| - run: gh release upload ${{ github.ref_name }} packages/web-features/data.json data.extended.json schemas/data.schema.json data.proposed.json schemas/data.proposed.schema.json |
There was a problem hiding this comment.
A nice to have thing here would be to extend this to .github/workflows/publish_next_web-features.yml.
No description provided.