Skip to content

Comments

rubydoc: fix sidebar navigation links on nested pages#21589

Open
GunniBusch wants to merge 1 commit intoHomebrew:mainfrom
GunniBusch:fix-rdoc
Open

rubydoc: fix sidebar navigation links on nested pages#21589
GunniBusch wants to merge 1 commit intoHomebrew:mainfrom
GunniBusch:fix-rdoc

Conversation

@GunniBusch
Copy link

@GunniBusch GunniBusch commented Feb 18, 2026

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

This fixes #21588
It overrides app.js and repairs the broken navigation.

Copilot AI review requested due to automatic review settings February 18, 2026 04:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Homebrew’s overridden YARD app.js to fix broken sidebar navigation when browsing nested RubyDoc pages (as reported in #21588), and makes minor docstring formatting tweaks in an autogenerated Sorbet RBI.

Changes:

  • Add/override YARD template app.js with a postMessage-driven navigation handler that fetches and swaps #main content for sidebar navigation.
  • Re-run/adjust parts of the page-init logic after dynamic navigation.
  • Minor comment formatting changes in parser@3.3.8.0.rbi.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 6 comments.

File Description
Library/Homebrew/yard/templates/default/fulldoc/html/js/app.js Overrides YARD JS to handle sidebar navigation on nested pages by resolving URLs and swapping main content.
Library/Homebrew/sorbet/rbi/parser@3.3.8.0.rbi Small docstring formatting changes in an autogenerated RBI file.
Files not reviewed (1)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of extra code added for what should be a relatively simple regression?

@p-linnane does this related to the recent GitHub Pages work perhaps?

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.

rubydoc: sidebar redirects with wrong url

2 participants