Skip to content

Conversation

@ihsraham
Copy link
Collaborator

@ihsraham ihsraham commented Dec 12, 2025

the new version switcher and the automation scripts to manage our release lifecycle.

image image

What's new

  • Sidebar Switcher: Added a custom version dropdown in the sidebar. It's "page-aware" (keeps you on the same doc when switching) and includes a GitHub link.
  • Dynamic Labels: The "Next" version label in the dropdown now auto-updates based on the package.json version.
  • Lifecycle Scripts: Added Node.js scripts to automate "freezing" releases and cleaning up, so we don't have to manually delete folders and edit configs.

The Scripts

  • npm run version:release <ver> <next>: Freezes current work as <ver> and bumps project to <next>. (Includes validation to prevent skipping versions).
  • npm run version:remove <ver>: Safely deletes a specific old version (docs + sidebar + config).
  • npm run version:reset <target>: "Factory Reset" — wipes all history and returns to a single-version state.

How to Test (Simple Flow)

  1. Release a test version:

    # (Assuming you are currently on 0.5.x)
    npm run version:release 0.5.x 0.6.x

    Result: docs/ is now 0.6.x. You'll see a new versioned_docs/version-0.5.x folder.

  2. Verify UI:
    Start the server (npm run start). You should see 0.5.x and 0.6.x in the dropdown.

  3. Delete the test version:

    npm run version:remove 0.6.x

    Result: The 0.6.x folder is gone, and you're back to just having 0.5.x docs.

@alessio alessio requested a review from philanton December 12, 2025 14:10
@alessio
Copy link
Contributor

alessio commented Dec 17, 2025

Can this be merged?

@alessio alessio merged commit 179c76e into master Dec 18, 2025
7 checks passed
@alessio alessio deleted the add-version-switcher branch December 18, 2025 14:17
@nksazonov
Copy link
Contributor

Incredibly great work, @ihsraham !

@dimast-x
Copy link
Collaborator

Great work, the feature works, however some improvements are needed to finalise this story:

According to Figma design, as mentioned in the requirements, the switcher must be in the navbar.
image

Also, now there is a big empty blank space in the sidebar that seem off.

image

Lastly, I don't see the version switcher on Mobile.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants