Skip to content

Plan for deprecation & removal of doc versioned id #6018

Description

@slorber

Have you read the Contributing Guidelines on issues?

Motivation

As part of #5830 I had to start a refactor we wanted to do for a long time:

  • Docs versioned sidebars are not normalized anymore when created (ie category and docs shorthand are kept, default options are not "freezed")
  • Not adding a version prefix in versioned sidebar items
  • Using an unversioned docId everywhere ("dir/doc") instead of a versioned docId ("version-1.0.0/dir/doc")

The implementation in this PR is just the beginning:

  • New sidebars are copied un-normalized
  • Allow using both versioned / unversioned doc ids for retrocompatibility

We should now:

  • Deprecating the doc.id asap with a clear warning telling the user to upgrade the sidebar files (ie removing the version prefixes)
  • Plan a breaking change in a few months
  • Do the cleanup: remove doc.id, then rename doc.unversionedId to doc.id

Or maybe we could do the breaking change / cleanup immediately, considering it's not too painful for users to remove the sidebar prefix?
(but how would they discover what they need to do, we probably still need a good error message in our code?)

Self-service

  • I'd be willing to do some initial work on this proposal myself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalThis issue is a proposal, usually non-trivial change

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions