docs(nav): menulinks nav, flat doc search corpus, breadcrumbs, quick search, and cache TTLs#260
Open
jdcmsd wants to merge 3 commits into
Open
docs(nav): menulinks nav, flat doc search corpus, breadcrumbs, quick search, and cache TTLs#260jdcmsd wants to merge 3 commits into
jdcmsd wants to merge 3 commits into
Conversation
…search, and cache TTLs
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
b669e38 to
9c8950f
Compare
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.
Okay, it's ready for some testing. I didn't want to merge it straightaway because it became MUCH more voluminous than I'd intended, and I've learned the hard way not to do a launch on a Friday night.
This completely redoes the breadcrumb system, retiring the last vestiges of the ancient 7-layer docs relationship structure. It's still technically in the contentlets; it just no longer plays a role in site organization. Breadcrumbs are the most obvious place where its removal will be noticed; it's also no longer playing any kind of determinate role in the quick search results.
This makes me very happy, to have flattened and horizontalized the latter, because now removing "stub" articles that just existed as section parents will no longer have any implications for the content previously held hostage below it.
This also integrates with the Menu Link API plugin I made, to replace the use of the Nav API. This allows me to reference menu links irrespective of their
showOnMenustatus, which allows me to split the nav in a way that complements the nav/search compromise. That is, now the nav consists of a "daylight nav" that's always there, and a "shadow nav" that shoehorns docs into the nav when you're visiting them, even if they're not usually part of the curated list.My hope is that this improves on one of the pain points of the last few months in a meaningful way.
Claude summary of the technical fiddly bits below.
This PR finishes moving docs navigation off the deep GraphQL TOC and onto menulinks, while keeping a flat GraphQL
DotcmsDocumentationlist for quick search, sitemap, and legacysideNav[0].dotcmsdocumentationchildrenconsumers.Navigation & data
getNavSections/fetchNavData(menulinks API +navPayloadToApiNavTree), withfilterApiNavForMenuAndSlugunchanged for visible menu behavior.getNavSections:sectionsAllForPathsfromfilterApiNavKeepAllLeavesso quick-search result cards can show breadcrumb trails forshowOnMenu: falselinks without exposing them in the filtered nav. Threaded through docs layout, block pages, persona landings, header, and client refetch.getSideNavnow queries a flatDotcmsDocumentationCollection(non-zero limit, validsortBy), synthetic root shape preserved for callers; cache key bumped throughdocsSearchFlatV4as the query evolved.Breadcrumbs
Breadcrumbs.tsximplementation (removed duplicate.jsresolution bug); menulinks forest uses neutralchildrenvianavSectionsToBreadcrumbForest./; path matching uses canonical slug rules where appropriate.Quick search
seoDescription/ tags; separatetitlevsnavTitle; headline helper in the overlay; whitespace normalization + multi-token scoring fallback.parentPathmap for breadcrumb line in results (full tree for paths).Caching
DOCS_SIDE_NAV_CACHE_TTL_SECONDScentralizes TTL for the flat docs GraphQL response andnavCachepayload (15 minutes).navCachedefaultstdTTLaligned to 900s; menulinksnavCache/fetchNavDatapaths already used ~15m-style TTLs.Other
RedesignedNavTreeuses sharedtransformApiResponseToNavSectionsfromnavTransform; invalidDotcmsDocumentation.modDatesort string avoided (modDate desconly).Suggested checks
llms.txtstill builds from filteredsectionsonly.