From 91275ed96ed1613ab8df48d22b0eb62f1385af93 Mon Sep 17 00:00:00 2001 From: Andrew Jiang Date: Tue, 4 Jun 2024 15:28:54 -0400 Subject: [PATCH] fix: strip hidden titles in api playground (#958) --- .../PlaygroundEndpointSelectorContent.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/ui/app/src/api-playground/PlaygroundEndpointSelectorContent.tsx b/packages/ui/app/src/api-playground/PlaygroundEndpointSelectorContent.tsx index 207de0a93b..2a941958a6 100644 --- a/packages/ui/app/src/api-playground/PlaygroundEndpointSelectorContent.tsx +++ b/packages/ui/app/src/api-playground/PlaygroundEndpointSelectorContent.tsx @@ -41,7 +41,15 @@ export function flattenApiSection(root: FernNavigation.SidebarRootNode): ApiGrou return; } - const breadcrumbs = [...parents, node].filter(FernNavigation.isSection).map((parent) => parent.title); + const breadcrumbs = [...parents, node] + .filter(FernNavigation.isSection) + .filter((n) => { + if (n.type === "apiReference") { + return n.hideTitle !== true; + } + return true; + }) + .map((parent) => parent.title); result.push({ api: node.apiDefinitionId, id: node.id,