Repository navigation
feat(docs): nest PR gatekeeper under Automations in the docs sidebar - #176
Merged
Merged
Conversation
…under Automations Adds an optional `parent` frontmatter field (the parent's entry id). A page with a parent is rendered as an indented sub-item right under it, in the parent's group, never twice. The parent shows an active trail while the child is open, the breadcrumb includes the parent, and prev/next follow the sidebar's visual order. - docsNav: groupDocsNav nests children (cycle/orphan safe), flattenDocsNav, isActiveDocTrail, docsNavAncestors, shared docsNavItemFromEntry - DocsSidebarNav + recursive DocsNavList components, nested list markup - pr-gatekeeper: parent automations, order 21 (webhooks 22), EN and ES - fix: /es/docs no longer highlights as active on every Spanish page - tests: unit nesting specs, Container API render test (EN/ES), frontmatter guards for `parent`; vitest split into unit and render projects Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…view notes - docsNavPage.test.ts: full EN/ES pages from the dev server (breadcrumb Docs / Automations / PR gatekeeper, prev/next around the child, sidebar trail on the real page) - DocsShell: pin prev/next to flattenDocsNav; drawer scrolls the current page into view when it opens (short phones) - docsNavAncestors: first entry wins on a repeated slug, as in groupDocsNav; stronger cycle assertion and a duplicate-slug test - ARCHITECTURE: one-level nesting policy and child order rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Owner feedback: the PR gatekeeper guide (#175) showed at the same level as Automations. It now sits below Automations as its sub-item, in EN and ES.
Generic mechanism: optional
parentfrontmatter field (the parent's entry id, same value in both languages).<ul>right under its parent, inside the parent's group, never twice. Always visible (no toggle): one fewer click and focus stop; screen readers announce it as a level-2 list.aria-current="page"+ the filled highlight; its parent getsis-trail(accent text, no fill) and the sub-list guide line turns accent.Docs / Automations / PR gatekeeper(URLs stay flat,/docs/pr-gatekeeper).flattenDocsNav), not the raworder.pr-gatekeeperorder 22 -> 21 andwebhooks21 -> 22 so the flat order (/api/docsmanifest) matches the sidebar. Orders stay contiguous.Also fixes a pre-existing bug found by the render test:
/es/docs(Introduccion) was marked active on every Spanish page because only/docswas excluded from prefix matching.Files
src/lib/docsNav.ts: nesting ingroupDocsNav,flattenDocsNav,isActiveDocTrail,docsNavAncestors,docsNavItemFromEntry/docSlug(shared by layout and tests), ES index fixsrc/components/docs/DocsSidebarNav.astro,DocsNavList.astro(recursive viaAstro.self)src/layouts/Docs.astro,src/styles/docs-shell.css,src/content.config.tsvitest.config.tssplit intounit+renderprojects;vitest.render.config.tscompiles.astrofor the Container API (configFile: false: the Cloudflare adapter's Vite plugin rejects vitest's SSR env)Tests
docsNav.test.ts): nesting, ordering of siblings, no duplicates, parent's group wins, orphan/self/cycle, multi-level, visual order for prev/next, trail, ancestors,/es/docsnot active everywheredocsNavNesting.render.test.ts, Astro Container API, real EN+ES frontmatter): PR gatekeeper in adocs-nav-sublist right under Automations, listed once, Webhooks back at top level after the block,aria-currentonly on the child +is-trailon Automations, no trail elsewhereparentexists, not self, same group, one level, children right after parent in flat order, EN/ES paritynpm test: 79 files / 2033 tests green;npx astro check: 0 errors;npm run build: OKVisual check (agent-browser, local
astro dev) at 1440x900 and 390x844 with the drawer open, EN and ES, plus keyboard Tab from Automations to the child (focus ring visible).Deploy notes
No env vars, no migrations. No VERSION file in this repo; deploy on merge per the existing workflow.
🤖 Generated with Claude Code