Skip to content

[FR] API doc version context switcher #128

Open
@sserrata

Description

@sserrata

Is your feature request related to a problem?

When implementing versioning, it's easy for a user to forget or overlook which version of an API doc they are looking at. The existing versioning system provides a version dropdown selector but individual API docs lack the context necessary to label what API version it applies to.

Describe the solution you'd like

An API doc "version context switcher" component that can be used to:

  • Easily identify the current version you are looking at
  • Display and allow the user to easily switch the context to other APIs doc versions the endpoint is supported in

Example:

Screen Shot 2022-06-10 at 2 58 16 PM

A component like the one above could possibly fit in the upper-right of each API doc item, above the ApiDemoPanel section. Preferable using the built-in Infima Tabs or Button components.

The current version should be in the active state. The other versions should only be displayed if the endpoint is actually supported in those versions. The latter will likely require an extended API versions metadata object/file to allow for quick lookup and conditional rendering of supported versions.

Describe alternatives you've considered

Not worrying about it. We already have a dropdown selector and version badge in the sidebar.

Additional context

Will share third-party examples of this use case if I find any!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed and we are accepting pull requests from anyone willing to take this on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions