From 9734ad1e519f1d6a730d481424aabe3ad0f3d578 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 21 Aug 2024 12:52:13 +0300 Subject: [PATCH 1/2] docs: fix category not opening in api reference from algolia search (#8690) --- www/apps/api-reference/components/Tags/Section/index.tsx | 1 + .../docs-ui/src/components/Sidebar/Item/Category/index.tsx | 2 +- www/packages/docs-ui/src/providers/Sidebar/index.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/www/apps/api-reference/components/Tags/Section/index.tsx b/www/apps/api-reference/components/Tags/Section/index.tsx index 2df17406731c1..e4723b73b58cb 100644 --- a/www/apps/api-reference/components/Tags/Section/index.tsx +++ b/www/apps/api-reference/components/Tags/Section/index.tsx @@ -143,6 +143,7 @@ const TagSection = ({ tag }: TagSectionProps) => { }} pathName={pathname} reportLink={formatReportLink(area, tag.name)} + vertical /> } diff --git a/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx b/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx index bcf2d1939dcb4..fd283b9abf281 100644 --- a/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx +++ b/www/packages/docs-ui/src/components/Sidebar/Item/Category/index.tsx @@ -47,7 +47,7 @@ export const SidebarItemCategory = ({ if (isActive && !open) { setOpen(true) } - }, [isChildrenActive]) + }, [isChildrenActive, item.children]) useEffect(() => { if (!persistState) { diff --git a/www/packages/docs-ui/src/providers/Sidebar/index.tsx b/www/packages/docs-ui/src/providers/Sidebar/index.tsx index 4c36294748660..2a6bfe1b2c96a 100644 --- a/www/packages/docs-ui/src/providers/Sidebar/index.tsx +++ b/www/packages/docs-ui/src/providers/Sidebar/index.tsx @@ -530,7 +530,7 @@ export const SidebarProvider = ({ activePath, setActivePath, isLinkActive: isLinkActive, - isChildrenActive: isChildrenActive, + isChildrenActive, findItemInSection, mobileSidebarOpen, setMobileSidebarOpen, From 2f0166901f0efe452b9c8462087e1e1d671bce05 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Wed, 21 Aug 2024 12:52:22 +0300 Subject: [PATCH 2/2] docs: fix response code snippet in api reference (#8689) --- .../CodeSection/Responses/Sample/index.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/www/apps/api-reference/components/Tags/Operation/CodeSection/Responses/Sample/index.tsx b/www/apps/api-reference/components/Tags/Operation/CodeSection/Responses/Sample/index.tsx index a1d8a3c623b77..c6a0c63ef75e1 100644 --- a/www/apps/api-reference/components/Tags/Operation/CodeSection/Responses/Sample/index.tsx +++ b/www/apps/api-reference/components/Tags/Operation/CodeSection/Responses/Sample/index.tsx @@ -51,12 +51,14 @@ const TagsOperationCodeSectionResponsesSample = ({ )} {selectedExample && ( - +
+ +
)} {!selectedExample && <>Empty Response}