-
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
Guideline for API names and descriptions #822
Comments
#762 is another feature we might want to revisit. |
And #771, which I just merged with the description "The |
This is more in line with web-platform-dx#810, although the discussion continues: web-platform-dx#822
OK, I've been thinking over this general problem of "never say API". For feature names, I think we made the right choice: we do not want to create features that have the appearance of having "completed" an API. Suppose the Media Session API acquires new and interesting capabilities. A "media session" feature is still usable, even if the whole of the Media Session API is not implemented. Naming "Media Session API" makes it harder to draw that distinction. That said, I'm thinking that "Device Posture API" or "Media Session API" would be very good groups (and will inevitably appear in snapshots). That leaves descriptions: I'm more comfortable with descriptions being a moving target. So initially any feature could start with "The Special API does …" or similar. When follow-on features appear, those descriptions can change to reflect that without losing the stability of the feature name. |
API in group names sounds reasonable, and groups would tend to more often match whole specs and their names. I've sent #861 for Web Speech API. This does put additional pressure on capitalization though. "Web speech API" looks very opinionated about capitalization when we're taking extra steps to disagree with the spec name. Looking back at #549, I think most names aren't made worse with title capitalization. The borderline cases are where we've had to mint a name, and when capitalizing it makes it feel more "official" than it is, like "Background Gradients". But I think it will raise fewer eyebrows than our sentence capitalization. We should still use sentence caps in descriptions I think, so there might be some new tricky cases there. Allowing backticks in names would also help a bit to distinguish names that are entirely lowercase because they're syntax. |
FWIW, I suggested lowercase names when there were no groups or snapshots. A big part of my motivation was maintenance: it's easier to be consistent with one, consistent rule. We longer have that anyway, so I'm less inclined to fight for it. cc: @Elchi3 maybe you have a take on this. |
It'd be good to talk to consumers about what they'd like to see from us on string formats, whether they'd prefer unformatted plaintext, Markdown, or HTML. |
I think we should generate plaintext and HTML from Markdown, and publish only those, not the source Markdown. So both |
Alternatively we make it part of an API, so that we can also support linking between features and generating the right descriptions given a URL template or something. |
In #810 and #752 we have some names and descriptions that feel a bit quirky compared to how most resources talk about them.
Should the name be:
Should the description start with:
navigator.audioSession
object, thenavigator.audioSession
API, or the Audio Session API?navigator.mediaSession
object, thenavigator.mediaSession
API, or the Media Session API?navigator.devicePosture
object, thenavigator.devicePosture
API, or the Device Posture API?Considerations:
navigator
, sincenavigator
is effectively a namespace to avoid putting stuff onwindow
.The text was updated successfully, but these errors were encountered: