Skip to content
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

Provide version-less titles for series #359

Closed
dontcallmedom opened this issue Aug 6, 2021 · 4 comments · Fixed by #461
Closed

Provide version-less titles for series #359

dontcallmedom opened this issue Aug 6, 2021 · 4 comments · Fixed by #461

Comments

@dontcallmedom
Copy link
Member

When a consumer (such as BCD/MDN) is not interested in a specific version of a spec, but mostly its latest in the series, there is no good way to refer to the work since the only thing the data provides is the title of the latest version.

Maybe series should have a title - for W3C specs, the series end point of the W3C API provides such a title.

@dontcallmedom
Copy link
Member Author

(raised from mdn/content#7651 (comment))

@tidoust
Copy link
Member

tidoust commented Aug 9, 2021

Maybe series should have a title - for W3C specs, the series end point of the W3C API provides such a title.

I don't see where the W3C API provides a version-less title at the series level (or any kind of title at the series level, actually), could you provide an example?

Also, what would the version-less title look like for say, the wai-aria series or the css-color series?

@dontcallmedom
Copy link
Member Author

I don't see where the W3C API provides a version-less title at the series level (or any kind of title at the series level, actually), could you provide an example?

See e.g. https://api.w3.org/specification-series/wai-aria - it has a name property set to "Accessible Rich Internet Applications (WAI-ARIA)"

@tidoust
Copy link
Member

tidoust commented Aug 9, 2021

Ah, I was looking for a title property as everywhere else. That would have been too simple ;)

I'm not sure whether that series title is automatically generated. For instance, it returns "CSS Color" for the css-color series, and a naive approach would rather generate "CSS Color Module". It could be interesting to align this with the code that we have in place to generate the shortTitle property.

Anyway, we could leverage the W3C API whenever possible to create the version-less series.title property, and an extended version of the shortTitle code that also drops the version number when the series is not known to the W3C API.

tidoust added a commit that referenced this issue Dec 23, 2021
This adds a `title` and a `shortTitle` property to `series` that contain
version-less versions of the spec's title and short title. The version-less
version is retrieved from the W3C API for /TR specs, and computed by dropping
the level from the spec's title otherwise.

When a `shortTitle` is set explicitly for the spec in `specs.json`, that
title is used to compute the series' short title. This makes it possible to
compute short titles such as "WebRTC" or "ECMAScript" instead of more verbose
ones.

Close #359.
dontcallmedom pushed a commit that referenced this issue Jan 3, 2022
This adds a `title` and a `shortTitle` property to `series` that contain
version-less versions of the spec's title and short title. The version-less
version is retrieved from the W3C API for /TR specs, and computed by dropping
the level from the spec's title otherwise.

When a `shortTitle` is set explicitly for the spec in `specs.json`, that
title is used to compute the series' short title. This makes it possible to
compute short titles such as "WebRTC" or "ECMAScript" instead of more verbose
ones.

Close #359.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants