Open foolip opened 7 months ago
https://github.com/web-platform-dx/web-features/pull/762 is another feature we might want to revisit.
And https://github.com/web-platform-dx/web-features/pull/771, which I just merged with the description "The PressureObserver
API ..."
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 https://github.com/web-platform-dx/web-features/pull/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 https://github.com/web-platform-dx/web-features/pull/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.
Allowing backticks in names would also help a bit to distinguish names that are entirely lowercase because they're syntax.
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 name
and nameHTML
, description
and descriptionHTML
.
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 https://github.com/web-platform-dx/web-features/pull/810 and https://github.com/web-platform-dx/web-features/pull/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
.