Skip to content

Add version selector to Docs#1356

Open
AdrianDAlessandro wants to merge 4 commits into
docs-version-bannerfrom
docs-version-selector
Open

Add version selector to Docs#1356
AdrianDAlessandro wants to merge 4 commits into
docs-version-bannerfrom
docs-version-selector

Conversation

@AdrianDAlessandro

Copy link
Copy Markdown
Collaborator

Description

This PR extends on #1355 by adding a version selector widget to the bottom right of the docs (inspired by the Django docs and the MUSE1 documentation).

The widget is built by adding HTML and CSS components to the theme/header.hbs with some JS to dynamically determine which version of the docs we are currently in (just like the banner in #1355, this was LLM-assisted). But the list of versions needs to be generated dynamically, so this is achieved following the same pattern pre-existing in the documentation:

  1. Define a jinja template for the header file
  2. Write a script to turn that script into the required file
  3. Make git ignore the generated file
  4. Include a header option in the justfile to run the script

I also have removed the "Other versions of documentation" section of the docs. I believe this widget supersedes the need for that section, which was already a little buggy/confusing because it would always redirect to the development version of the docs.

Screenshots:
Screenshot 2026-06-17 at 17 37 24
Screenshot 2026-06-17 at 17 37 49
Screenshot 2026-06-17 at 17 37 38

An extension on #1188

Assisted-by: Claude Sonnet 4.6

Type of change

  • Bug fix (non-breaking change to fix an issue)
  • New feature (non-breaking change to add functionality)
  • Refactoring (non-breaking, non-functional change to improve maintainability)
  • Optimization (non-breaking change to speed up the code)
  • Breaking change (whatever its nature)
  • Documentation (improve or add documentation)

Key checklist

  • All tests pass: $ cargo test
  • The documentation builds and looks OK: $ cargo doc
  • Update release notes for the latest release if this PR adds a new feature or fixes a bug
    present in the previous release

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

@AdrianDAlessandro AdrianDAlessandro moved this to 👀 In review in MUSE Jun 17, 2026
@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.80%. Comparing base (64b81dd) to head (1084f2a).

Additional details and impacted files
@@                 Coverage Diff                  @@
##           docs-version-banner    #1356   +/-   ##
====================================================
  Coverage                88.80%   88.80%           
====================================================
  Files                       58       58           
  Lines                     8516     8516           
  Branches                  8516     8516           
====================================================
  Hits                      7563     7563           
  Misses                     640      640           
  Partials                   313      313           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

1 participant