From 47304fba33e645d0ad5b003e8f09599b5909104e Mon Sep 17 00:00:00 2001 From: Muhammad Sohail Date: Mon, 16 Nov 2026 15:38:00 +0500 Subject: [PATCH 1/2] fix(portal): keep the example cards inside their column, off the previous and next page cards Since fumadocs-openapi 12.6 the example column of an operation page is sticky and no taller than the window, and its cards are meant to shrink to fit it. Ours did not: the layout around them was a plain block, so a long "Example Response" ran out of the column, over the page's previous and next cards, and its end could not be reached at all. The layout now takes the classes of Fumadocs' own, and the request card passes the column's height on at every box down to its code, as Fumadocs' request card does. Without that the request card keeps its full height and the response card under a long sample is squeezed to its header. Both cards now share the column and scroll inside it. Below the width where the column sits beside the page, nothing changes. The example selector loses a bottom margin that used to collapse into the card's own, so the gap under it stays 16px. Refs apimatic/apimatic-io#2350 (point 2) Co-Authored-By: Claude Fable 5.2 --- .../src/components/example-layout.tsx | 7 +++++-- portal-template/src/components/usage-tabs.tsx | 17 ++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/portal-template/src/components/example-layout.tsx b/portal-template/src/components/example-layout.tsx index aa3c0a31..91135976 100644 --- a/portal-template/src/components/example-layout.tsx +++ b/portal-template/src/components/example-layout.tsx @@ -21,6 +21,9 @@ interface LayoutSlots { const SelectionContext = createContext(undefined); +/** Fumadocs keeps the example column no taller than the window: each box down to the code passes that height on. */ +export const SHRINKS_WITH_COLUMN = 'flex min-h-0 flex-col'; + // "Example Response" copies through a button of Fumadocs' own in the card's header, which takes no callback. const reportResponseCopy = (event: MouseEvent) => { if (event.target instanceof Element && event.target.closest('button[aria-live]') !== null) reportCodeCopy('json'); @@ -66,7 +69,7 @@ function ExampleLayout({ selector, usageTabs, responseTabs }: Readonly -
+
{selector === null ? null : } {usageTabs}
@@ -92,7 +95,7 @@ function ExampleSelector() { })); return (