content
content copied to clipboard
Web API titles: some sample interfaces
This draft PR is to show what page titles based on https://github.com/orgs/mdn/discussions/248#discussioncomment-3797416 would look like. It updates the title and adds short-title
for three interfaces:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement https://developer.mozilla.org/en-US/docs/Web/API/Response https://developer.mozilla.org/en-US/docs/Web/API/XRWebGLBinding
I chose Response
because it's very commonly referenced and has some statics, the other two because they contain some quite long titles.
Note that the sidebars will look a bit silly unless you run this with the Yari from https://github.com/wbamberg/yari/tree/apiref-short-title, which contains the update to make APIRef use short-title
if it's available.
Preview URLs (50 pages)
- /en-US/docs/Web/API/HTMLVideoElement/autoPictureInPicture
- /en-US/docs/Web/API/HTMLVideoElement/disablePictureInPicture
- /en-US/docs/Web/API/HTMLVideoElement/enterpictureinpicture_event
- /en-US/docs/Web/API/HTMLVideoElement/getVideoPlaybackQuality
- /en-US/docs/Web/API/HTMLVideoElement/leavepictureinpicture_event
- /en-US/docs/Web/API/HTMLVideoElement/msFrameStep
- /en-US/docs/Web/API/HTMLVideoElement/msHorizontalMirror
- /en-US/docs/Web/API/HTMLVideoElement/msInsertVideoEffect
- /en-US/docs/Web/API/HTMLVideoElement/msIsBoxed
- /en-US/docs/Web/API/HTMLVideoElement/msIsLayoutOptimalForPlayback
- /en-US/docs/Web/API/HTMLVideoElement/msIsStereo3D
- /en-US/docs/Web/API/HTMLVideoElement/msSetVideoRectangle
- /en-US/docs/Web/API/HTMLVideoElement/msStereo3DPackingMode
- /en-US/docs/Web/API/HTMLVideoElement/msStereo3DRenderMode
- /en-US/docs/Web/API/HTMLVideoElement/msZoom
- /en-US/docs/Web/API/HTMLVideoElement/onMSVideoFormatChanged
- /en-US/docs/Web/API/HTMLVideoElement/onMSVideoFrameStepCompleted
- /en-US/docs/Web/API/HTMLVideoElement/onMSVideoOptimalLayoutChanged
- /en-US/docs/Web/API/HTMLVideoElement/requestPictureInPicture
- /en-US/docs/Web/API/HTMLVideoElement/videoHeight
- /en-US/docs/Web/API/HTMLVideoElement/videoWidth
- /en-US/docs/Web/API/Response/Response
- /en-US/docs/Web/API/Response/arrayBuffer
- /en-US/docs/Web/API/Response/blob
- /en-US/docs/Web/API/Response/bodyUsed
- /en-US/docs/Web/API/Response/body
- /en-US/docs/Web/API/Response/clone
- /en-US/docs/Web/API/Response/error
- /en-US/docs/Web/API/Response/formData
- /en-US/docs/Web/API/Response/headers
- /en-US/docs/Web/API/Response/json
- /en-US/docs/Web/API/Response/ok
- /en-US/docs/Web/API/Response/redirect
- /en-US/docs/Web/API/Response/redirected
- /en-US/docs/Web/API/Response/statusText
- /en-US/docs/Web/API/Response/status
- /en-US/docs/Web/API/Response/text
- /en-US/docs/Web/API/Response/type
- /en-US/docs/Web/API/Response/url
- /en-US/docs/Web/API/XRWebGLBinding/XRWebGLBinding
- /en-US/docs/Web/API/XRWebGLBinding/createCubeLayer
- /en-US/docs/Web/API/XRWebGLBinding/createCylinderLayer
- /en-US/docs/Web/API/XRWebGLBinding/createEquirectLayer
- /en-US/docs/Web/API/XRWebGLBinding/createProjectionLayer
- /en-US/docs/Web/API/XRWebGLBinding/createQuadLayer
- /en-US/docs/Web/API/XRWebGLBinding/getDepthInformation
- /en-US/docs/Web/API/XRWebGLBinding/getReflectionCubeMap
- /en-US/docs/Web/API/XRWebGLBinding/getSubImage
- /en-US/docs/Web/API/XRWebGLBinding/getViewSubImage
- /en-US/docs/Web/API/XRWebGLBinding/nativeProjectionScaleFactor
Flaws (12)
Note! 44 documents with no flaws that don't need to be listed. 🎉
URL: /en-US/docs/Web/API/HTMLVideoElement/videoHeight
Title: HTMLVideoElement: videoHeight property
Flaw count: 2
-
macros:
-
/en-US/docs/Web/API/HTMLMediaElement/resize does not exist
-
/en-US/docs/Web/API/HTMLVideoElement/resize does not exist
-
URL: /en-US/docs/Web/API/XRWebGLBinding/createCylinderLayer
Title: XRWebGLBinding: createCylinderLayer() method
Flaw count: 2
-
macros:
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
URL: /en-US/docs/Web/API/XRWebGLBinding/createEquirectLayer
Title: XRWebGLBinding: createEquirectLayer() method
Flaw count: 2
-
macros:
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
URL: /en-US/docs/Web/API/XRWebGLBinding/createProjectionLayer
Title: XRWebGLBinding: createProjectionLayer() method
Flaw count: 2
-
macros:
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
URL: /en-US/docs/Web/API/XRWebGLBinding/createCubeLayer
Title: XRWebGLBinding: createCubeLayer() method
Flaw count: 2
-
macros:
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
URL: /en-US/docs/Web/API/XRWebGLBinding/createQuadLayer
Title: XRWebGLBinding: createQuadLayer() method
Flaw count: 2
-
macros:
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
/en-US/docs/Web/API/GLenum redirects to /en-US/docs/Web/API/WebGL_API/Types
-
With the sidebar, i prefer a shorter title. The header says the API and that the are instance properties, so I think we can leave the API and the word property
off.
My favorite:
With the word property:
As is:
We do need to align the icon. With the short version, it would look better after the term.
Thanks for looking!
With the sidebar, i prefer a shorter title. The header says the API and that the are instance properties, so I think we can leave the API and the word
property
off.
Yes. This PR also adds a short-title
key that can be used in contexts where things like "property" are clear. This needs an update in the sidebar code, to make use of the short-title
. I've made a separate Yari PR that contains this update, at https://github.com/wbamberg/yari/tree/apiref-short-title. So if you want to see what titles will look like you'll need to run this PR with that Yari PR:
- clone wbamberg/yari and check out https://github.com/wbamberg/yari/tree/apiref-short-title
- clone wbamberg/content and check out the branch in this PR
- point wbamberg/yari's CONTENT_ROOT at your local copy of wbamberg/content
- run yarn dev from the wbamberg/yari clone
We do need to align the icon. With the short version, it would look better after the term.
Yes, I agree about this. But I think it is a different issue.
This pull request has merge conflicts that must be resolved before it can be merged.
Some other issues caused by long titles on mobile screens are:
- Featured articles on the homepage expand beyond the viewport:
- Breadcrumbs with long names overflow the page and make it horizontally scrollable:
After scrolling right:
Some other issues caused by long titles on mobile screens are:
Thanks for highlighting these!
I think the "Featured articles" should be improved by this change, because it will give more line breaking opportunities, and as for breadcrumbs, the PR to use short titles in sidebars will also use them in breadcrumbs, so that should help there.
This pull request has merge conflicts that must be resolved before it can be merged.