Description
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:
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!