-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add a short name to the schema (required) #545
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review to point out some interesting bits.
@@ -1 +1,2 @@ | |||
name: "Anchor Positioning" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name of the spec is "CSS Anchor Positioning", but prefix not needed.
@@ -1,3 +1,4 @@ | |||
name: "Scheduler API" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API because scheduling is a browser-internal thing as well. Similar argument to Navigation API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
browser-internal thing
Do we have any evidence that web developers know or care about this fact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I don't think most web developers think about how work is scheduled unless they specialize in performance. But it's like "paint", "layout" or "fetch". Browsers do these things, but there are also APIs for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all of this is fine, so I'm approving it.
That said, I've made some suggestions, thinking about how we might want to use this field. I'm not strongly committed to these suggestions (or couldn't even settle one one, in some cases). So perhaps an approach here is to adopt the changes that you like and open issues for anything that we ought to document as a naming guideline/convention?
@@ -1,3 +1,4 @@ | |||
name: "Scheduler API" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
browser-internal thing
Do we have any evidence that web developers know or care about this fact?
Co-authored-by: Daniel D. Beck <[email protected]>
To recap, I think these are some initial guidelines to emerge from the various edits here: Short name guidelinesAbove all else, observe these two principles:
In the absence of more definitive names, start from these guidelines:
|
Thank @ddbeck, that encapsulates well the decisions we landed on so far. A few thoughts:
This is the hardest guideline to follow I think. Both specification title and conventional casing would lead us to View Transitions and Idle Detections, but I stuck with sentence case. The hard part is the inconsistency we'd have between these and a case like "Fetch priority", and how to draw the line. I think we should list only the exceptions we've used, which so far is only matching API names, which are also written together, e.g., BroadcastChannel.
Neither of these cases are at play in the names we've used. Do you have a case in mind where we'll need to use this part of the guideline? |
@@ -1,3 +1,4 @@ | |||
name: "Sticky positioning" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check if position: sticky
might be more common.
@@ -1,3 +1,4 @@ | |||
name: "WebCodecs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, this is the spec name, it's not code.
Side note: all entries in browser-specs have a Most of the time, the property value is derived from the spec's title automatically but it is sometimes set manually, and we'd be happy to improve the values as needed. The short title is typically used by Bikeshed when a spec references a section in another spec. For instance, the AVIF's spec full title is "AOMedia Film Grain Synthesis 1 (AFGS1) specification". Its short title is "AVIF", and |
Thanks @tidoust, I didn't know about |
I'm going to merge this now and filing a new issue for the guidlines. |
I don't think (or don't recall ;)) that we gave much thoughts about keeping or dropping "API". The |
I'm on the fence about this one because I always think about beginners. It feels much more beginner-friendly, from my opinion, to say things like "has pseudo-element" rather than ":has", or "dialog html element" rather than "<dialog>". Note that it could be a mix of both: ":has pseudo" and "<dialog> element". But, asking people to recognize a tiny syntax character to know what we're talking about feels like an unnecessary barrier to me.
What if we have an SVG element feature at some point. How would someone know if "<foo>" is SVG or HTML? |
Additionally, update the backend api to support returning the data now. Given that web-platform-dx/web-features#545 is now merged, we now have a user friendly name. This commit updates our local version of defs.schema.json so that the autogenerated model can now be used when consuming the data. The backend/openapi.yaml now exposes that data through a field with the same name. Changes to the datastore (gds) library: - The Upsert method now uses the actual FeatureData argument (which now has the name field). - This List method which returns a backend.Feature is modified to use the new name field Change-Id: Ied10ce9eb36a6aac5bdf2f69384da555b7a9482e
Fixes #490.