From 4771c78001b7280147e731d77435bf9900bf16b6 Mon Sep 17 00:00:00 2001 From: Amrit Kahlon Date: Mon, 28 Oct 2024 12:38:18 -0700 Subject: [PATCH 1/6] Fix Scalar ApiClient routing (#2561) --- .changeset/large-months-hang.md | 5 +++++ packages/react-openapi/src/OpenAPICodeSample.tsx | 2 +- packages/react-openapi/src/ScalarApiButton.tsx | 7 +++++-- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changeset/large-months-hang.md diff --git a/.changeset/large-months-hang.md b/.changeset/large-months-hang.md new file mode 100644 index 000000000..24b84bf9c --- /dev/null +++ b/.changeset/large-months-hang.md @@ -0,0 +1,5 @@ +--- +'@gitbook/react-openapi': patch +--- + +Fixed scalar api client routing diff --git a/packages/react-openapi/src/OpenAPICodeSample.tsx b/packages/react-openapi/src/OpenAPICodeSample.tsx index 62e8bf41f..3174d3711 100644 --- a/packages/react-openapi/src/OpenAPICodeSample.tsx +++ b/packages/react-openapi/src/OpenAPICodeSample.tsx @@ -119,7 +119,7 @@ export function OpenAPICodeSample(props: { tabs={samples} overlay={ data['x-hideTryItPanel'] || data.operation['x-hideTryItPanel'] ? null : ( - + ) } /> diff --git a/packages/react-openapi/src/ScalarApiButton.tsx b/packages/react-openapi/src/ScalarApiButton.tsx index 21b0b0ed1..f2835e22a 100644 --- a/packages/react-openapi/src/ScalarApiButton.tsx +++ b/packages/react-openapi/src/ScalarApiButton.tsx @@ -6,12 +6,15 @@ import React from 'react'; /** * Button which launches the Scalar API Client */ -export function ScalarApiButton() { +export function ScalarApiButton({ method, path }: { method: string; path: string }) { const client = useApiClientModal(); return (
- -
- ); -} From d843e5e06f1d24a178b18d00e5141e7c1989ad6a Mon Sep 17 00:00:00 2001 From: Steven H Date: Tue, 5 Nov 2024 09:47:32 +0000 Subject: [PATCH 5/6] Fix an issue where the space dropdown could appear behind the header. (#2566) --- .changeset/weak-dodos-love.md | 5 +++++ packages/gitbook/src/components/Header/Dropdown.tsx | 2 +- packages/gitbook/src/components/Header/Header.tsx | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/weak-dodos-love.md diff --git a/.changeset/weak-dodos-love.md b/.changeset/weak-dodos-love.md new file mode 100644 index 000000000..1454281bd --- /dev/null +++ b/.changeset/weak-dodos-love.md @@ -0,0 +1,5 @@ +--- +'gitbook': minor +--- + +Fix an issue where the space dropdown could appear behind the header. diff --git a/packages/gitbook/src/components/Header/Dropdown.tsx b/packages/gitbook/src/components/Header/Dropdown.tsx index f12d86dff..597522a49 100644 --- a/packages/gitbook/src/components/Header/Dropdown.tsx +++ b/packages/gitbook/src/components/Header/Dropdown.tsx @@ -44,7 +44,7 @@ export function Dropdown(props: { 'absolute', 'top-full', 'left-0', - 'z-10', + 'z-20', 'origin-top-left', 'invisible', 'transition-opacity', diff --git a/packages/gitbook/src/components/Header/Header.tsx b/packages/gitbook/src/components/Header/Header.tsx index 4c8a8a1e3..a08a797d7 100644 --- a/packages/gitbook/src/components/Header/Header.tsx +++ b/packages/gitbook/src/components/Header/Header.tsx @@ -142,7 +142,7 @@ export function Header(props: { {sections ? (
Date: Tue, 5 Nov 2024 11:49:33 +0000 Subject: [PATCH 6/6] Fix an issue where the space dropdown was shown under the site sections in Safari. (#2567) --- .changeset/shiny-chefs-compare.md | 5 ++ .../SiteSectionTabs/SiteSectionTabs.tsx | 89 ++++++++++--------- 2 files changed, 52 insertions(+), 42 deletions(-) create mode 100644 .changeset/shiny-chefs-compare.md diff --git a/.changeset/shiny-chefs-compare.md b/.changeset/shiny-chefs-compare.md new file mode 100644 index 000000000..d617799d8 --- /dev/null +++ b/.changeset/shiny-chefs-compare.md @@ -0,0 +1,5 @@ +--- +'gitbook': minor +--- + +Fix an issue where the space dropdown was shown under the site sections in Safari. diff --git a/packages/gitbook/src/components/SiteSectionTabs/SiteSectionTabs.tsx b/packages/gitbook/src/components/SiteSectionTabs/SiteSectionTabs.tsx index 04f81f0da..31bfd0c56 100644 --- a/packages/gitbook/src/components/SiteSectionTabs/SiteSectionTabs.tsx +++ b/packages/gitbook/src/components/SiteSectionTabs/SiteSectionTabs.tsx @@ -63,7 +63,7 @@ export function SiteSectionTabs(props: { ) : null;