From 91b89e03e680178bc47e1ea56bc3129b52917f23 Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Thu, 12 Mar 2026 13:29:32 -0700 Subject: [PATCH 1/2] Hide Integrations/Support/Changelog from tab bar, keep in navbar links only These sections are now root folders that only show in the navbar header links, not in the desktop horizontal tab bar or mobile dropdown selector. Users can still navigate to them directly and see their own sidebars. Also improved mobile dropdown icon sizing so SVG icons fill their containers. Co-Authored-By: Claude Haiku 4.5 --- package.json | 1 + source.config.ts | 3 +++ src/routes/$.tsx | 6 +++++- src/styles/app.css | 10 ++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3983beef..6b269d35 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "test": "bun test", "predev": "bun run scripts/copy-docs-images.cjs", "dev": "vite dev", + "dev:port": "vite dev --port", "prebuild": "bun run generate:changelog && bun run scripts/copy-docs-images.cjs", "build": "NODE_OPTIONS=--max-old-space-size=8192 vite build && bun run scripts/generate-static-cache.ts", "build:cf": "bun run build", diff --git a/source.config.ts b/source.config.ts index a1bdbbed..09371bf3 100644 --- a/source.config.ts +++ b/source.config.ts @@ -9,9 +9,12 @@ import remarkDirective from "remark-directive"; import { remarkInclude } from "fumadocs-mdx/config"; import remarkSdkFilter from "./plugins/remark-sdk-filter"; +const isDevelopment = process.env.NODE_ENV === "development"; + export const docs = defineDocs({ dir: "content/docs", docs: { + async: isDevelopment, postprocess: { includeProcessedMarkdown: true, }, diff --git a/src/routes/$.tsx b/src/routes/$.tsx index 5d815be1..63897e02 100644 --- a/src/routes/$.tsx +++ b/src/routes/$.tsx @@ -149,6 +149,7 @@ const clientLoader = browserCollections.docs.createClientLoader({ }); const SDK_PREFIXES = new Set(["ios", "android", "flutter", "expo", "react-native"]); +const NAVBAR_ONLY_TABS = new Set(["integrations", "support", "changelog"]); function parseSDKSubPath(url: string): string | null { const withoutBase = url.replace(/^\/docs\//, ""); @@ -173,7 +174,10 @@ function Page() { tree={data.pageTree} sidebar={{ tabs: { - transform: (option) => { + transform: (option, node) => { + const tabPrefix = option.url.replace(/^\/docs\//, "").split("/")[0]; + if (NAVBAR_ONLY_TABS.has(tabPrefix)) return null; + let { url } = option; if (currentSubPath && option.urls) { const tabPrefix = url.replace(/^\/docs\//, "").split("/")[0]; diff --git a/src/styles/app.css b/src/styles/app.css index 9e380b83..cec29db8 100644 --- a/src/styles/app.css +++ b/src/styles/app.css @@ -54,3 +54,13 @@ #nd-subnav > .overflow-auto::-webkit-scrollbar { display: none; } + +/* Fix mobile dropdown icon sizing - make SVGs fill their container. + The popover renders via a Radix portal at , not inside #nd-sidebar, + so we target both the sidebar trigger and the portal popover separately. + Use descendant selector (not >) because icons may be wrapped in a . */ +[data-radix-popper-content-wrapper] .size-9 svg, +#nd-sidebar .size-9 svg { + width: 100%; + height: 100%; +} From 100d10d999d0d7007eac5cdaa04136daba968819 Mon Sep 17 00:00:00 2001 From: Duncan Crawbuck Date: Thu, 12 Mar 2026 15:11:46 -0700 Subject: [PATCH 2/2] Remove shadowed tabPrefix variable in tab transform Reuse the outer tabPrefix instead of redeclaring it inside the if block, since url === option.url at that point. --- src/routes/$.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/routes/$.tsx b/src/routes/$.tsx index 63897e02..99bbd078 100644 --- a/src/routes/$.tsx +++ b/src/routes/$.tsx @@ -180,7 +180,6 @@ function Page() { let { url } = option; if (currentSubPath && option.urls) { - const tabPrefix = url.replace(/^\/docs\//, "").split("/")[0]; if (SDK_PREFIXES.has(tabPrefix)) { const candidate = `/docs/${tabPrefix}/${currentSubPath}`; if (option.urls.has(candidate)) {