From 4c5482005578722ebd3a76acc86d00dab0920e6a Mon Sep 17 00:00:00 2001 From: Zeno Kapitein Date: Thu, 12 Feb 2026 14:06:37 +0100 Subject: [PATCH] Improve Docs Embed layout (#3994) --- .../gitbook/src/components/AIChat/AIChat.tsx | 8 ++--- .../Embeddable/EmbeddableDocsPage.tsx | 14 ++++----- .../EmbeddableDocsPageControlButtons.tsx | 1 + .../components/Embeddable/EmbeddableFrame.tsx | 29 +++++++++++++++---- .../Embeddable/EmbeddableRootLayout.tsx | 2 +- .../TableOfContents/TableOfContents.tsx | 12 +++++--- packages/gitbook/tailwind.config.ts | 2 +- 7 files changed, 46 insertions(+), 22 deletions(-) diff --git a/packages/gitbook/src/components/AIChat/AIChat.tsx b/packages/gitbook/src/components/AIChat/AIChat.tsx index 6d413506a..e8862229d 100644 --- a/packages/gitbook/src/components/AIChat/AIChat.tsx +++ b/packages/gitbook/src/components/AIChat/AIChat.tsx @@ -87,7 +87,7 @@ export function AIChat() { > - + @@ -106,7 +106,7 @@ export function AIChat() { /> - + message.role === 'user').length - 1}`} @@ -272,7 +272,7 @@ export function AIChatBody(props: { )} -
+
{/* Display an error banner when something went wrong. */} {chat.error ? : null} diff --git a/packages/gitbook/src/components/Embeddable/EmbeddableDocsPage.tsx b/packages/gitbook/src/components/Embeddable/EmbeddableDocsPage.tsx index 2754e2d06..a9be76cc5 100644 --- a/packages/gitbook/src/components/Embeddable/EmbeddableDocsPage.tsx +++ b/packages/gitbook/src/components/Embeddable/EmbeddableDocsPage.tsx @@ -50,9 +50,9 @@ export async function EmbeddableDocsPage( -
- - +
+ + {context.site.title} @@ -69,7 +69,7 @@ export async function EmbeddableDocsPage( {context.sections ? ( ) : null} @@ -77,9 +77,9 @@ export async function EmbeddableDocsPage( diff --git a/packages/gitbook/src/components/Embeddable/EmbeddableDocsPageControlButtons.tsx b/packages/gitbook/src/components/Embeddable/EmbeddableDocsPageControlButtons.tsx index f3e9dd0c5..a369e2386 100644 --- a/packages/gitbook/src/components/Embeddable/EmbeddableDocsPageControlButtons.tsx +++ b/packages/gitbook/src/components/Embeddable/EmbeddableDocsPageControlButtons.tsx @@ -11,6 +11,7 @@ export function EmbeddableDocsPageControlButtons(props: { href: string }) {