Skip to content

Smooth documentation navigation and move Nygen link to footer - #95

Merged
parashardhapola merged 1 commit into
masterfrom
docs-navigation
Oct 26, 2026
Merged

parashardhapola merged 1 commit into
masterfrom
docs-navigation

Conversation

@parashardhapola

Copy link
Copy Markdown
Member

Keep navigation expanded from the initial render, preload the shared font and restore sidebar scroll position early. Move the Nygen link into the native footer and fingerprint the modified theme modules. Documentation tests, strict builds and desktop and mobile browser checks passed.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Keep documentation navigation expanded and move Nygen link to footer

✨ Enhancement 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Keep navigation expanded from initial render through browser hydration to prevent layout shifts.
• Restore sidebar scroll position early and preload the shared font for smoother navigation.
• Move the Nygen link to the native footer and document the theme modification.
Diagram

graph TD
  Config["MyST config"] --> Builder["Docs builder"] --> Template["Theme template"] --> Modules["Browser modules"] --> Pages["Rendered pages"] --> Browser["Browser navigation"]
  Builder -->|injects head assets| Pages
  Config -->|sets footer link| Pages
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Fix navigation state upstream
  • ➕ Avoids matching minified JavaScript and rewriting module references.
  • ➖ Depends on upstream acceptance and a theme release; maintaining a fork would add overhead.
2. Use only browser-side navigation scripts
  • ➕ Avoids patching the downloaded theme.
  • ➖ Cannot ensure sections are expanded in the initial HTML or remain stable through hydration.

Recommendation: The build-time patch is a reasonable targeted solution for the pinned theme because it addresses both initial render and hydration. Treat its exact-match checks as a compatibility guard, and prefer an upstream theme option or fix when one becomes available.

Files changed (3) +100 / -5

Enhancement (1) +89 / -4
build_docs.pyPatch theme navigation and load navigation assets early +89/-4

Patch theme navigation and load navigation assets early

• Downloads and patches the pinned theme before the strict build so navigation starts expanded and stays expanded after browser code runs, then fingerprints and rewrites references to its browser modules. Generated pages preload the shared font and restore saved sidebar scroll position early. Brand-asset linking now finds the Nygen symbol in the footer configuration.

docs/build_docs.py

Documentation (1) +10 / -0
THIRD_PARTY_NOTICES.mdDocument the modified MyST theme +10/-0

Document the modified MyST theme

• Adds the MyST Book Theme source, copyright, and MIT license notice. Explains that the documentation build modifies its navigation behavior.

THIRD_PARTY_NOTICES.md

Other (1) +1 / -1
myst.ymlPlace the Nygen link in the native footer +1/-1

Place the Nygen link in the native footer

• Moves the existing Nygen documentation-home link and symbol from the navbar end to the theme's footer part.

docs/source/myst.yml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can type 'qodo, fix this' on a finding and the fix lands right on your PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@parashardhapola
parashardhapola merged commit b620576 into master Oct 26, 2026
2 checks passed
@parashardhapola
parashardhapola deleted the docs-navigation branch October 26, 2026 19:14
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.

1 participant