Skip to content

Sidebar: match section items by sbSecId, so sections can be reordered - #6909

Merged
muuki88 merged 1 commit into
masterfrom
agent/sidebar-match-sbsecid
Nov 18, 2026
Merged

muuki88 merged 1 commit into
masterfrom
agent/sidebar-match-sbsecid

Conversation

@patmmccann

@patmmccann patmmccann commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #5630.

Why

#5630 notes that the sidebar is tedious to update, because a page's sidebarType has to line up with the sections in _data/sidebar.yml. The cause is in _includes/left_nav.html: it finds each section's items with where: "sbSecId", forloop.index0, i.e. the section's position. Moving a section in sidebar.yml therefore meant renumbering sbSecId on its entries and sidebarType on every page in it.

Change

  • left_nav.html matches by ID: items are now selected with the header's own sbSecId. The highlighted-section check already used it. sbSecId becomes a stable ID, so reordering sections means moving their blocks in sidebar.yml, with no page changes.
  • No visible change today: all 11 section headers have sbSecId equal to their position (0 = Overview … 10 = Prebid Agents), and no sidebar entry points at a missing section, so the output is the same.
  • README: a new "Sidebar" section explains how sections, sbSecId and sidebarType fit together.

#5630

Together with #6851 (release notes nav, PBS-Java release notes, header bidding expert pages, Prebid.js 11 cleanup), #6907 (bidder pages using renamed modules) and #6908 (GPID page), this covers the items listed on #5630 and its follow-up list.

Testing

The rendered sidebar on this PR's Netlify preview is identical to #6907's preview, which is built from master without this change, on six pages in different sections: Prebid.js (getting-started), Prebid Server (prebid-server-overview), a bidder page (msft), Prebid Mobile, Tools (professor-prebid) and Support (release-notes). Comparing with production instead shows only Netlify's link rewriting (/x.html becomes /x), not changes from this PR.

🤖 Generated with Claude Code

left_nav.html looked up each section's items with the section's loop
index, so reordering sections in sidebar.yml meant renumbering sbSecId
and every page's sidebarType. Use the header's own sbSecId instead.
Every header's sbSecId equals its position today, so the rendered
sidebar is unchanged. Document how the sidebar is wired in README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for prebid-docs-preview ready!

Name Link
🔨 Latest commit 1812a05
🔍 Latest deploy log https://app.netlify.com/projects/prebid-docs-preview/deploys/6ae505e9de181527be03def1
😎 Deploy Preview https://deploy-preview-6909--prebid-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T21:04:18.384162Z 1812a05 PR opened
🔒 Security Review ✅ Completed 2026-10-30T21:05:07.093693Z 1812a05 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@muuki88
muuki88 merged commit 9529b50 into master Nov 18, 2026
8 checks passed
@muuki88
muuki88 deleted the agent/sidebar-match-sbsecid branch November 18, 2026 23:57
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.

Rework navigation and update or remove outdated pages

2 participants