Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Added link to doc for full app embedding (#68773)

Sébastien9743b3cbee48
diff --git a/enterprise/frontend/src/metabase-enterprise/embedding/components/InteractiveEmbeddingSettingsCard.tsx b/enterprise/frontend/src/metabase-enterprise/embedding/components/InteractiveEmbeddingSettingsCard.tsx
index 770aee147ab..a7a47ab7035 100644
--- a/enterprise/frontend/src/metabase-enterprise/embedding/components/InteractiveEmbeddingSettingsCard.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/embedding/components/InteractiveEmbeddingSettingsCard.tsx
@@ -1,7 +1,7 @@
import { t } from "ttag";
import { EmbeddingSettingsCard } from "metabase/admin/settings/components/EmbeddingSettings";
-import { useSetting } from "metabase/common/hooks";
+import { useDocsUrl, useSetting } from "metabase/common/hooks";
import { Stack } from "metabase/ui/components";
import { InteractiveEmbeddingAuthorizedOriginsWidget } from "metabase-enterprise/embedding/components/InteractiveEmbeddingAuthorizedOriginsWidget";
@@ -10,11 +10,22 @@ export function InteractiveEmbeddingSettingsCard() {
"enable-embedding-interactive",
);
+ const fullAppEmbeddingDocumentationUrl = useDocsUrl(
+ "embedding/full-app-embedding",
+ );
+
return (
<EmbeddingSettingsCard
title={t`Enable full app embedding`}
description={t`Embed the full Metabase application or individual pages into your app. Best for complex, BI-focused scenarios where you want to embed all of Metabase's capabilities into your app. If you are looking for stability of UX, flexibility or control, or don't have a complex use case that requires a full-blown BI solution, we recommend using Modular embedding instead.`}
settingKey="enable-embedding-interactive"
+ links={[
+ {
+ icon: "reference",
+ title: t`Documentation`,
+ href: fullAppEmbeddingDocumentationUrl.url,
+ },
+ ]}
>
{isInteractiveEmbeddingEnabled && (
<Stack gap="xl" px="xl" pb="lg">
diff --git a/enterprise/frontend/src/metabase-enterprise/embedding/components/InteractiveEmbeddingSettingsCard.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/embedding/components/InteractiveEmbeddingSettingsCard.unit.spec.tsx
index c20317efab8..b51d7506478 100644
--- a/enterprise/frontend/src/metabase-enterprise/embedding/components/InteractiveEmbeddingSettingsCard.unit.spec.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/embedding/components/InteractiveEmbeddingSettingsCard.unit.spec.tsx
@@ -40,6 +40,20 @@ describe("InteractiveEmbeddingSettingsCard", () => {
).toBeInTheDocument();
});
+ it("should show a link to the doc", async () => {
+ await setup({ enabled: true });
+
+ const linkToDoc = await screen.findByRole("link", {
+ name: "Documentation",
+ });
+
+ expect(linkToDoc).toBeVisible();
+ expect(linkToDoc).toHaveAttribute(
+ "href",
+ "https://www.metabase.com/docs/latest/embedding/full-app-embedding.html",
+ );
+ });
+
it("should toggle interactive embedding on", async () => {
await setup({ enabled: false });
const toggle = await screen.findByLabelText(