feat: list pages and islands - #3781
Draft
Mpdreamz wants to merge 7 commits into
Draft
Conversation
Adds a new `listing:` entry type for docset.yml / toc.yml that:
- Glob-discovers pages under a folder and registers them in the nav
tree with Hidden=true (links, prev/next, search all work; nav tree
does not render them)
- Generates a grouped index page with stacked page-cards, a text
filter input, and multi-select group chips
- Pages opt into a group via frontmatter `listing: group-name`
(shorthand) or `listing: {group: group-name}` (mapping form)
- Supports a real index.md at the listing root and per group;
creates a synthetic page if absent (appends `:::{listing}\n:::`
to the body)
- Groups ordered by the `groups:` list in the TOC entry, then
remaining groups alphabetically; unnamed pages rendered last
New files:
- Toc/Listing/ListingFrontMatterReader.cs — frontmatter-only YAML read
- Extensions/Listing/ListingDocsBuilderExtension.cs — auto-enabled
extension; intercepts real index files; creates synthetic ones
- Extensions/Listing/ListingIndexFile.cs — MarkdownFile subtype that
appends the listing directive to its content
- Myst/Directives/Listing/ListingBlock.cs — render-time card collection
- Myst/Directives/Listing/ListingView.cshtml — grouped page-cards UI
- Myst/Directives/Listing/ListingViewModel.cs
- Assets/listing.ts — client-side multi-select filter + group chips
- Assets/listing.test.ts — 17 Jest tests (pure predicate + DOM)
Key decisions:
- ExcludeFromIndexing added to INavigationItem (default = Hidden) so
listing pages are hidden from nav but still indexed for search
- ListingFrontMatterConverter handles both scalar and mapping YAML
- NavigationDocumentationFileLookup uses reference identity; synthetic
index files must be created directly (not via defaultFileHandling
which returns ExcludedFile, filtered from Files)
- MarkdownParser constructed before InstantiateExtensions so it can
be passed to ListingDocsBuilderExtension
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When visual: island is set, listing pages are hidden from the main nav tree but get a dedicated island sidebar nav instead. The island nav renders a back button linking to the parent root, a flat listing root entry (using the listing's navigation_title), and all groups with their pages expanded. - Add ListingVisual.Island enum value - Add IslandListingRoot and IsIslandListing to INavigationItem interface - Set IslandListingRoot on all island listing pages/groups so they render the island nav instead of the main tree - Set IsIslandListing on the listing root FolderNavigation so the index page also enters the island nav - Add IslandNavViewModel, _IslandNav.cshtml for island sidebar rendering - Wire island nav rendering in both IsolatedBuildNavigationHtmlWriter and GlobalNavigationHtmlWriter Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove ListingVisual.Island; island nav is now configured with island: true independently of visual: (none|groups|all) - Add Island bool to ListingOptions; parse island: true/false from YAML - Validate: island: true + visual: none is an error (listing unreachable) - groupHidden is now derived from visual: none only, not island status - Back button in _IslandNav uses full-width outlined button style (border-2 border-blue-elastic, w-full) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Island listings always show as a single item in the parent nav tree. The visual: option now controls what the island sidebar renders: - visual: groups -> island shows group headings only (no pages listed) - visual: all -> island shows groups with their pages Parent nav changes: - Island listing groups are always hidden from the parent tree - Island folders render a link chevron (right-pointing) instead of a toggle, so clicking it navigates into the island Island nav changes: - Pages beneath groups only rendered when visual: all - Visual passed through IslandVisual on FolderNavigation / INavigationItem Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three fixes: 1. QueryIndex path-first matching: island groups hide their index page so the main nav tree suppresses the group node, but QueryIndex was skipping hidden items and picking the first visible content page as the folder index. Now QueryIndex checks by SourcePath first (visibility-independent) before falling back to the visibility scan. 2. Island nav group headings now use nav-link (flex w-full) instead of nav-folder-link, making them full-width clickable like all other nav items. Page items under groups use ml-4 indentation. 3. Island chevron in parent nav: remove inline style that was conflicting with nav-chevron CSS; the class already applies -rotate-90 (right- pointing) by default. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Label error. Requires exactly 1 of: automation, breaking, bug, changelog:skip, chore, ci, dependencies, documentation, enhancement, feature, fix, redesign. Found: |
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.
Summary
Implements a way to create listings/overview pages that automatically lists and groups pages nested pages.
Great if you have data driven docs that you don't want to modify
docset.ymlfor. Also if you have long running branches all trying to append a child in the toc (like our RFC docs) these tend to always merge conflict. This solves that.Adds a
listing:TOC entry type that glob-discovers documentation files, hides them from the main nav tree, and generates a grouped index page with a client-side filter.listing: <path>— declares a listing root; files are discovered viaglob:and grouped bylisting:frontmattervisual: none|groups|all— controls island nav depth: groups only, or groups + pagesisland: true— listing pages get a dedicated sidebar nav instead of the main tree; the listing appears as a single item with a>chevron in the parent navgroups: [...]— explicit group ordering with alphabetical fallbacksort: asc|desc— page order within groupsOverview pages
Visual
Dictates how much you want to see in the nav of the generated pages, the default is
none.visual: all
visual: groups
visual: none
Island nav
cursorful-video-1785946111134.mp4
An island creates a dedicated navigation for the generated tree, this is great if you have 100s of pages. This allows you to use
visual: allin a way that doesn't bloat the overal parent navigation.Depends on / Related
docs-eng-team usage: elastic/docs-eng-team#735
A first usage of this feature to list our RFCs automatically.
Follow ups
We could extend
island: trueto- folderin thetocand allow nesting/stacking islands. This would do wonders for our reference docs where we can make e.g all top level items an island so our reference navigation is not HUGE. but alsoclientsoresqlcould be a sub island because these are HUGE subnavigations of their own.The other thing this unlocks is a much simpler extension mechanism for e.g detection rules.
Test plan
dotnet buildpasses./build.sh unit-testpasses~/Projects/docs-eng-team/docswithlisting: rfcs,visual: all,island: true— RFC index shows grouped cards + filter; island sidebar renders correctly on all pagesvisual: groups— island sidebar shows group headings only (no individual pages)island: true + visual: noneemits a build error>chevron (no children)🤖 Generated with Claude Code