-
Notifications
You must be signed in to change notification settings - Fork 106
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
Guidelines for short names #548
Comments
It's worth thinking more about sentence case vs. Capitalizing Every Word. #545 was merged with sentence case. I've sent #549 to show what would change if we capitalize. These cases are not great with sentence case:
And these cases are not great when capitalized:
@tidoust also pointed out that https://github.com/w3c/browser-specs has a I'm still leaning towards keeping sentence case, but am not at all committed to it. |
Regarding The same manual also lists some commonly misspelled terms with the example of "real-time communications", where capitalization depends on whether the term is used in titles and headings (and references to titles and headings) or to talk about the generic idea. Applied to web-features, the rule of thumb could perhaps depend on whether the feature has a strong bond with a specification or a heading in a specification (e.g., "Container Queries" could perhaps be seen as strongly tied to the "Container Queries" section of the CSS Containment spec), or whether we're more talking about a generic idea, or a generic idea applied to something specific (e.g., "CSS |
I made some comments about the guidelines listed in #545 which, I'm realizing now, would make more sense in this issue here:
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? |
@captainbrosset do you think a For the
|
#565 is a case where I felt like "CSS translate, scale, and rotate properties" was the short possible name. Guidelines should at least allow for that, or ideally guide us in the same direction in the same situations going forward. |
Sure, a long name would address my concern. But now I'm wondering if we need ID, shortName, and longName. Maybe just ID and longName? |
We might be able to get away with a single kind of name, I'm not sure. Right now there are no consumers for the names we've added, and probably a good next step is to talk to some people we think will show them... caniuse.com is the main consumer I have in mind, so looping in @Fyrd here. |
Copying what I wrote in #624 (comment): We have no guidelines for when the name should look like code or not, but some precedent. So far we have these names with
Roughly, my thinking has been that when adding
I think this has very little downside in the cases of global/static things like For instance methods (stuff on prototypes) it's a little bit inconsistent, already. I think we should favor short names, and for Array the style works. For HTML elements it's a bit awkward and I'm not sure the choices so far will stand, but the alternatives to
|
@ddbeck had some very useful thoughts and feedback in #655 (comment). Noting that here since I'll merge the PR, to not lose the discussion. |
What to do about the Web prefix has come up in #691, so I'll write down my thoughts here. Our guideline is "Avoid frequently-used abbreviations and nouns, such as API and Web", but I had to use the example "web workers" as one of the few "obvious" cases, and I don't think we can always omit Web. Based on MDN and what's in WPT, here's a fairly comprehensive list of what the specs call themselves:
A few more phrases that aren't the names of specs:
|
Also Web Bluetooth. |
There's a visual difference in these names, which I'm not sure carries meaning. @tidoust does that mean anything in W3C spec land? |
No. The title gets reviewed when a spec enters the Recommendation track, and sometimes changed to better align with the naming used in other specs, but that's done on an ad-hoc basis, and without a clear set of rules. The Manual of Style has a minimal set of guidelines on the title, essentially "Capitalize title words following U.S. usage". To my knowledge, there has not been any attempt at harmonizing titles across specs (e.g., to add/remove "API", to use a "Web" prefix, or to use a space after "Web"). I also note the Naming principles in the TAG's Web Platform Design Principles document. |
Here are my opinions on all of this. Where I don't think we should include Web in the name / identifier:
I'm not too sure about these:
In all other cases I think Web should be included, for a few different reasons. Because what comes after is a very generic word:
Because what comes after is a technology that also exists outside the web, and is sometimes a trademark:
Because Web is part of the name in syntax or API: Because the name is well established:
|
Your reasoning makes a lot of sense to me, but why the exception for something like notifications? It seems to me like that would be inline with "Because what comes after is a very generic word", which I think is a good reason to add the prefix. |
Mostly because the name of the spec is Notifications API. It must have been called Web Notifications by someone at some point, but that's not how I know the feature at least. Push is similar, sometimes called Web Push. I'd put these in the same category as the HTML5 era things, where the Web prefix didn't stick. |
The "should we omit API from names?" question came up on the WebDX call today. I'd like to partly unroll this. We have two broad (and overlapping) groups of features to contend with:
In the former case, we collect some evidence and make a call. That feels easy-ish. If the term "API" is genuinely inseparable as used by developers, then we accept it. I suspect there aren't that many cases where web developers won't know what we're talking about if we don't use the term API, but that does mean that sometimes we'll have to use it. In the latter case—if this project is generally successful—we have the possibility of choosing the name that web developers will see. That feels a little higher stakes. I suppose aesthetically I'd rather not canonize "API" in those cases. But also I worry that a real risk is getting an idiosyncratic name: one that came from a spec author or first person to blog about a feature, rather than several people thinking about or working with the feature. With that in mind, I think it's kinda nice to put the name to a discussion here in PR reviews—it's at least a nod toward the evolution that will play out amongst the broad group web developers over time. |
Short names were added in #545 and @ddbeck suggested guidelines at #545 (comment).
The text was updated successfully, but these errors were encountered: