From 6db303a1c80d3612adca08d67781ec47941ea07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=20=D0=A5=D0=B0=D1=80=D0=B8=D1=82?= =?UTF-8?q?=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Mon, 11 Sep 2023 22:47:56 +0300 Subject: [PATCH] Fix "On this page" block on "Classes" article (#2940) --- .../typescriptlang-org/src/templates/documentation.scss | 7 ++++++- .../typescriptlang-org/src/templates/documentation.tsx | 5 ++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/typescriptlang-org/src/templates/documentation.scss b/packages/typescriptlang-org/src/templates/documentation.scss index 636764604b1f..3204ebe2c5d3 100644 --- a/packages/typescriptlang-org/src/templates/documentation.scss +++ b/packages/typescriptlang-org/src/templates/documentation.scss @@ -456,4 +456,9 @@ -webkit-animation: 0.1s ease forwards; animation: 0.1s ease forwards; } -} \ No newline at end of file +} + +.handbook-on-this-page-section-list { + overflow: auto; + max-height: 80vh; +} diff --git a/packages/typescriptlang-org/src/templates/documentation.tsx b/packages/typescriptlang-org/src/templates/documentation.tsx index 325d3ae7bf99..621a0cee228c 100644 --- a/packages/typescriptlang-org/src/templates/documentation.tsx +++ b/packages/typescriptlang-org/src/templates/documentation.tsx @@ -85,7 +85,6 @@ const HandbookTemplate: React.FC = (props) => { const sidebarHeaders = post.headings?.filter(h => (h?.depth || 0) <= 3) || [] const showSidebar = !post.frontmatter.disable_toc const showExperimental = post.frontmatter.experimental - const showSidebarHeadings = post.headings && sidebarHeaders.length <= 30 const navigation = getDocumentationNavForLanguage(props.pageContext.lang) const isHandbook = post.frontmatter.handbook const prefix = isHandbook ? "Handbook" : "Documentation" @@ -161,9 +160,9 @@ const HandbookTemplate: React.FC = (props) => { {showSidebar &&