From 8eb3b4262e3700c894a4f6e8776203526f0a08c7 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Thu, 6 Mar 2025 19:00:03 +0900
Subject: [PATCH 42/56] Remove comments that were for quick, personal reference
---
src/css/custom.css | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/css/custom.css b/src/css/custom.css
index 5dabd38c..97c7b898 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -267,20 +267,18 @@ html[data-theme="dark"] .tooltip-glossary {
opacity: 0;
position: absolute;
right: 0;
- transform: translateY(-10px); /* Moves up initially */
+ transform: translateY(-10px);
transition: opacity 0.3s ease-out, transform 0.3s ease-out;
- visibility: hidden; /* Prevents accidental hover issues */
+ visibility: hidden;
z-index: 1;
}
-/* When hovering, show the dropdown with fade-in & slide down */
.supportDropdown:hover .supportDropdownContent {
visibility: visible;
opacity: 1;
transform: translateY(0);
}
-/* Add a delay before showing the dropdown */
.supportDropdownContent {
transition-delay: 0.1s;
}
From b889d43989a817380e6a34b957bd72e325ed0985 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Thu, 6 Mar 2025 19:07:41 +0900
Subject: [PATCH 43/56] Add rounded corners to dropdown and on link hover
---
src/css/custom.css | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/css/custom.css b/src/css/custom.css
index 97c7b898..1d638bda 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -260,11 +260,14 @@ html[data-theme="dark"] .tooltip-glossary {
.supportDropdownContent {
background-color: #f9f9f9;
- box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
+ border-radius: 8px;
+ box-shadow: var(--ifm-global-shadow-md);
color: var(--ifm-color-emphasis-700);
font-size: 14px;
min-width: 303px;
opacity: 0;
+ overflow: hidden;
+ padding: 8px 0px;
position: absolute;
right: 0;
transform: translateY(-10px);
@@ -323,12 +326,15 @@ html[data-theme="dark"] .tooltip-glossary {
.supportDropdownContent a {
color: black;
display: block;
- padding: 6px 12px;
+ margin: 4px 10px;
+ padding: 4px 10px;
text-decoration: none;
}
.supportDropdownContent a:hover {
background-color: var(--ifm-dropdown-hover-background-color);
+ border-radius: 8px;
+ overflow: hidden;
}
html[data-theme="dark"] .supportDropBtn {
From 18027a54a7c19e1c9cf25d29d5bc470173a5c1dc Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Tue, 11 Mar 2025 18:58:09 +0900
Subject: [PATCH 44/56] Move file
---
src/components/{Support => ja-jp}/AssistantModal.tsx | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/components/{Support => ja-jp}/AssistantModal.tsx (100%)
diff --git a/src/components/Support/AssistantModal.tsx b/src/components/ja-jp/AssistantModal.tsx
similarity index 100%
rename from src/components/Support/AssistantModal.tsx
rename to src/components/ja-jp/AssistantModal.tsx
From d15ad04546a85d5be81bd3acdb8519105ff32805 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Tue, 11 Mar 2025 18:58:15 +0900
Subject: [PATCH 45/56] Move file
---
src/components/{Support => }/SupportDropdownMenu.tsx | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/components/{Support => }/SupportDropdownMenu.tsx (100%)
diff --git a/src/components/Support/SupportDropdownMenu.tsx b/src/components/SupportDropdownMenu.tsx
similarity index 100%
rename from src/components/Support/SupportDropdownMenu.tsx
rename to src/components/SupportDropdownMenu.tsx
From b530b678827cc6e0c3a98595311216e9058824e4 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Tue, 11 Mar 2025 18:59:17 +0900
Subject: [PATCH 46/56] Update import
The component was move in 18027a54a7c19e1c9cf25d29d5bc470173a5c1dc, so this import needs to be updated to reflect that.
---
src/theme/DocItem/Layout/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/theme/DocItem/Layout/index.tsx b/src/theme/DocItem/Layout/index.tsx
index 976f8b6a..8ba73fe1 100644
--- a/src/theme/DocItem/Layout/index.tsx
+++ b/src/theme/DocItem/Layout/index.tsx
@@ -1,4 +1,4 @@
-import SupportDropdownMenu from '../../../components/Support/SupportDropdownMenu';
+import SupportDropdownMenu from '../../../components/SupportDropdownMenu';
import React from 'react';
import clsx from 'clsx';
import { useWindowSize } from '@docusaurus/theme-common';
From 9122b267479ed64e349fc1048beef095ac995b32 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Tue, 11 Mar 2025 19:12:41 +0900
Subject: [PATCH 47/56] Create AssistantModal.tsx
---
src/components/en-us/AssistantModal.tsx | 64 +++++++++++++++++++++++++
1 file changed, 64 insertions(+)
create mode 100644 src/components/en-us/AssistantModal.tsx
diff --git a/src/components/en-us/AssistantModal.tsx b/src/components/en-us/AssistantModal.tsx
new file mode 100644
index 00000000..8467c75f
--- /dev/null
+++ b/src/components/en-us/AssistantModal.tsx
@@ -0,0 +1,64 @@
+import React from "react";
+import { Standard } from "@typebot.io/react";
+
+function AssistantModal({ isOpen, onClose }) {
+ if (!isOpen) return null; // Prevent modal from rendering when isOpen is false.
+
+ // Get the current page URL.
+ const currentUrl = window.location.href;
+
+ return (
+
+
+ {/* Close the button. */}
+
+ ×
+
+
+
+
+ );
+}
+
+const styles = {
+ modal: {
+ display: "block",
+ position: "fixed",
+ zIndex: 1000,
+ left: 0,
+ top: 0,
+ width: "100%",
+ height: "100%",
+ backgroundColor: "rgba(0, 0, 0, 0.7)",
+ },
+ modalContent: {
+ backgroundColor: "#fff",
+ margin: "10% auto",
+ padding: "20px",
+ borderRadius: "10px",
+ width: "90%",
+ maxWidth: "900px",
+ position: "relative", // Allow absolute positioning of the close button.
+ },
+ closeButton: {
+ position: "absolute",
+ top: "10px",
+ right: "20px",
+ fontSize: "30px",
+ fontWeight: "bold",
+ cursor: "pointer",
+ color: "#333",
+ backgroundColor: "transparent",
+ border: "none",
+ padding: "0",
+ zIndex: 1100, // Ensure the close button is above the modal content.
+ },
+};
+
+export default AssistantModal;
From 84f2b1190610e6a52a1ff929f976450f90c27676 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Tue, 11 Mar 2025 19:12:55 +0900
Subject: [PATCH 48/56] Update link to chatbot
---
src/components/ja-jp/AssistantModal.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/ja-jp/AssistantModal.tsx b/src/components/ja-jp/AssistantModal.tsx
index 0d987c01..7da4d191 100644
--- a/src/components/ja-jp/AssistantModal.tsx
+++ b/src/components/ja-jp/AssistantModal.tsx
@@ -15,7 +15,7 @@ function AssistantModal({ isOpen, onClose }) {
×
Date: Tue, 11 Mar 2025 20:03:56 +0900
Subject: [PATCH 49/56] Remove Font Awesome plugin
We decided not to use Font Awesome icons in this component, so we don't need to refer to this plugin here.
---
src/components/SupportDropdownMenu.tsx | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/components/SupportDropdownMenu.tsx b/src/components/SupportDropdownMenu.tsx
index fd3d129f..3b713077 100644
--- a/src/components/SupportDropdownMenu.tsx
+++ b/src/components/SupportDropdownMenu.tsx
@@ -1,6 +1,4 @@
import React, { useState, useEffect, useRef, lazy, Suspense, MouseEvent } from 'react';
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { faChevronDown } from '@fortawesome/free-solid-svg-icons';
import { useDoc } from '@docusaurus/plugin-content-docs/client';
import { useLocation } from "@docusaurus/router";
From b160ea86cc9b194732c20da24715a1b371f3043b Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Tue, 11 Mar 2025 20:11:59 +0900
Subject: [PATCH 50/56] Show AI assistant based on language
---
src/components/ja-jp/AssistantModal.tsx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/components/ja-jp/AssistantModal.tsx b/src/components/ja-jp/AssistantModal.tsx
index 7da4d191..a8fd63f2 100644
--- a/src/components/ja-jp/AssistantModal.tsx
+++ b/src/components/ja-jp/AssistantModal.tsx
@@ -7,6 +7,9 @@ function AssistantModal({ isOpen, onClose }) {
// Get the current page URL.
const currentUrl = window.location.href;
+ // Check if the user is on the Japanese documentation page.
+ const isJapanese = currentUrl.includes("/ja-jp");
+
return (
@@ -14,8 +17,13 @@ function AssistantModal({ isOpen, onClose }) {
×
+
+ {/* Conditionally render the Typebot based on language. */}
Date: Tue, 11 Mar 2025 20:17:53 +0900
Subject: [PATCH 51/56] Move back to `Support` folder
---
src/components/{ja-jp => Support}/AssistantModal.tsx | 0
src/components/{ => Support}/SupportDropdownMenu.tsx | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
rename src/components/{ja-jp => Support}/AssistantModal.tsx (100%)
rename src/components/{ => Support}/SupportDropdownMenu.tsx (99%)
diff --git a/src/components/ja-jp/AssistantModal.tsx b/src/components/Support/AssistantModal.tsx
similarity index 100%
rename from src/components/ja-jp/AssistantModal.tsx
rename to src/components/Support/AssistantModal.tsx
diff --git a/src/components/SupportDropdownMenu.tsx b/src/components/Support/SupportDropdownMenu.tsx
similarity index 99%
rename from src/components/SupportDropdownMenu.tsx
rename to src/components/Support/SupportDropdownMenu.tsx
index 3b713077..cf9a5c86 100644
--- a/src/components/SupportDropdownMenu.tsx
+++ b/src/components/Support/SupportDropdownMenu.tsx
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef, lazy, Suspense, MouseEvent } from '
import { useDoc } from '@docusaurus/plugin-content-docs/client';
import { useLocation } from "@docusaurus/router";
-// Lazy-load AssistantModal
+// Lazy-load AssistantModal.
const AssistantModal = lazy(() => import('./AssistantModal'));
const SupportDropdownMenu: React.FC = () => {
From 260cd35d6566d00588c8b856238370933e75db64 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Tue, 11 Mar 2025 20:20:02 +0900
Subject: [PATCH 52/56] Delete AssistantModal.tsx
This file isn't needed since we can manage the AI assistants in a single file: b160ea86cc9b194732c20da24715a1b371f3043b
---
src/components/en-us/AssistantModal.tsx | 64 -------------------------
1 file changed, 64 deletions(-)
delete mode 100644 src/components/en-us/AssistantModal.tsx
diff --git a/src/components/en-us/AssistantModal.tsx b/src/components/en-us/AssistantModal.tsx
deleted file mode 100644
index 8467c75f..00000000
--- a/src/components/en-us/AssistantModal.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-import React from "react";
-import { Standard } from "@typebot.io/react";
-
-function AssistantModal({ isOpen, onClose }) {
- if (!isOpen) return null; // Prevent modal from rendering when isOpen is false.
-
- // Get the current page URL.
- const currentUrl = window.location.href;
-
- return (
-
-
- {/* Close the button. */}
-
- ×
-
-
-
-
- );
-}
-
-const styles = {
- modal: {
- display: "block",
- position: "fixed",
- zIndex: 1000,
- left: 0,
- top: 0,
- width: "100%",
- height: "100%",
- backgroundColor: "rgba(0, 0, 0, 0.7)",
- },
- modalContent: {
- backgroundColor: "#fff",
- margin: "10% auto",
- padding: "20px",
- borderRadius: "10px",
- width: "90%",
- maxWidth: "900px",
- position: "relative", // Allow absolute positioning of the close button.
- },
- closeButton: {
- position: "absolute",
- top: "10px",
- right: "20px",
- fontSize: "30px",
- fontWeight: "bold",
- cursor: "pointer",
- color: "#333",
- backgroundColor: "transparent",
- border: "none",
- padding: "0",
- zIndex: 1100, // Ensure the close button is above the modal content.
- },
-};
-
-export default AssistantModal;
From e391b916443b84dd6e0d74565d032b0ac68a3895 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Tue, 11 Mar 2025 20:20:52 +0900
Subject: [PATCH 53/56] Revert "Update import"
This reverts commit b530b678827cc6e0c3a98595311216e9058824e4.
---
src/theme/DocItem/Layout/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/theme/DocItem/Layout/index.tsx b/src/theme/DocItem/Layout/index.tsx
index 8ba73fe1..976f8b6a 100644
--- a/src/theme/DocItem/Layout/index.tsx
+++ b/src/theme/DocItem/Layout/index.tsx
@@ -1,4 +1,4 @@
-import SupportDropdownMenu from '../../../components/SupportDropdownMenu';
+import SupportDropdownMenu from '../../../components/Support/SupportDropdownMenu';
import React from 'react';
import clsx from 'clsx';
import { useWindowSize } from '@docusaurus/theme-common';
From a44b781cc4f62d4b56394a0de245fcd737384a44 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Wed, 12 Mar 2025 15:47:15 +0900
Subject: [PATCH 54/56] Fix GitHub issue link
The GitHub issue link was opening a new tab with the same page that the visitor was on.
---
src/components/Support/SupportDropdownMenu.tsx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/components/Support/SupportDropdownMenu.tsx b/src/components/Support/SupportDropdownMenu.tsx
index cf9a5c86..f66c35d4 100644
--- a/src/components/Support/SupportDropdownMenu.tsx
+++ b/src/components/Support/SupportDropdownMenu.tsx
@@ -80,7 +80,7 @@ const SupportDropdownMenu: React.FC = () => {
該当する場合は、スクリーンショットを添付してください。
`
- : `**Documentation page URL:** ${window.location.href.replace(/#.*$/, '')}
+ : `**Documentation page URL:** ${window.location.href.replace(/#.*$/, '')}
## Expected behavior
@@ -100,7 +100,11 @@ If applicable, add screenshots to help explain your problem.
`
);
- return `${repoUrl}?title=${issueTitle}&body=${issueBody}&labels=documentation`;
+ const issueUrl = `${repoUrl}?title=${issueTitle}&body=${issueBody}&labels=documentation`;
+
+ console.log("GitHub Issue URL: ", issueUrl); // Debugging line
+
+ return issueUrl;
})() : "#";
useEffect(() => {
From 664d5d823390abd69f29b6473775cab0113dcf32 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Wed, 12 Mar 2025 19:57:53 +0900
Subject: [PATCH 55/56] Change dropdown item font color
Change dropdown item font color to match the default color of other fonts in Docusaurus.
---
src/css/custom.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/css/custom.css b/src/css/custom.css
index 1d638bda..4822ed61 100644
--- a/src/css/custom.css
+++ b/src/css/custom.css
@@ -324,7 +324,7 @@ html[data-theme="dark"] .tooltip-glossary {
}
.supportDropdownContent a {
- color: black;
+ color: var(--ifm-dropdown-link-color);
display: block;
margin: 4px 10px;
padding: 4px 10px;
From 9377f6ce9e76e4aaca536f83877fce875a038ae9 Mon Sep 17 00:00:00 2001
From: Josh Wong <23216828+josh-wong@users.noreply.github.com>
Date: Fri, 14 Mar 2025 21:30:23 +0900
Subject: [PATCH 56/56] Hide support dropdown menu from home page
---
src/theme/DocItem/Layout/index.tsx | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/theme/DocItem/Layout/index.tsx b/src/theme/DocItem/Layout/index.tsx
index 976f8b6a..b191b0d6 100644
--- a/src/theme/DocItem/Layout/index.tsx
+++ b/src/theme/DocItem/Layout/index.tsx
@@ -48,6 +48,12 @@ const DocItemLayout: React.FC = ({ children }) => {
const hideTOC = frontMatter.hide_table_of_contents;
const windowSize = useWindowSize();
+ // Check if the current page is the home page or a version homepage.
+ const isHomePage = metadata.permalink === '/docs/latest/' ||
+ /^\/docs\/\d+\.\d+\/$/.test(metadata.permalink) ||
+ metadata.permalink === '/ja-jp/docs/latest/' ||
+ /^\/ja-jp\/docs\/\d+\.\d+\/$/.test(metadata.permalink);
+
return (
@@ -57,7 +63,7 @@ const DocItemLayout: React.FC
= ({ children }) => {
- {windowSize === 'mobile' && (
+ {windowSize === 'mobile' && !isHomePage && (
@@ -73,9 +79,11 @@ const DocItemLayout: React.FC = ({ children }) => {
{!hideTOC && windowSize !== 'mobile' && (
-
-
-
+ {!isHomePage && (
+
+
+
+ )}
{docTOC.desktop}