Skip to content
This repository was archived by the owner on Jul 8, 2023. It is now read-only.
This repository was archived by the owner on Jul 8, 2023. It is now read-only.

Feature: switching docs version should retain the current page (if exists) #161

@lmammino

Description

@lmammino

🚀 Feature Proposal

As proposed by @Eomm in #160:

When you switch version in a page (like decorators for ex), the user is sent to the TOC, could we maintain the path changing only the version-path-param?

Motivation + Example

The user might be reading a page, for instance Request, and suddenly realises they are reading the doc for the wrong version. They might switch to the desired version but the switch will bring them to the ToC for that version rather than to the Request page for that version. So they have to navigate manually to the Request page, which requires extra effort.

Potential issue: pages might not exist in all versions

When a page does not exist in a given version, what do we do?

  • Option 1: we don't show the version itself in the dropdown
  • Option 2: we show the version but we point it to the Table of Contents for that version

Any preference @Eomm, @mcollina, @jsumners ?

Possible implementation

  • In the process-releases script, build a data file with an array of all the docs paths available.
  • In the template, where we render the dropdown boxes, we can easily check if a given page exists or not by accessing the data from the file above.

Metadata

Metadata

Assignees

Labels

help wantedHelp the community by contributing to this issuesemver-minorIssue or PR that should land as semver minor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions