From da4bf8207c8b51dd670b2fd3c4da8f74cad322c5 Mon Sep 17 00:00:00 2001 From: Tomek Gargula Date: Fri, 18 Sep 2026 16:25:12 +0200 Subject: [PATCH] Fix sidebar group title clipping on scroll --- .../TableOfContents/PageGroupItem.tsx | 57 +++---------------- .../TableOfContents/TableOfContents.tsx | 3 +- .../src/components/hooks/useScrollOverflow.ts | 12 +++- .../components/primitives/ScrollContainer.tsx | 4 +- 4 files changed, 22 insertions(+), 54 deletions(-) diff --git a/packages/gitbook/src/components/TableOfContents/PageGroupItem.tsx b/packages/gitbook/src/components/TableOfContents/PageGroupItem.tsx index 4acbbcd4e..27f0e28f9 100644 --- a/packages/gitbook/src/components/TableOfContents/PageGroupItem.tsx +++ b/packages/gitbook/src/components/TableOfContents/PageGroupItem.tsx @@ -14,7 +14,6 @@ export function PageGroupItem(props: { page: ClientTOCPageGroup; isFirst?: boole const descendants = page.descendants ?? []; const hasDescendants = descendants.length > 0; const [isOpen, setIsOpen] = React.useState(true); - const { sentinelRef, isSticking } = useIsSticking(); const handleToggle = () => { if (!hasDescendants) { @@ -26,28 +25,24 @@ export function PageGroupItem(props: { page: ClientTOCPageGroup; isFirst?: boole return (
  • -