From daadd91eba85c3cf0cb11edd9c48a92a375dc9dc Mon Sep 17 00:00:00 2001 From: spastorelli Date: Fri, 19 Jun 2026 11:39:12 +0200 Subject: [PATCH 01/13] Fix NextLink prefetch side effect on unsigned claims persistance (#4325) --- .../src/components/primitives/Link.tsx | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/packages/gitbook/src/components/primitives/Link.tsx b/packages/gitbook/src/components/primitives/Link.tsx index c88d5a432..33324cd70 100644 --- a/packages/gitbook/src/components/primitives/Link.tsx +++ b/packages/gitbook/src/components/primitives/Link.tsx @@ -157,9 +157,14 @@ export function Link(props: LinkProps) { ); } - // Not sure why yet, but it seems necessary to force prefetch to true - // default behavior doesn't seem to properly use the client router cache. - const _prefetch = prefetch === null || prefetch === undefined ? true : prefetch; + // Not sure why yet, but forcing prefetch to true seems necessary for the + // client router cache to be used properly. + // + // However, we need to disable prefetch for links with query params that + // can trigger server-side side effects, such as persisting visitor claims in a + // cookie or starting the assistant. Automatic RSC prefetch requests can otherwise + // trigger those effects without user intent. + const _prefetch = hasSideEffectQueryParams(href) ? false : (prefetch ?? true); return ( Date: Sat, 20 Jun 2026 21:41:59 +0200 Subject: [PATCH 02/13] Make the AI Assistant panel resizable (#4330) --- .../gitbook/src/components/AIChat/AIChat.tsx | 6 +- .../components/AIChat/AIChatExpandButton.tsx | 35 ++++++++ .../components/AIChat/AIChatResizeHandle.tsx | 83 +++++++++++++++++++ .../components/AIChat/useAIChatWidthStore.ts | 78 +++++++++++++++++ .../Announcement/AnnouncementBanner.tsx | 2 +- .../src/components/Cookies/CookiesToast.tsx | 3 +- .../gitbook/src/components/Footer/Footer.tsx | 2 +- .../gitbook/src/components/Header/Header.tsx | 4 +- .../src/components/RootLayout/globals.css | 10 +++ .../components/SpaceLayout/SpaceLayout.tsx | 2 +- packages/gitbook/src/intl/translations/ar.ts | 2 + packages/gitbook/src/intl/translations/bg.ts | 2 + packages/gitbook/src/intl/translations/cs.ts | 2 + packages/gitbook/src/intl/translations/da.ts | 2 + packages/gitbook/src/intl/translations/de.ts | 2 + packages/gitbook/src/intl/translations/el.ts | 2 + packages/gitbook/src/intl/translations/en.ts | 2 + packages/gitbook/src/intl/translations/es.ts | 2 + packages/gitbook/src/intl/translations/et.ts | 2 + packages/gitbook/src/intl/translations/fi.ts | 2 + packages/gitbook/src/intl/translations/fr.ts | 2 + packages/gitbook/src/intl/translations/he.ts | 2 + packages/gitbook/src/intl/translations/hi.ts | 2 + packages/gitbook/src/intl/translations/hr.ts | 2 + packages/gitbook/src/intl/translations/hu.ts | 2 + packages/gitbook/src/intl/translations/id.ts | 2 + packages/gitbook/src/intl/translations/it.ts | 2 + packages/gitbook/src/intl/translations/ja.ts | 2 + packages/gitbook/src/intl/translations/ko.ts | 2 + packages/gitbook/src/intl/translations/lt.ts | 2 + packages/gitbook/src/intl/translations/lv.ts | 2 + packages/gitbook/src/intl/translations/ms.ts | 2 + packages/gitbook/src/intl/translations/nl.ts | 2 + packages/gitbook/src/intl/translations/no.ts | 2 + packages/gitbook/src/intl/translations/pl.ts | 2 + .../gitbook/src/intl/translations/pt-br.ts | 2 + packages/gitbook/src/intl/translations/pt.ts | 2 + packages/gitbook/src/intl/translations/ro.ts | 2 + packages/gitbook/src/intl/translations/ru.ts | 2 + packages/gitbook/src/intl/translations/sk.ts | 2 + packages/gitbook/src/intl/translations/sl.ts | 2 + packages/gitbook/src/intl/translations/sv.ts | 2 + packages/gitbook/src/intl/translations/th.ts | 2 + packages/gitbook/src/intl/translations/tr.ts | 2 + packages/gitbook/src/intl/translations/uk.ts | 2 + packages/gitbook/src/intl/translations/vi.ts | 2 + packages/gitbook/src/intl/translations/yue.ts | 2 + .../gitbook/src/intl/translations/zh-tw.ts | 2 + packages/gitbook/src/intl/translations/zh.ts | 2 + 49 files changed, 295 insertions(+), 8 deletions(-) create mode 100644 packages/gitbook/src/components/AIChat/AIChatExpandButton.tsx create mode 100644 packages/gitbook/src/components/AIChat/AIChatResizeHandle.tsx create mode 100644 packages/gitbook/src/components/AIChat/useAIChatWidthStore.ts diff --git a/packages/gitbook/src/components/AIChat/AIChat.tsx b/packages/gitbook/src/components/AIChat/AIChat.tsx index b2214d506..dbc6cfa3c 100644 --- a/packages/gitbook/src/components/AIChat/AIChat.tsx +++ b/packages/gitbook/src/components/AIChat/AIChat.tsx @@ -31,9 +31,11 @@ import { ScrollContainer } from '../primitives/ScrollContainer'; import { SideSheet } from '../primitives/SideSheet'; import { AIChatControl } from './AIChatControl'; import { AIChatControlButton } from './AIChatControlButton'; +import { AIChatExpandButton } from './AIChatExpandButton'; import { AIChatIcon } from './AIChatIcon'; import { AIChatInput } from './AIChatInput'; import { AIChatMessages } from './AIChatMessages'; +import { AIChatResizeHandle } from './AIChatResizeHandle'; import AIChatSuggestedQuestions from './AIChatSuggestedQuestions'; export function AIChat() { @@ -85,9 +87,10 @@ export function AIChat() { withOverlay={true} data-ai-chat className={tcls( - 'ai-chat mx-auto ml-8 not-hydrated:hidden w-96 transition-[width] duration-300 ease-quint lg:max-xl:w-80' + 'ai-chat mx-auto ml-8 not-hydrated:hidden w-96 transition-[width] duration-300 ease-quint lg:w-(--ai-chat-width)' )} > + @@ -100,6 +103,7 @@ export function AIChat() { + - - - +
+
+ - {/* Track the page not found as a page view */} - +
+
+

+ {t( + language, + adaptiveAuthLoginHref + ? 'notfound_adaptive_title' + : 'notfound_title' + )} +

+

+ {t( + language, + adaptiveAuthLoginHref ? 'notfound_adaptive' : 'notfound' + )} +

+
+ {adaptiveAuthLoginHref ? ( +
+ +

+ {t(language, 'notfound_adaptive_registration_hint')} +

+
+ ) : null} +
+ +
+ + assistant ? assistant.open(value) : openSearch(value) + } + submitButton={{ label: inputLabel }} + maxLength={2048} + className="grow" + /> + +
+ + {/* "Go to homepage" is the last resort, kept at the end of the flow. */} +
); } + +/** + * List of related pages, with skeleton rows while they load. Renders nothing once we know + * there are no suggestions. + */ +function NotFoundSuggestions(props: { suggestions: RelatedPage[] | null }) { + const { suggestions } = props; + const language = useLanguage(); + + const loading = suggestions === null; + const hasResults = suggestions != null && suggestions.length > 0; + + return loading || hasResults ? ( +
+

{t(language, 'notfound_suggestions_title')}

+
    + {loading ? ( + + ) : ( + suggestions.map((suggestion, index) => ( +
  • + + {suggestion.emoji ? ( + + + + ) : ( + + )} + {suggestion.title} + +
  • + )) + )} +
+
+ ) : null; +} + +/** Minimal shape of an entry in the `~gitbook/site-index` response. */ +type IndexPage = { + id: string; + title: string; + pathname: string; + siteSpaceId: string; + icon?: string; + emoji?: string; +}; + +/** + * Return the pages whose path is closest to the one that 404'd. + * + * Rather than asking the server (which would mean an extra request per 404), this reuses the + * search index served at `~gitbook/site-index` — already preloaded and CDN-cached on every page — + * so it's a cache hit, not an origin request. The ranking is a lighter, client-side cousin of + * `getSimilarPages` (which the Markdown 404 runs server-side from the full page tree). + */ +async function getRelatedPages( + indexURL: string, + requestedPath: string, + siteSpaceId: string | null +): Promise { + const response = await fetch(indexURL); + if (!response.ok) { + return []; + } + const { pages } = (await response.json()) as { pages: IndexPage[] }; + + return pages + .filter((page) => !siteSpaceId || page.siteSpaceId === siteSpaceId) + .map((page) => ({ page, score: scorePathSimilarity(requestedPath, page.pathname) })) + .sort((a, b) => b.score - a.score) + .slice(0, RELATED_PAGES_COUNT) + .map(({ page }) => ({ + id: page.id, + title: page.title, + href: page.pathname, + emoji: page.emoji, + icon: page.icon, + })); +} + +const normalizePath = (path: string) => path.toLowerCase().replace(/^\/+|\/+$/g, ''); +const lastSegment = (path: string) => path.slice(path.lastIndexOf('/') + 1); +const similarity = (left: string, right: string) => { + const max = Math.max(left.length, right.length); + return max === 0 ? 1 : 1 - leven(left, right) / max; +}; + +/** Path similarity in [0, 1] — full-path closeness, weighted toward the last segment. */ +function scorePathSimilarity(input: string, candidate: string): number { + const a = normalizePath(input); + const b = normalizePath(candidate); + if (!a || !b) { + return 0; + } + return similarity(a, b) * 0.6 + similarity(lastSegment(a), lastSegment(b)) * 0.4; +} diff --git a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx index 1449dfcfa..5c095579c 100644 --- a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx +++ b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx @@ -70,6 +70,7 @@ export function SpaceLayoutServerContext(props: SpaceLayoutProps) { ) { - const { basePath, siteAdaptiveAuthLoginHref = null, children } = props; + const { basePath, siteAdaptiveAuthLoginHref = null, siteIndexURL, children } = props; const value = React.useMemo( - () => ({ basePath, siteAdaptiveAuthLoginHref }), - [basePath, siteAdaptiveAuthLoginHref] + () => ({ basePath, siteAdaptiveAuthLoginHref, siteIndexURL }), + [basePath, siteAdaptiveAuthLoginHref, siteIndexURL] ); return {children}; @@ -47,3 +49,14 @@ export function useSiteAdaptiveAuthLoginHref() { } return context.siteAdaptiveAuthLoginHref; } + +/** + * Return the URL of the site search index (`~gitbook/site-index`). + */ +export function useSiteIndexURL() { + const context = React.useContext(SpaceLayoutContext); + if (!context) { + throw new Error('SpaceLayoutContext not found'); + } + return context.siteIndexURL; +} diff --git a/packages/gitbook/src/components/primitives/Skeleton.tsx b/packages/gitbook/src/components/primitives/Skeleton.tsx index 03c355f78..9e7f090c2 100644 --- a/packages/gitbook/src/components/primitives/Skeleton.tsx +++ b/packages/gitbook/src/components/primitives/Skeleton.tsx @@ -54,6 +54,27 @@ export function SkeletonParagraph(props: { ); } +export function SkeletonList(props: { + items: number; + size?: 'xsmall' | 'small' | 'medium'; + start?: number; + className?: ClassValue; +}) { + const { items, size = 'medium', start = 0, className } = props; + const itemHeight = size === 'small' ? 'h-4' : 'h-5'; + return Array.from({ length: items }).map((_, index) => ( +
  • + +
  • + )); +} + /** * Placeholder when loading a title. */ diff --git a/packages/gitbook/src/intl/translations/ar.ts b/packages/gitbook/src/intl/translations/ar.ts index 47266ef73..4169b61cf 100644 --- a/packages/gitbook/src/intl/translations/ar.ts +++ b/packages/gitbook/src/intl/translations/ar.ts @@ -76,7 +76,9 @@ export const ar: TranslationLanguage = { notfound_adaptive_title: 'الصفحة غير متاحة', notfound_adaptive: 'قد تكون هذه الصفحة موجودة، لكن قد تحتاج إلى تسجيل الدخول للوصول إليها.', notfound_adaptive_login: 'تسجيل الدخول', + notfound_adaptive_registration_hint: 'قد يكون التسجيل متاحًا حسب المؤسسة.', notfound_goto_home: 'الانتقال إلى الصفحة الرئيسية', + notfound_suggestions_title: 'ربما تبحث عن', unexpected_error_title: 'حدث خطأ', unexpected_error: 'عذرا، حدث خطأ غير متوقع. يرجى المحاولة مرة أخرى لاحقا.', unexpected_error_retry: 'حاول مرة أخرى', diff --git a/packages/gitbook/src/intl/translations/bg.ts b/packages/gitbook/src/intl/translations/bg.ts index 55595fd6f..51a90614a 100644 --- a/packages/gitbook/src/intl/translations/bg.ts +++ b/packages/gitbook/src/intl/translations/bg.ts @@ -77,7 +77,10 @@ export const bg: TranslationLanguage = { notfound_adaptive: 'Тази страница може да съществува, но може да трябва да влезете, за да я достъпите.', notfound_adaptive_login: 'Вход', + notfound_adaptive_registration_hint: + 'Регистрацията може да е възможна в зависимост от организацията.', notfound_goto_home: 'Към началната страница', + notfound_suggestions_title: 'Може би търсите', unexpected_error_title: 'Възникна грешка', unexpected_error: 'Съжаляваме, възникна неочаквана грешка. Моля, опитайте отново по-късно.', unexpected_error_retry: 'Опитайте отново', diff --git a/packages/gitbook/src/intl/translations/cs.ts b/packages/gitbook/src/intl/translations/cs.ts index 838d3272b..caf848c47 100644 --- a/packages/gitbook/src/intl/translations/cs.ts +++ b/packages/gitbook/src/intl/translations/cs.ts @@ -77,7 +77,9 @@ export const cs: TranslationLanguage = { notfound_adaptive: 'Tato stránka může existovat, ale pro přístup se možná budete muset přihlásit.', notfound_adaptive_login: 'Přihlásit se', + notfound_adaptive_registration_hint: 'Registrace může být dostupná v závislosti na organizaci.', notfound_goto_home: 'Přejít na domovskou stránku', + notfound_suggestions_title: 'Možná hledáte', unexpected_error_title: 'Došlo k chybě', unexpected_error: 'Omlouváme se, došlo k neočekávané chybě. Zkuste to prosím znovu později.', unexpected_error_retry: 'Zkusit znovu', diff --git a/packages/gitbook/src/intl/translations/da.ts b/packages/gitbook/src/intl/translations/da.ts index 4ae0018da..0e911fa33 100644 --- a/packages/gitbook/src/intl/translations/da.ts +++ b/packages/gitbook/src/intl/translations/da.ts @@ -77,7 +77,9 @@ export const da: TranslationLanguage = { notfound_adaptive: 'Denne side findes muligvis, men du skal muligvis logge ind for at få adgang.', notfound_adaptive_login: 'Log ind', + notfound_adaptive_registration_hint: 'Registrering kan være mulig afhængigt af organisationen.', notfound_goto_home: 'Gå til forsiden', + notfound_suggestions_title: 'Du leder måske efter', unexpected_error_title: 'Der opstod en fejl', unexpected_error: 'Beklager, der opstod en uventet fejl. Prøv igen senere.', unexpected_error_retry: 'Prøv igen', diff --git a/packages/gitbook/src/intl/translations/de.ts b/packages/gitbook/src/intl/translations/de.ts index a6e303220..afd044890 100644 --- a/packages/gitbook/src/intl/translations/de.ts +++ b/packages/gitbook/src/intl/translations/de.ts @@ -77,7 +77,10 @@ export const de = { notfound_adaptive: 'Diese Seite existiert möglicherweise, aber Sie müssen sich eventuell anmelden, um darauf zuzugreifen.', notfound_adaptive_login: 'Anmelden', + notfound_adaptive_registration_hint: + 'Die Registrierung ist je nach Organisation möglicherweise verfügbar.', notfound_goto_home: 'Zur Startseite', + notfound_suggestions_title: 'Vielleicht suchen Sie nach', unexpected_error_title: 'Ein Fehler ist aufgetreten', unexpected_error: 'Entschuldigung, ein unerwarteter Fehler ist aufgetreten. Bitte versuchen Sie es später erneut.', diff --git a/packages/gitbook/src/intl/translations/el.ts b/packages/gitbook/src/intl/translations/el.ts index ce65300a2..bf25b83f8 100644 --- a/packages/gitbook/src/intl/translations/el.ts +++ b/packages/gitbook/src/intl/translations/el.ts @@ -77,7 +77,10 @@ export const el: TranslationLanguage = { notfound_adaptive: 'Αυτή η σελίδα μπορεί να υπάρχει, αλλά ίσως χρειαστεί να συνδεθείτε για πρόσβαση.', notfound_adaptive_login: 'Σύνδεση', + notfound_adaptive_registration_hint: + 'Η εγγραφή ενδέχεται να είναι διαθέσιμη ανάλογα με τον οργανισμό.', notfound_goto_home: 'Μετάβαση στην αρχική σελίδα', + notfound_suggestions_title: 'Ίσως αναζητάτε', unexpected_error_title: 'Παρουσιάστηκε σφάλμα', unexpected_error: 'Λυπούμαστε, παρουσιάστηκε ένα μη αναμενόμενο σφάλμα. Δοκιμάστε ξανά αργότερα.', diff --git a/packages/gitbook/src/intl/translations/en.ts b/packages/gitbook/src/intl/translations/en.ts index d61fcbea0..342cfcd71 100644 --- a/packages/gitbook/src/intl/translations/en.ts +++ b/packages/gitbook/src/intl/translations/en.ts @@ -70,11 +70,14 @@ export const en = { edit: 'Edit', notfound_title: 'Page not found', notfound_link: 'This link points to a page that has been removed or no longer exists.', - notfound: "The page you are looking for doesn't exist.", + notfound: "The page you're looking for doesn't exist.", notfound_adaptive_title: 'Page unavailable', notfound_adaptive: 'This page may exist, but you may need to log in to access it.', notfound_adaptive_login: 'Log in', + notfound_adaptive_registration_hint: + 'Registration may be available depending on the organization.', notfound_goto_home: 'Go to homepage', + notfound_suggestions_title: 'You might be looking for', unexpected_error_title: 'An error occurred', unexpected_error: 'Sorry, an unexpected error has occurred. Please try again later.', unexpected_error_retry: 'Try again', diff --git a/packages/gitbook/src/intl/translations/es.ts b/packages/gitbook/src/intl/translations/es.ts index 411ab8044..a868ae59c 100644 --- a/packages/gitbook/src/intl/translations/es.ts +++ b/packages/gitbook/src/intl/translations/es.ts @@ -78,7 +78,10 @@ export const es: TranslationLanguage = { notfound_adaptive: 'Esta página puede existir, pero es posible que debas iniciar sesión para acceder.', notfound_adaptive_login: 'Iniciar sesión', + notfound_adaptive_registration_hint: + 'El registro puede estar disponible según la organización.', notfound_goto_home: 'Ir al inicio', + notfound_suggestions_title: 'Quizás estés buscando', unexpected_error_title: 'Ocurrió un error', unexpected_error: 'Lo sentimos, ha ocurrido un error inesperado. Por favor, intenta de nuevo más tarde.', diff --git a/packages/gitbook/src/intl/translations/et.ts b/packages/gitbook/src/intl/translations/et.ts index e5a9888be..b408b66c8 100644 --- a/packages/gitbook/src/intl/translations/et.ts +++ b/packages/gitbook/src/intl/translations/et.ts @@ -76,7 +76,10 @@ export const et: TranslationLanguage = { notfound_adaptive_title: 'Leht pole saadaval', notfound_adaptive: 'See leht võib olemas olla, kuid juurdepääsuks võib olla vaja sisse logida.', notfound_adaptive_login: 'Logi sisse', + notfound_adaptive_registration_hint: + 'Registreerimine võib olla saadaval olenevalt organisatsioonist.', notfound_goto_home: 'Mine avalehele', + notfound_suggestions_title: 'Võib-olla otsite', unexpected_error_title: 'Ilmnes tõrge', unexpected_error: 'Vabandust, ilmnes ootamatu tõrge. Palun proovige hiljem uuesti.', unexpected_error_retry: 'Proovi uuesti', diff --git a/packages/gitbook/src/intl/translations/fi.ts b/packages/gitbook/src/intl/translations/fi.ts index 1e4633758..652f5b1ac 100644 --- a/packages/gitbook/src/intl/translations/fi.ts +++ b/packages/gitbook/src/intl/translations/fi.ts @@ -77,7 +77,10 @@ export const fi: TranslationLanguage = { notfound_adaptive: 'Tämä sivu voi olla olemassa, mutta sen käyttö voi edellyttää kirjautumista.', notfound_adaptive_login: 'Kirjaudu sisään', + notfound_adaptive_registration_hint: + 'Rekisteröityminen voi olla mahdollista organisaatiosta riippuen.', notfound_goto_home: 'Siirry etusivulle', + notfound_suggestions_title: 'Saatat etsiä', unexpected_error_title: 'Tapahtui virhe', unexpected_error: 'Valitettavasti tapahtui odottamaton virhe. Yritä myöhemmin uudelleen.', unexpected_error_retry: 'Yritä uudelleen', diff --git a/packages/gitbook/src/intl/translations/fr.ts b/packages/gitbook/src/intl/translations/fr.ts index 5f23acb84..df07b8ecf 100644 --- a/packages/gitbook/src/intl/translations/fr.ts +++ b/packages/gitbook/src/intl/translations/fr.ts @@ -75,7 +75,9 @@ export const fr = { notfound_adaptive: 'Cette page existe peut-être, mais vous devez peut-être vous connecter pour y accéder.', notfound_adaptive_login: 'Se connecter', + notfound_adaptive_registration_hint: "L'inscription peut être disponible selon l'organisation.", notfound_goto_home: "Aller à l'accueil", + notfound_suggestions_title: 'Vous cherchez peut-être', unexpected_error_title: 'Erreur inattendue', unexpected_error: 'Désolé, une erreur est survenue. Veuillez réessayer plus tard.', unexpected_error_retry: 'Réessayer', diff --git a/packages/gitbook/src/intl/translations/he.ts b/packages/gitbook/src/intl/translations/he.ts index cc86fe90c..6a36b0d28 100644 --- a/packages/gitbook/src/intl/translations/he.ts +++ b/packages/gitbook/src/intl/translations/he.ts @@ -76,7 +76,9 @@ export const he: TranslationLanguage = { notfound_adaptive_title: 'הדף אינו זמין', notfound_adaptive: 'ייתכן שהדף קיים, אך ייתכן שעליך להתחבר כדי לגשת אליו.', notfound_adaptive_login: 'התחברות', + notfound_adaptive_registration_hint: 'ייתכן שההרשמה זמינה בהתאם לארגון.', notfound_goto_home: 'מעבר לדף הבית', + notfound_suggestions_title: 'אולי אתה מחפש', unexpected_error_title: 'אירעה שגיאה', unexpected_error: 'מצטערים, אירעה שגיאה בלתי צפויה. נסה שוב מאוחר יותר.', unexpected_error_retry: 'נסה שוב', diff --git a/packages/gitbook/src/intl/translations/hi.ts b/packages/gitbook/src/intl/translations/hi.ts index 03141f549..4058a4bbc 100644 --- a/packages/gitbook/src/intl/translations/hi.ts +++ b/packages/gitbook/src/intl/translations/hi.ts @@ -76,7 +76,9 @@ export const hi: TranslationLanguage = { notfound_adaptive_title: 'पृष्ठ उपलब्ध नहीं', notfound_adaptive: 'यह पृष्ठ मौजूद हो सकता है, लेकिन इसे देखने के लिए आपको लॉग इन करना पड़ सकता है।', notfound_adaptive_login: 'लॉग इन करें', + notfound_adaptive_registration_hint: 'संगठन के आधार पर पंजीकरण उपलब्ध हो सकता है।', notfound_goto_home: 'मुखपृष्ठ पर जाएं', + notfound_suggestions_title: 'शायद आप यह ढूँढ रहे हैं', unexpected_error_title: 'त्रुटि हुई', unexpected_error: 'क्षमा करें, एक अनपेक्षित त्रुटि हुई। कृपया बाद में फिर कोशिश करें।', unexpected_error_retry: 'फिर कोशिश करें', diff --git a/packages/gitbook/src/intl/translations/hr.ts b/packages/gitbook/src/intl/translations/hr.ts index 74b0e5dbc..2d459316e 100644 --- a/packages/gitbook/src/intl/translations/hr.ts +++ b/packages/gitbook/src/intl/translations/hr.ts @@ -77,7 +77,9 @@ export const hr: TranslationLanguage = { notfound_adaptive: 'Ova stranica možda postoji, ali možda se morate prijaviti da biste joj pristupili.', notfound_adaptive_login: 'Prijava', + notfound_adaptive_registration_hint: 'Registracija može biti dostupna ovisno o organizaciji.', notfound_goto_home: 'Idi na početnu stranicu', + notfound_suggestions_title: 'Možda tražite', unexpected_error_title: 'Došlo je do pogreške', unexpected_error: 'Žao nam je, došlo je do neočekivane pogreške. Pokušajte ponovno kasnije.', unexpected_error_retry: 'Pokušaj ponovno', diff --git a/packages/gitbook/src/intl/translations/hu.ts b/packages/gitbook/src/intl/translations/hu.ts index db8603382..916a0f38f 100644 --- a/packages/gitbook/src/intl/translations/hu.ts +++ b/packages/gitbook/src/intl/translations/hu.ts @@ -76,7 +76,9 @@ export const hu: TranslationLanguage = { notfound_adaptive_title: 'Az oldal nem érhető el', notfound_adaptive: 'Ez az oldal létezhet, de a hozzáféréshez lehet, hogy be kell jelentkeznie.', notfound_adaptive_login: 'Bejelentkezés', + notfound_adaptive_registration_hint: 'A regisztráció a szervezettől függően elérhető lehet.', notfound_goto_home: 'Ugrás a kezdőlapra', + notfound_suggestions_title: 'Talán ezt keresi', unexpected_error_title: 'Hiba történt', unexpected_error: 'Sajnáljuk, váratlan hiba történt. Kérjük, próbálja újra később.', unexpected_error_retry: 'Próbálja újra', diff --git a/packages/gitbook/src/intl/translations/id.ts b/packages/gitbook/src/intl/translations/id.ts index 4e5b15707..0f8a4cc5a 100644 --- a/packages/gitbook/src/intl/translations/id.ts +++ b/packages/gitbook/src/intl/translations/id.ts @@ -77,7 +77,9 @@ export const id: TranslationLanguage = { notfound_adaptive: 'Halaman ini mungkin ada, tetapi Anda mungkin perlu masuk untuk mengaksesnya.', notfound_adaptive_login: 'Masuk', + notfound_adaptive_registration_hint: 'Pendaftaran mungkin tersedia tergantung pada organisasi.', notfound_goto_home: 'Buka beranda', + notfound_suggestions_title: 'Mungkin Anda mencari', unexpected_error_title: 'Terjadi kesalahan', unexpected_error: 'Maaf, terjadi kesalahan yang tidak terduga. Silakan coba lagi nanti.', unexpected_error_retry: 'Coba lagi', diff --git a/packages/gitbook/src/intl/translations/it.ts b/packages/gitbook/src/intl/translations/it.ts index db30e6639..c76b386e4 100644 --- a/packages/gitbook/src/intl/translations/it.ts +++ b/packages/gitbook/src/intl/translations/it.ts @@ -78,7 +78,10 @@ export const it: TranslationLanguage = { notfound_adaptive: "Questa pagina potrebbe esistere, ma potrebbe essere necessario effettuare l'accesso per visualizzarla.", notfound_adaptive_login: 'Accedi', + notfound_adaptive_registration_hint: + "La registrazione potrebbe essere disponibile a seconda dell'organizzazione.", notfound_goto_home: 'Vai alla home', + notfound_suggestions_title: 'Forse stai cercando', unexpected_error_title: 'Si è verificato un errore', unexpected_error: 'Spiacenti, si è verificato un errore imprevisto. Riprova più tardi.', unexpected_error_retry: 'Riprova', diff --git a/packages/gitbook/src/intl/translations/ja.ts b/packages/gitbook/src/intl/translations/ja.ts index e440f300a..7c7496974 100644 --- a/packages/gitbook/src/intl/translations/ja.ts +++ b/packages/gitbook/src/intl/translations/ja.ts @@ -78,7 +78,9 @@ export const ja: TranslationLanguage = { notfound_adaptive: 'このページは存在する可能性がありますが、アクセスするにはログインが必要な場合があります。', notfound_adaptive_login: 'ログイン', + notfound_adaptive_registration_hint: '組織によっては登録が可能な場合があります。', notfound_goto_home: 'ホームへ移動', + notfound_suggestions_title: 'お探しのページはこちらですか', unexpected_error_title: 'エラーが発生しました', unexpected_error: '申し訳ありません、予期せぬエラーが発生しました。もう一度お試しください。', unexpected_error_retry: '再試行', diff --git a/packages/gitbook/src/intl/translations/ko.ts b/packages/gitbook/src/intl/translations/ko.ts index dfee825b3..9af69c1eb 100644 --- a/packages/gitbook/src/intl/translations/ko.ts +++ b/packages/gitbook/src/intl/translations/ko.ts @@ -77,7 +77,9 @@ export const ko: TranslationLanguage = { notfound_adaptive_title: '페이지에 접근할 수 없음', notfound_adaptive: '이 페이지는 존재할 수 있지만, 접근하려면 로그인해야 할 수 있습니다.', notfound_adaptive_login: '로그인', + notfound_adaptive_registration_hint: '조직에 따라 등록이 가능할 수 있습니다.', notfound_goto_home: '홈으로 이동', + notfound_suggestions_title: '찾고 계신 내용일 수 있어요', unexpected_error_title: '오류가 발생했습니다', unexpected_error: '죄송합니다. 예상치 못한 오류가 발생했습니다. 나중에 다시 시도해 주세요.', unexpected_error_retry: '다시 시도', diff --git a/packages/gitbook/src/intl/translations/lt.ts b/packages/gitbook/src/intl/translations/lt.ts index 5b5ab2f05..d51618fa1 100644 --- a/packages/gitbook/src/intl/translations/lt.ts +++ b/packages/gitbook/src/intl/translations/lt.ts @@ -77,7 +77,10 @@ export const lt: TranslationLanguage = { notfound_adaptive: 'Šis puslapis gali egzistuoti, bet norint jį pasiekti gali reikėti prisijungti.', notfound_adaptive_login: 'Prisijungti', + notfound_adaptive_registration_hint: + 'Registracija gali būti galima priklausomai nuo organizacijos.', notfound_goto_home: 'Eiti į pagrindinį puslapį', + notfound_suggestions_title: 'Galbūt ieškote', unexpected_error_title: 'Įvyko klaida', unexpected_error: 'Atsiprašome, įvyko netikėta klaida. Bandykite dar kartą vėliau.', unexpected_error_retry: 'Bandyti dar kartą', diff --git a/packages/gitbook/src/intl/translations/lv.ts b/packages/gitbook/src/intl/translations/lv.ts index 5cfb08af9..28c574733 100644 --- a/packages/gitbook/src/intl/translations/lv.ts +++ b/packages/gitbook/src/intl/translations/lv.ts @@ -76,7 +76,9 @@ export const lv: TranslationLanguage = { notfound_adaptive_title: 'Lapa nav pieejama', notfound_adaptive: 'Šī lapa var pastāvēt, bet, iespējams, jums jāpierakstās, lai tai piekļūtu.', notfound_adaptive_login: 'Pierakstīties', + notfound_adaptive_registration_hint: 'Reģistrācija var būt pieejama atkarībā no organizācijas.', notfound_goto_home: 'Doties uz sākumlapu', + notfound_suggestions_title: 'Iespējams, meklējat', unexpected_error_title: 'Radās kļūda', unexpected_error: 'Diemžēl radās neparedzēta kļūda. Lūdzu, mēģiniet vēlāk vēlreiz.', unexpected_error_retry: 'Mēģināt vēlreiz', diff --git a/packages/gitbook/src/intl/translations/ms.ts b/packages/gitbook/src/intl/translations/ms.ts index e698943b8..357cc21ed 100644 --- a/packages/gitbook/src/intl/translations/ms.ts +++ b/packages/gitbook/src/intl/translations/ms.ts @@ -77,7 +77,9 @@ export const ms: TranslationLanguage = { notfound_adaptive: 'Halaman ini mungkin wujud, tetapi anda mungkin perlu log masuk untuk mengaksesnya.', notfound_adaptive_login: 'Log masuk', + notfound_adaptive_registration_hint: 'Pendaftaran mungkin tersedia bergantung pada organisasi.', notfound_goto_home: 'Pergi ke halaman utama', + notfound_suggestions_title: 'Mungkin anda mencari', unexpected_error_title: 'Ralat berlaku', unexpected_error: 'Maaf, ralat yang tidak dijangka berlaku. Sila cuba lagi kemudian.', unexpected_error_retry: 'Cuba lagi', diff --git a/packages/gitbook/src/intl/translations/nl.ts b/packages/gitbook/src/intl/translations/nl.ts index a450fdaac..937678356 100644 --- a/packages/gitbook/src/intl/translations/nl.ts +++ b/packages/gitbook/src/intl/translations/nl.ts @@ -78,7 +78,10 @@ export const nl: TranslationLanguage = { notfound_adaptive: 'Deze pagina bestaat mogelijk, maar je moet mogelijk inloggen om toegang te krijgen.', notfound_adaptive_login: 'Inloggen', - notfound_goto_home: 'Ga naar home', + notfound_adaptive_registration_hint: + 'Registratie is mogelijk beschikbaar, afhankelijk van de organisatie.', + notfound_goto_home: 'Naar startpagina', + notfound_suggestions_title: 'Misschien zoek je', unexpected_error_title: 'Er is een fout opgetreden', unexpected_error: 'Sorry, er is een onverwachte fout opgetreden. Probeer het later opnieuw.', unexpected_error_retry: 'Opnieuw proberen', diff --git a/packages/gitbook/src/intl/translations/no.ts b/packages/gitbook/src/intl/translations/no.ts index 6dfa5f39e..9203fd6e0 100644 --- a/packages/gitbook/src/intl/translations/no.ts +++ b/packages/gitbook/src/intl/translations/no.ts @@ -78,7 +78,10 @@ export const no: TranslationLanguage = { notfound_adaptive_title: 'Siden er ikke tilgjengelig', notfound_adaptive: 'Denne siden kan finnes, men du må kanskje logge inn for å få tilgang.', notfound_adaptive_login: 'Logg inn', + notfound_adaptive_registration_hint: + 'Registrering kan være tilgjengelig avhengig av organisasjonen.', notfound_goto_home: 'Gå til forsiden', + notfound_suggestions_title: 'Kanskje du leter etter', unexpected_error_title: 'En feil oppstod', unexpected_error: 'Beklager, en uventet feil har oppstått. Vennligst prøv igjen senere.', unexpected_error_retry: 'Prøv igjen', diff --git a/packages/gitbook/src/intl/translations/pl.ts b/packages/gitbook/src/intl/translations/pl.ts index dc7135cd9..371b86500 100644 --- a/packages/gitbook/src/intl/translations/pl.ts +++ b/packages/gitbook/src/intl/translations/pl.ts @@ -76,7 +76,10 @@ export const pl: TranslationLanguage = { notfound_adaptive_title: 'Strona niedostępna', notfound_adaptive: 'Ta strona może istnieć, ale dostęp do niej może wymagać zalogowania.', notfound_adaptive_login: 'Zaloguj się', + notfound_adaptive_registration_hint: + 'Rejestracja może być dostępna w zależności od organizacji.', notfound_goto_home: 'Przejdź do strony głównej', + notfound_suggestions_title: 'Być może szukasz', unexpected_error_title: 'Wystąpił błąd', unexpected_error: 'Przepraszamy, wystąpił nieoczekiwany błąd. Spróbuj ponownie później.', unexpected_error_retry: 'Spróbuj ponownie', diff --git a/packages/gitbook/src/intl/translations/pt-br.ts b/packages/gitbook/src/intl/translations/pt-br.ts index b6bbf54c8..44db75df7 100644 --- a/packages/gitbook/src/intl/translations/pt-br.ts +++ b/packages/gitbook/src/intl/translations/pt-br.ts @@ -76,7 +76,10 @@ export const pt_br = { notfound_adaptive: 'Esta página pode existir, mas talvez você precise fazer login para acessá-la.', notfound_adaptive_login: 'Fazer login', + notfound_adaptive_registration_hint: + 'O registro pode estar disponível dependendo da organização.', notfound_goto_home: 'Ir para a página inicial', + notfound_suggestions_title: 'Você pode estar procurando por', unexpected_error_title: 'Aconteceu um erro', unexpected_error: 'Desculpe, aconteceu um erro inesperado. Por favor, tente novamente mais tarde.', diff --git a/packages/gitbook/src/intl/translations/pt.ts b/packages/gitbook/src/intl/translations/pt.ts index 9f8803050..1c1f26606 100644 --- a/packages/gitbook/src/intl/translations/pt.ts +++ b/packages/gitbook/src/intl/translations/pt.ts @@ -77,7 +77,10 @@ export const pt: TranslationLanguage = { notfound_adaptive: 'Esta página pode existir, mas talvez tenha de iniciar sessão para lhe aceder.', notfound_adaptive_login: 'Iniciar sessão', + notfound_adaptive_registration_hint: + 'O registo pode estar disponível dependendo da organização.', notfound_goto_home: 'Ir para a página inicial', + notfound_suggestions_title: 'Talvez esteja à procura de', unexpected_error_title: 'Ocorreu um erro', unexpected_error: 'Lamentamos, ocorreu um erro inesperado. Tente novamente mais tarde.', unexpected_error_retry: 'Tentar novamente', diff --git a/packages/gitbook/src/intl/translations/ro.ts b/packages/gitbook/src/intl/translations/ro.ts index b4aaca7f2..5b5058530 100644 --- a/packages/gitbook/src/intl/translations/ro.ts +++ b/packages/gitbook/src/intl/translations/ro.ts @@ -77,7 +77,10 @@ export const ro: TranslationLanguage = { notfound_adaptive: 'Această pagină poate exista, dar este posibil să trebuiască să te autentifici pentru a o accesa.', notfound_adaptive_login: 'Autentificare', + notfound_adaptive_registration_hint: + 'Înregistrarea poate fi disponibilă în funcție de organizație.', notfound_goto_home: 'Mergi la pagina principală', + notfound_suggestions_title: 'Poate cauți', unexpected_error_title: 'A apărut o eroare', unexpected_error: 'Ne pare rău, a apărut o eroare neașteptată. Te rugăm să încerci din nou mai târziu.', diff --git a/packages/gitbook/src/intl/translations/ru.ts b/packages/gitbook/src/intl/translations/ru.ts index 95d49a35e..f15ecfb98 100644 --- a/packages/gitbook/src/intl/translations/ru.ts +++ b/packages/gitbook/src/intl/translations/ru.ts @@ -76,7 +76,10 @@ export const ru = { notfound_adaptive: 'Эта страница может существовать, но для доступа к ней может потребоваться вход.', notfound_adaptive_login: 'Войти', + notfound_adaptive_registration_hint: + 'Регистрация может быть доступна в зависимости от организации.', notfound_goto_home: 'Перейти на главную', + notfound_suggestions_title: 'Возможно, вы ищете', unexpected_error_title: 'Произошла ошибка', unexpected_error: 'Извините, произошла непредвиденная ошибка. Пожалуйста, попробуйте позже.', unexpected_error_retry: 'Попробуйте снова', diff --git a/packages/gitbook/src/intl/translations/sk.ts b/packages/gitbook/src/intl/translations/sk.ts index b649e2a88..47646d0cb 100644 --- a/packages/gitbook/src/intl/translations/sk.ts +++ b/packages/gitbook/src/intl/translations/sk.ts @@ -77,7 +77,10 @@ export const sk: TranslationLanguage = { notfound_adaptive: 'Táto stránka môže existovať, ale na prístup sa možno budete musieť prihlásiť.', notfound_adaptive_login: 'Prihlásiť sa', + notfound_adaptive_registration_hint: + 'Registrácia môže byť dostupná v závislosti od organizácie.', notfound_goto_home: 'Prejsť na domovskú stránku', + notfound_suggestions_title: 'Možno hľadáte', unexpected_error_title: 'Vyskytla sa chyba', unexpected_error: 'Ľutujeme, vyskytla sa neočakávaná chyba. Skúste to znova neskôr.', unexpected_error_retry: 'Skúsiť znova', diff --git a/packages/gitbook/src/intl/translations/sl.ts b/packages/gitbook/src/intl/translations/sl.ts index 92e38aa8b..a06b0fae8 100644 --- a/packages/gitbook/src/intl/translations/sl.ts +++ b/packages/gitbook/src/intl/translations/sl.ts @@ -76,7 +76,9 @@ export const sl: TranslationLanguage = { notfound_adaptive_title: 'Stran ni na voljo', notfound_adaptive: 'Ta stran morda obstaja, vendar se boste za dostop morda morali prijaviti.', notfound_adaptive_login: 'Prijava', + notfound_adaptive_registration_hint: 'Registracija je morda na voljo, odvisno od organizacije.', notfound_goto_home: 'Pojdi na domačo stran', + notfound_suggestions_title: 'Morda iščete', unexpected_error_title: 'Prišlo je do napake', unexpected_error: 'Žal je prišlo do nepričakovane napake. Poskusite znova pozneje.', unexpected_error_retry: 'Poskusi znova', diff --git a/packages/gitbook/src/intl/translations/sv.ts b/packages/gitbook/src/intl/translations/sv.ts index 689357cd5..84ed7ada1 100644 --- a/packages/gitbook/src/intl/translations/sv.ts +++ b/packages/gitbook/src/intl/translations/sv.ts @@ -76,7 +76,10 @@ export const sv: TranslationLanguage = { notfound_adaptive_title: 'Sidan är inte tillgänglig', notfound_adaptive: 'Sidan kan finnas, men du kan behöva logga in för att få åtkomst.', notfound_adaptive_login: 'Logga in', + notfound_adaptive_registration_hint: + 'Registrering kan vara tillgänglig beroende på organisationen.', notfound_goto_home: 'Gå till startsidan', + notfound_suggestions_title: 'Du kanske letar efter', unexpected_error_title: 'Ett fel uppstod', unexpected_error: 'Tyvärr uppstod ett oväntat fel. Försök igen senare.', unexpected_error_retry: 'Försök igen', diff --git a/packages/gitbook/src/intl/translations/th.ts b/packages/gitbook/src/intl/translations/th.ts index bc1f91280..b902e6be6 100644 --- a/packages/gitbook/src/intl/translations/th.ts +++ b/packages/gitbook/src/intl/translations/th.ts @@ -75,7 +75,9 @@ export const th: TranslationLanguage = { notfound_adaptive_title: 'หน้าไม่พร้อมใช้งาน', notfound_adaptive: 'หน้านี้อาจมีอยู่ แต่คุณอาจต้องเข้าสู่ระบบเพื่อเข้าถึง', notfound_adaptive_login: 'เข้าสู่ระบบ', + notfound_adaptive_registration_hint: 'การลงทะเบียนอาจใช้ได้ ขึ้นอยู่กับองค์กร', notfound_goto_home: 'ไปที่หน้าแรก', + notfound_suggestions_title: 'คุณอาจกำลังมองหา', unexpected_error_title: 'เกิดข้อผิดพลาด', unexpected_error: 'ขออภัย เกิดข้อผิดพลาดที่ไม่คาดคิด โปรดลองอีกครั้งในภายหลัง', unexpected_error_retry: 'ลองอีกครั้ง', diff --git a/packages/gitbook/src/intl/translations/tr.ts b/packages/gitbook/src/intl/translations/tr.ts index fed558f45..2cbf11ca7 100644 --- a/packages/gitbook/src/intl/translations/tr.ts +++ b/packages/gitbook/src/intl/translations/tr.ts @@ -76,7 +76,9 @@ export const tr: TranslationLanguage = { notfound_adaptive_title: 'Sayfa kullanılamıyor', notfound_adaptive: 'Bu sayfa mevcut olabilir, ancak erişmek için oturum açmanız gerekebilir.', notfound_adaptive_login: 'Oturum aç', + notfound_adaptive_registration_hint: 'Kayıt, kuruluşa bağlı olarak mevcut olabilir.', notfound_goto_home: 'Ana sayfaya git', + notfound_suggestions_title: 'Şunu arıyor olabilirsiniz', unexpected_error_title: 'Bir hata oluştu', unexpected_error: 'Üzgünüz, beklenmeyen bir hata oluştu. Lütfen daha sonra tekrar deneyin.', unexpected_error_retry: 'Tekrar dene', diff --git a/packages/gitbook/src/intl/translations/uk.ts b/packages/gitbook/src/intl/translations/uk.ts index e9677466f..96dc69577 100644 --- a/packages/gitbook/src/intl/translations/uk.ts +++ b/packages/gitbook/src/intl/translations/uk.ts @@ -76,7 +76,9 @@ export const uk: TranslationLanguage = { notfound_adaptive_title: 'Сторінка недоступна', notfound_adaptive: 'Ця сторінка може існувати, але для доступу до неї може знадобитися вхід.', notfound_adaptive_login: 'Увійти', + notfound_adaptive_registration_hint: 'Реєстрація може бути доступною залежно від організації.', notfound_goto_home: 'Перейти на головну', + notfound_suggestions_title: 'Можливо, ви шукаєте', unexpected_error_title: 'Сталася помилка', unexpected_error: 'Вибачте, сталася неочікувана помилка. Спробуйте ще раз пізніше.', unexpected_error_retry: 'Спробувати ще раз', diff --git a/packages/gitbook/src/intl/translations/vi.ts b/packages/gitbook/src/intl/translations/vi.ts index 1aa47f74d..d0c98bcbe 100644 --- a/packages/gitbook/src/intl/translations/vi.ts +++ b/packages/gitbook/src/intl/translations/vi.ts @@ -76,7 +76,9 @@ export const vi: TranslationLanguage = { notfound_adaptive_title: 'Trang không khả dụng', notfound_adaptive: 'Trang này có thể tồn tại, nhưng bạn có thể cần đăng nhập để truy cập.', notfound_adaptive_login: 'Đăng nhập', + notfound_adaptive_registration_hint: 'Việc đăng ký có thể khả dụng tùy theo tổ chức.', notfound_goto_home: 'Đi tới trang chủ', + notfound_suggestions_title: 'Có thể bạn đang tìm', unexpected_error_title: 'Đã xảy ra lỗi', unexpected_error: 'Rất tiếc, đã xảy ra lỗi không mong muốn. Vui lòng thử lại sau.', unexpected_error_retry: 'Thử lại', diff --git a/packages/gitbook/src/intl/translations/yue.ts b/packages/gitbook/src/intl/translations/yue.ts index ad03383a8..0f91be454 100644 --- a/packages/gitbook/src/intl/translations/yue.ts +++ b/packages/gitbook/src/intl/translations/yue.ts @@ -74,7 +74,9 @@ export const yue: TranslationLanguage = { notfound_adaptive_title: '頁面無法使用', notfound_adaptive: '呢個頁面可能存在,但你可能需要登入先可以存取。', notfound_adaptive_login: '登入', + notfound_adaptive_registration_hint: '視乎機構,可能可以註冊。', notfound_goto_home: '前往首頁', + notfound_suggestions_title: '你可能喺度搵緊', unexpected_error_title: '發生錯誤', unexpected_error: '抱歉,發生咗未預期嘅錯誤。請稍後再試。', unexpected_error_retry: '重試', diff --git a/packages/gitbook/src/intl/translations/zh-tw.ts b/packages/gitbook/src/intl/translations/zh-tw.ts index 5600e2f93..31a131c0e 100644 --- a/packages/gitbook/src/intl/translations/zh-tw.ts +++ b/packages/gitbook/src/intl/translations/zh-tw.ts @@ -74,7 +74,9 @@ export const zh_tw: TranslationLanguage = { notfound_adaptive_title: '頁面無法使用', notfound_adaptive: '此頁面可能存在,但您可能需要登入才能存取。', notfound_adaptive_login: '登入', + notfound_adaptive_registration_hint: '視組織而定,可能可以註冊。', notfound_goto_home: '前往首頁', + notfound_suggestions_title: '您可能在尋找', unexpected_error_title: '發生錯誤', unexpected_error: '抱歉,發生了未預期的錯誤。請稍後再試。', unexpected_error_retry: '重試', diff --git a/packages/gitbook/src/intl/translations/zh.ts b/packages/gitbook/src/intl/translations/zh.ts index dff4af06b..dc7ba52da 100644 --- a/packages/gitbook/src/intl/translations/zh.ts +++ b/packages/gitbook/src/intl/translations/zh.ts @@ -75,7 +75,9 @@ export const zh: TranslationLanguage = { notfound_adaptive_title: '页面无法访问', notfound_adaptive: '该页面可能存在,但您可能需要登录后才能访问。', notfound_adaptive_login: '登录', + notfound_adaptive_registration_hint: '视组织而定,可能可以注册。', notfound_goto_home: '前往首页', + notfound_suggestions_title: '您可能在寻找', unexpected_error_title: '发生错误', unexpected_error: '抱歉,发生了意外的错误。请稍后再试。', unexpected_error_retry: '重试', From c76b4fdccc653c9644e4bba6b2e4ad1050711190 Mon Sep 17 00:00:00 2001 From: "Nolann B." <100787331+nolannbiron@users.noreply.github.com> Date: Thu, 25 Jun 2026 15:10:26 +0200 Subject: [PATCH 13/13] Fix OpenAPI sticky preview column overflowing onto the next operation (#4341) --- .../components/DocumentView/OpenAPI/style.css | 36 +++++++++++++------ .../PageAside/ScrollSectionsList.tsx | 4 +++ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/packages/gitbook/src/components/DocumentView/OpenAPI/style.css b/packages/gitbook/src/components/DocumentView/OpenAPI/style.css index a0bb7c402..6e0dbc586 100644 --- a/packages/gitbook/src/components/DocumentView/OpenAPI/style.css +++ b/packages/gitbook/src/components/DocumentView/OpenAPI/style.css @@ -160,16 +160,20 @@ } .openapi-column-preview { - @apply flex flex-col flex-1 sticky self-start max-h-[calc(100vh-var(--toc-top-offset))] scroll-mt-4 top-[calc(var(--toc-top-offset)+1.5rem)]; + /* Only on the 2-column layout is the preview a sticky pane capped to the viewport so both panels fit + (max-height accounts for the top offset + a 1.5rem bottom margin). On mobile (single column) it flows + normally, each block bounded by max-h-96, so the response isn't crammed into the viewport. */ + @apply flex flex-col flex-1 scroll-mt-4 lg:sticky lg:self-start lg:max-h-[calc(100vh-var(--toc-top-offset)-3rem)] lg:top-[calc(var(--toc-top-offset)+1.5rem)]; } .openapi-column-preview-body { - /* overflow-clip + clip-margin so panel box-shadows aren't cut while overflow is still clipped */ - @apply flex flex-col shrink overflow-clip [overflow-clip-margin:0.75rem] gap-4 print-mode:static; + @apply flex flex-col shrink min-h-0 overflow-clip [overflow-clip-margin:0.75rem] gap-4 print-mode:static; } .openapi-column-preview pre { - @apply max-h-96 print-mode:max-h-none; + /* On the 2-column sticky layout, let the code block grow to fill the available preview height + (bounded by the sticky max-height) instead of a fixed cap, so it doesn't scroll when there's room. */ + @apply max-h-96 lg:max-h-none print-mode:max-h-none; } /* Schema Structure */ @@ -539,6 +543,11 @@ @apply border shrink min-h-32 overflow-hidden rounded-corners:rounded-xl circular-corners:rounded-2xl straight-corners:rounded-xs bg-tint-subtle theme-muted:bg-tint-base theme-bold-tint:bg-tint-base border-tint-subtle depth-subtle:shadow-sm; } +/* The code sample stays at full height; only the response example shrinks/scrolls to fit the viewport */ +.openapi-codesample { + @apply shrink-0 lg:max-h-96; +} + .openapi-response-examples-panel { @apply flex flex-col shrink overflow-hidden; } @@ -565,7 +574,7 @@ .openapi-panel-footer, .openapi-codesample-footer { - @apply px-3 py-2 pt-2.5 border-t border-tint-subtle text-[0.813rem] text-tint empty:hidden; + @apply px-3 py-2 pt-2.5 border-t border-tint-subtle text-[0.813rem] text-tint empty:hidden shrink-0; } .openapi-panel-footer .openapi-markdown { @@ -669,6 +678,11 @@ body:has(.openapi-select-popover) { @apply flex flex-col gap-1 justify-start items-start; } +.openapi-select > button > span.react-aria-SelectValue:has(.openapi-statuscode), +.openapi-select-item:has(.openapi-statuscode) { + @apply gap-2; +} + .openapi-select-item [slot="description"] { @apply text-xs text-tint-subtle; } @@ -695,16 +709,18 @@ body:has(.openapi-select-popover) { /* Section Components */ .openapi-section { - /* overflow-clip + clip-margin so the centered AND/OR separator badge isn't cut at the outermost alternatives level */ - @apply flex flex-col overflow-clip [overflow-clip-margin:0.75rem]; + /* min-h-0 so nested sections (e.g. the media-types panel inside a response example) can shrink + inside the height-capped preview; otherwise the code/JSON body keeps full height and pushes + the footer out of the panel. Headers/footers stay put via their own shrink-0. */ + @apply flex flex-col min-h-0 overflow-clip [overflow-clip-margin:0.75rem]; } .openapi-section-body { - @apply flex flex-col shrink overflow-clip [overflow-clip-margin:0.75rem]; + @apply flex flex-col shrink min-h-0 overflow-clip [overflow-clip-margin:0.75rem]; } .openapi-section-header { - @apply flex flex-row items-center; + @apply flex flex-row items-center shrink-0; } .openapi-section-header-content { @@ -724,7 +740,7 @@ body:has(.openapi-select-popover) { } .openapi-section-footer { - @apply flex flex-row items-center p-2.5 gap-2.5 text-sm text-tint-strong border-t border-tint-subtle; + @apply flex flex-row items-center p-2.5 gap-2.5 text-sm text-tint-strong border-t border-tint-subtle shrink-0; } .openapi-section-footer-content { diff --git a/packages/gitbook/src/components/PageAside/ScrollSectionsList.tsx b/packages/gitbook/src/components/PageAside/ScrollSectionsList.tsx index d69472e87..417383bea 100644 --- a/packages/gitbook/src/components/PageAside/ScrollSectionsList.tsx +++ b/packages/gitbook/src/components/PageAside/ScrollSectionsList.tsx @@ -108,6 +108,9 @@ export function ScrollSectionsList({ sections }: { sections: DocumentSection[] } 'border-transparent', 'sidebar-list-line:-left-px', + // The method badge no longer has a right margin, so lay the row out with a gap + section.tag && ['flex', 'items-baseline', 'gap-2'], + section.depth > 1 && [ 'subitem', 'sidebar-list-line:pl-6', @@ -146,6 +149,7 @@ export function ScrollSectionsList({ sections }: { sections: DocumentSection[] } method={section.tag} size="small" className="-mt-0.5" + short /> ) : null}