Skip to content

Version selector on REST API reference page is confusing #27277

@not-my-profile

Description

@not-my-profile

I was quite confused why an endpoint that was documented to exist for my podman version returned a 404. Only afterwards I realized that I was still looking at the "latest" API docs because the Read the Docs version selector does not affect which API version is being viewed. Read the docs even shows a popover on page load "This may be an old version of this documentation" which further leads you to believe that you're viewing an older version.

URL: https://docs.podman.io/en/latest/_static/api.html

Image

While Read the Docs automatically injects the version selector, I think we could hide it by adding the following CSS to api.html:

readthedocs-flyout {
  display: none;
}

I think this would help but you might still be confused because the version in the URL does not necessarily correspond to the viewed version.

Reference.rst currently links specific versions via a custom ?version URL parameter that is then recognized in api.html:

if (query.has("version")) {

I think the best solution would be to introduce a custom version selector in api.html (just a simple <select>) in addition to hiding the Read the Docs version selector. This could still recognize the version URL parameter and ideally also update the tab title to include the version. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationIssue or fix is in project documentationtriagedIssue has been triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions