diff --git a/.changeset/chubby-adults-poke.md b/.changeset/chubby-adults-poke.md new file mode 100644 index 000000000..f51701275 --- /dev/null +++ b/.changeset/chubby-adults-poke.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Fix select filters not working on table and cards blocks. diff --git a/.changeset/preview-auth-content-path.md b/.changeset/preview-auth-content-path.md new file mode 100644 index 000000000..3d8dd6f2a --- /dev/null +++ b/.changeset/preview-auth-content-path.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Preserve the full site preview path and query parameters when redirecting users to log in. diff --git a/.changeset/webmcp-published-docs.md b/.changeset/webmcp-published-docs.md new file mode 100644 index 000000000..57454328c --- /dev/null +++ b/.changeset/webmcp-published-docs.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Expose the site's MCP tools to browser agents through WebMCP when the MCP page action is enabled. diff --git a/packages/gitbook/src/components/DocumentView/Table/TableSearch.tsx b/packages/gitbook/src/components/DocumentView/Table/TableSearch.tsx index b8f6c5901..6104f3fd8 100644 --- a/packages/gitbook/src/components/DocumentView/Table/TableSearch.tsx +++ b/packages/gitbook/src/components/DocumentView/Table/TableSearch.tsx @@ -226,11 +226,10 @@ function SelectFilterDropdown(props: { column: TableSelectColumn }) { key={option.value} active={selected} leadingIcon={selected ? 'check' : undefined} - onSelect={(event) => { - // Keep the menu open so several options can be toggled at once. - event.preventDefault(); - toggleOption(column.id, option.value); - }} + // `closeOnClick={false}` keeps the menu open so several options can be + // toggled at once. + closeOnClick={false} + onClick={() => toggleOption(column.id, option.value)} > {option.label || option.value} diff --git a/packages/gitbook/src/components/SiteLayout/SiteLayout.tsx b/packages/gitbook/src/components/SiteLayout/SiteLayout.tsx index 939543b6e..156373fa0 100644 --- a/packages/gitbook/src/components/SiteLayout/SiteLayout.tsx +++ b/packages/gitbook/src/components/SiteLayout/SiteLayout.tsx @@ -3,7 +3,7 @@ import Script from 'next/script'; import React from 'react'; import * as ReactDOM from 'react-dom'; -import { CustomizationDefaultThemeMode } from '@gitbook/api'; +import { CustomizationDefaultThemeMode, CustomizationPageActionType } from '@gitbook/api'; import { AIContextProvider } from '../AI'; import { RocketLoaderDetector } from './RocketLoaderDetector'; @@ -12,6 +12,7 @@ import { AdminToolbar } from '@/components/AdminToolbar'; import { CookiesToast } from '@/components/Cookies'; import { LoadIntegrations } from '@/components/Integrations'; import { SpaceLayout } from '@/components/SpaceLayout'; +import { WebMCP } from '@/components/WebMCP/WebMCP'; import type { VisitorAuthClaims } from '@/lib/adaptive'; import { buildVersion } from '@/lib/build'; import type { GitBookSiteContext } from '@/lib/context'; @@ -117,6 +118,9 @@ export async function SiteLayout(props: { + {customization.pageActions.items.includes(CustomizationPageActionType.Mcp) ? ( + + ) : null} {scripts.map(({ script }) => isDeferrableScript(script) ? (