Skip to content

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

Design changes for tenants onboarding flow in embedding setup guide (#67125)

Phoomparin Mano7068bbe55960
diff --git a/e2e/test/scenarios/admin-2/tenants.cy.spec.ts b/e2e/test/scenarios/admin-2/tenants.cy.spec.ts
index 9a350190ccb..32242a6dfc9 100644
--- a/e2e/test/scenarios/admin-2/tenants.cy.spec.ts
+++ b/e2e/test/scenarios/admin-2/tenants.cy.spec.ts
@@ -135,34 +135,64 @@ describe("Tenants - management", () => {
cy.button("Apply").click();
});
- cy.log("should show toast hint message about tenant collections");
- cy.findAllByText(
- "You can create tenant collections from the main Metabase navigation",
- )
- .first()
- .should("be.visible");
-
cy.findByRole("link", { name: /Tenant users/ }).should("exist");
- cy.findByRole("link", { name: /Tenants/ }).click();
+ cy.findByRole("link", { name: /Tenants/ }).should("exist");
+
+ cy.findByTestId("admin-layout-content").within(() => {
+ cy.log("after enabling multi-tenancy, it takes you to the tenants page");
+ cy.findByText("Tenants", { timeout: 10_000 }).should("be.visible");
+
+ cy.findByText(/Create your first tenant to start adding/).should(
+ "be.visible",
+ );
+ });
+
+ // Onboarding: create the first tenant
+ cy.findByRole("button", { name: "Create your first tenant" })
+ .should("be.visible")
+ .click();
- // Create some tenants
- cy.findByRole("button", { name: "New tenant" }).click();
H.modal().within(() => {
- cy.findByRole("textbox", { name: "Display name" }).type("Parrot");
- cy.findByRole("textbox", { name: "Slug" }).should("have.value", "parrot");
- cy.button("Create").click();
+ cy.findByText("Set up your first tenant").should("be.visible");
+
+ cy.findByRole("textbox", { name: "Give this tenant a name" }).type(
+ "Parrot",
+ );
+
+ cy.log("slug should be pre-filled");
+ cy.findByRole("textbox", { name: "Slug for this tenant" }).should(
+ "have.value",
+ "parrot",
+ );
+
+ cy.button("Create tenant").click();
});
+ H.undoToastList()
+ .contains("Tenant creation successful")
+ .should("be.visible");
+
cy.findByRole("button", { name: "New tenant" }).click();
+
H.modal().within(() => {
- cy.findByRole("textbox", { name: "Display name" }).type("Eagle");
- cy.button("Create").click();
+ cy.findByRole("textbox", { name: "Give this tenant a name" }).type(
+ "Eagle",
+ );
+
+ cy.button("Create tenant").click();
});
+ H.undoToastList()
+ .contains("Tenant creation successful")
+ .should("be.visible");
+
cy.findByRole("button", { name: "New tenant" }).click();
+
H.modal().within(() => {
- cy.findByRole("textbox", { name: "Display name" }).type("Turkey");
- cy.button("Create").click();
+ cy.findByRole("textbox", { name: "Give this tenant a name" }).type(
+ "Turkey",
+ );
+ cy.button("Create tenant").click();
});
cy.findByTestId("admin-content-table").within(() => {
@@ -179,11 +209,12 @@ describe("Tenants - management", () => {
H.popover().findByText("Edit tenant").click();
H.modal().within(() => {
- cy.findByRole("textbox", { name: "Display name" })
+ cy.findByRole("textbox", { name: "Give this tenant a name" })
.should("have.value", "Turkey")
.clear()
.type("Chicken");
- cy.findByRole("textbox", { name: "Slug" })
+
+ cy.findByRole("textbox", { name: "Slug for this tenant" })
.should("have.value", "turkey")
.should("be.disabled");
diff --git a/e2e/test/scenarios/embedding/embedding-hub/embedding-hub.cy.spec.ts b/e2e/test/scenarios/embedding/embedding-hub/embedding-hub.cy.spec.ts
index 6ee2c67d5bd..94335e9e698 100644
--- a/e2e/test/scenarios/embedding/embedding-hub/embedding-hub.cy.spec.ts
+++ b/e2e/test/scenarios/embedding/embedding-hub/embedding-hub.cy.spec.ts
@@ -165,7 +165,7 @@ describe("scenarios - embedding hub", () => {
cy.visit("/admin/embedding/setup-guide");
cy.findByTestId("admin-layout-content")
- .findByText("Embed in production")
+ .findByText("Embed in production with SSO")
.scrollIntoView()
.should("be.visible")
.closest("button")
@@ -176,7 +176,7 @@ describe("scenarios - embedding hub", () => {
cy.reload();
cy.findByTestId("admin-layout-content")
- .findByText("Embed in production")
+ .findByText("Embed in production with SSO")
.scrollIntoView()
.should("be.visible")
.closest("button")
@@ -260,7 +260,7 @@ describe("scenarios - embedding hub", () => {
.should("not.exist");
});
- it('"Set up tenants" card should navigate to admin settings', () => {
+ it('"Pick a user strategy" card should open the edit strategy modal', () => {
H.restore("setup");
cy.signInAsAdmin();
H.activateToken("bleeding-edge");
@@ -271,33 +271,31 @@ describe("scenarios - embedding hub", () => {
cy.visit("/");
- H.main().findByText("Set up tenants").should("be.visible").click();
+ H.main()
+ .findByText("Pick a user strategy")
+ .scrollIntoView()
+ .should("be.visible")
+ .click();
H.modal().within(() => {
- cy.findByText("User strategy").should("be.visible");
+ cy.findByText("Pick a user strategy").should("be.visible");
cy.findByText("Multi tenant").click();
cy.button("Apply").click();
});
cy.log("the internal prefix should show up on the page");
- H.main()
- .findAllByText("Internal users")
- .should("have.length", 2)
- .should("be.visible");
+ H.main().findByText("Internal users").should("be.visible");
+ H.main().findByText("Internal groups").should("be.visible");
cy.visit("/");
- cy.log("'Set up tenants' should now be marked as done");
+ cy.log("'Pick a user strategy' should now be marked as done");
H.main()
- .findByText("Set up tenants")
+ .findByText("Pick a user strategy")
.closest("button")
.scrollIntoView()
.findByText("Done", { timeout: 10_000 })
.should("be.visible");
-
- cy.log("clicking on tenants should go to tenants page");
- H.main().findByText("Set up tenants").click();
- cy.url().should("include", "/admin/tenants");
});
it("should link to user strategy when tenants are disabled", () => {
diff --git a/enterprise/frontend/src/metabase-enterprise/sandboxes/components/LoginAttributesWidget/LoginAttributesWidget.tsx b/enterprise/frontend/src/metabase-enterprise/sandboxes/components/LoginAttributesWidget/LoginAttributesWidget.tsx
index 30f1f87988b..9881ba01a47 100644
--- a/enterprise/frontend/src/metabase-enterprise/sandboxes/components/LoginAttributesWidget/LoginAttributesWidget.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/sandboxes/components/LoginAttributesWidget/LoginAttributesWidget.tsx
@@ -83,7 +83,7 @@ export const LoginAttributesWidget = ({
<Accordion.Item value="login-attributes">
<Accordion.Control>
<Text fz="md">{title}</Text>
- <Text c="text-secondary" fw="normal">
+ <Text c="text-secondary" fw="normal" fz="sm">
{description}
</Text>
</Accordion.Control>
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.module.css b/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.module.css
index 827741241bb..3a7f76c1c97 100644
--- a/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.module.css
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.module.css
@@ -6,3 +6,7 @@
.radioCard[data-checked] {
border-color: var(--mb-color-brand);
}
+
+.radioCard[data-checked] .radioCardTitle {
+ color: var(--mb-color-brand);
+}
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.tsx
index a42f6a4d039..3ce46a8217a 100644
--- a/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.tsx
@@ -1,4 +1,5 @@
import { useEffect, useState } from "react";
+import { push } from "react-router-redux";
import { t } from "ttag";
import { permissionApi } from "metabase/api";
@@ -20,7 +21,7 @@ export const EditUserStrategyModal = ({
}: EditUserStrategyModalProps) => {
const dispatch = useDispatch();
- const { isLoading, error, value, updateSetting } =
+ const { isLoading, error, value, updateSetting, refetch } =
useAdminSetting("use-tenants");
const [addToast] = useToast();
@@ -73,13 +74,7 @@ export const EditUserStrategyModal = ({
return;
}
- addToast({
- message:
- selectedStrategy === "multi-tenant"
- ? // eslint-disable-next-line no-literal-metabase-strings -- used in admin
- t`You can create tenant collections from the main Metabase navigation`
- : t`Changes saved`,
- });
+ addToast({ message: t`Changes saved` });
dispatch(
permissionApi.util.invalidateTags([
@@ -90,6 +85,14 @@ export const EditUserStrategyModal = ({
setIsApplyingAfterConfirm(false);
onClose();
+
+ if (selectedStrategy === "multi-tenant") {
+ // Wait for settings to be refetched before navigating.
+ // This ensures `createTenantsRouteGuard` sees the updated setting.
+ await refetch();
+
+ dispatch(push("/admin/tenants"));
+ }
};
const handleCancel = () => {
@@ -98,24 +101,24 @@ export const EditUserStrategyModal = ({
};
const strategyOptions = [
+ {
+ value: "multi-tenant",
+ title: t`Multi tenant`,
+ description: t`Each tenant operates in an isolated environment with dedicated resources and permissions. Best for SaaS platforms, scalable embedding, or strict data isolation needs.`,
+ },
{
value: "single-tenant",
title: t`Single tenant`,
// eslint-disable-next-line no-literal-metabase-strings -- in admin settings
description: t`All users exist in the same world and are managed via Metabase groups. Ideal for internal company analytics, proof of concept, or simple embedding setups.`,
},
- {
- value: "multi-tenant",
- title: t`Multi tenant`,
- description: t`Each tenant operates in an isolated environment with dedicated resources and permissions. Best for SaaS platforms, scalable embedding, or strict data isolation needs.`,
- },
];
return (
<>
<Modal
opened={!confirmationModal && !isApplyingAfterConfirm}
- title={t`User strategy`}
+ title={t`Pick a user strategy`}
padding="xl"
size="md"
onClose={onClose}
@@ -136,10 +139,14 @@ export const EditUserStrategyModal = ({
className={S.radioCard}
>
<Group wrap="nowrap">
- <Radio.Indicator />
-
<div>
- <Text fw={700} fz="lg" lh="xl" mb="xs">
+ <Text
+ fw={700}
+ fz="lg"
+ lh="xl"
+ mb="xs"
+ className={S.radioCardTitle}
+ >
{option.title}
</Text>
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.unit.spec.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.unit.spec.tsx
index 91e79735de5..68a0c6b328f 100644
--- a/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.unit.spec.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategyModal/EditUserStrategyModal.unit.spec.tsx
@@ -51,7 +51,7 @@ describe("EditUserStrategyModal", () => {
it("should handle loading state", async () => {
await setup();
expect(screen.getByText("Loading...")).toBeInTheDocument();
- await screen.findByText("User strategy");
+ await screen.findByText("Pick a user strategy");
});
it("should correctly select single-tenancy if use-tenants setting is false", async () => {
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategySettingsButton.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategySettingsButton.tsx
index aec4080c79c..c67c98496d4 100644
--- a/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategySettingsButton.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/EditUserStrategySettingsButton.tsx
@@ -4,8 +4,12 @@ import { t } from "ttag";
import { ActionIcon, Icon, Tooltip } from "metabase/ui";
import * as Urls from "metabase-enterprise/urls";
-export const EditUserStrategySettingsButton = () => (
- <Link to={Urls.editUserStrategy()}>
+export const EditUserStrategySettingsButton = ({
+ page,
+}: {
+ page: "people" | "tenants";
+}) => (
+ <Link to={Urls.editUserStrategy(page)}>
<Tooltip label={t`Edit user strategy`}>
<ActionIcon
size="lg"
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/components/CreateTenantCollectionButton/CreateTenantCollectionButton.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/components/CreateTenantCollectionButton/CreateTenantCollectionButton.tsx
deleted file mode 100644
index d8c3e3c359b..00000000000
--- a/enterprise/frontend/src/metabase-enterprise/tenants/components/CreateTenantCollectionButton/CreateTenantCollectionButton.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import { useDisclosure } from "@mantine/hooks";
-import { useCallback } from "react";
-import { push } from "react-router-redux";
-import { t } from "ttag";
-
-import { useCreateCollectionMutation } from "metabase/api";
-import { CreateCollectionForm } from "metabase/collections/components/CreateCollectionForm";
-import type { CreateCollectionProperties } from "metabase/collections/components/CreateCollectionForm/CreateCollectionForm";
-import { useDispatch } from "metabase/lib/redux";
-import { ActionIcon, Icon, Modal, Tooltip } from "metabase/ui";
-import { Urls } from "metabase-enterprise/urls";
-
-export const CreateTenantCollectionButton = () => {
- const [isModalOpen, modal] = useDisclosure(false);
- const [createCollection] = useCreateCollectionMutation();
- const dispatch = useDispatch();
-
- const handleCreateTenantCollection = useCallback(
- async (values: CreateCollectionProperties) => {
- const result = await createCollection({
- ...values,
- parent_id: null,
- namespace: "shared-tenant-collection",
- });
-
- dispatch(push(Urls.collection(result.data)));
- },
- [createCollection, dispatch],
- );
-
- return (
- <>
- <Tooltip label={t`Create shared collection`}>
- <ActionIcon
- size="lg"
- onClick={modal.open}
- variant="outline"
- c="text-primary"
- bd="1px solid var(--mb-color-border)"
- >
- <Icon name="add_collection" />
- </ActionIcon>
- </Tooltip>
-
- <Modal
- opened={isModalOpen}
- title={t`New shared collection`}
- onClose={modal.close}
- >
- <CreateCollectionForm
- showCollectionPicker={false}
- onSubmit={handleCreateTenantCollection}
- />
- </Modal>
- </>
- );
-};
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/components/CreateTenantCollectionButton/index.ts b/enterprise/frontend/src/metabase-enterprise/tenants/components/CreateTenantCollectionButton/index.ts
deleted file mode 100644
index 647d1b2dfaa..00000000000
--- a/enterprise/frontend/src/metabase-enterprise/tenants/components/CreateTenantCollectionButton/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { CreateTenantCollectionButton } from "./CreateTenantCollectionButton";
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantForm/TenantForm.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantForm/TenantForm.tsx
index 231cded48c7..44df06394b8 100644
--- a/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantForm/TenantForm.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantForm/TenantForm.tsx
@@ -63,10 +63,11 @@ export const TenantForm = ({
<Form disabled={!dirty} mt="sm">
<FormTextInput
name="name"
- title={t`Display name`}
- label={t`Display name`}
- description={t`Visible to admins and people assigned to the tenant. You can change the name at any time.`}
+ title={t`Give this tenant a name`}
+ label={t`Give this tenant a name`}
+ description={t`This will be visible to users assigned to this tenant.`}
mb="md"
+ placeholder="A wonderful tenant"
onChange={(e) => {
const value = e.target.value;
setFieldValue("name", value);
@@ -81,15 +82,17 @@ export const TenantForm = ({
/>
<FormTextInput
name="slug"
- title={t`Slug`}
- label={t`Slug`}
- description={t`A unique identifier for the tenant. Cannot be changed later.`}
+ title={t`Slug for this tenant`}
+ label={t`Slug for this tenant`}
+ description={t`This can’t be changed later, so choose wisely.`}
+ placeholder="permanent-tenant-identifier"
disabled={!!initialValues.slug}
mb="xl"
/>
<LoginAttributesWidget
name="attributes"
- description={t`Default attributes to be applied to all users in this tenant.`}
+ title={t`Default attributes`}
+ description={t`Attributes to be applied to all users in this tenant.`}
/>
<FormFooter>
<FormErrorMessage inline />
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantsListing/TenantsListing.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantsListing/TenantsListing.tsx
index 94494c70e6f..4d771e1ae29 100644
--- a/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantsListing/TenantsListing.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantsListing/TenantsListing.tsx
@@ -27,6 +27,8 @@ import { tenantIdToColor } from "metabase-enterprise/tenants/utils/colors";
import * as Urls from "metabase-enterprise/urls";
import type { Tenant } from "metabase-types/api";
+import { TenantsListingEmptyState } from "../TenantsListingEmptyState";
+
interface TenantsListingProps {
tenants: Tenant[];
isAdmin: boolean;
@@ -34,6 +36,7 @@ interface TenantsListingProps {
searchInputValue: string;
setSearchInputValue: (value: string) => void;
status: ActiveStatus;
+ hasNoTenants: boolean;
}
export const TenantsListing = ({
@@ -43,11 +46,14 @@ export const TenantsListing = ({
setSearchInputValue,
status,
children,
+ hasNoTenants,
}: TenantsListingProps) => {
const dispatch = useDispatch();
const openNewTenantModal = () => {
- dispatch(push(Urls.newTenant()));
+ const param = hasNoTenants ? "?onboarding=true" : "";
+
+ dispatch(push(Urls.newTenant() + param));
};
const filteredTenants = useMemo(() => {
@@ -55,6 +61,10 @@ export const TenantsListing = ({
return tenants.filter((g) => filter.test(g.name));
}, [searchInputValue, tenants]);
+ if (hasNoTenants) {
+ return <TenantsListingEmptyState onCreateTenant={openNewTenantModal} />;
+ }
+
return (
<div>
<Group w="100%" justify="space-between" mb="lg" gap="md">
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantsListingEmptyState.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantsListingEmptyState.tsx
new file mode 100644
index 00000000000..4104a2ef1ef
--- /dev/null
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/components/TenantsListingEmptyState.tsx
@@ -0,0 +1,36 @@
+import { c, t } from "ttag";
+
+import Link from "metabase/common/components/Link";
+import { Anchor, Box, Button, Flex, Text } from "metabase/ui";
+
+export const TenantsListingEmptyState = ({
+ onCreateTenant,
+}: {
+ onCreateTenant: () => void;
+}) => (
+ <Flex justify="space-between" align="center" gap="lg">
+ <Box flex="1">
+ <Text size="md" c="text-dark">
+ {c(
+ "{0} links to external users, {1} links to groups, {2} links to permissions",
+ ).jt`Create your first tenant to start adding ${(
+ <Anchor
+ component={Link}
+ to="/admin/tenants/people"
+ key="external-users-link"
+ >{t`external users`}</Anchor>
+ )} to it, and organize these users into ${(<Anchor component={Link} to="/admin/tenants/groups" key="tenant-groups-link">{t`groups`}</Anchor>)} to assign ${(
+ <Anchor
+ component={Link}
+ to="/admin/permissions"
+ key="permissions-link"
+ >{t`permissions`}</Anchor>
+ )}. Then, create dashboards and charts for each tenant in their tenant collection.`}
+ </Text>
+ </Box>
+
+ <Button variant="filled" onClick={onCreateTenant}>
+ {t`Create your first tenant`}
+ </Button>
+ </Flex>
+);
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/containers/NewTenantModal/NewTenantModal.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/containers/NewTenantModal/NewTenantModal.tsx
index 9d226105b55..f71511024cd 100644
--- a/enterprise/frontend/src/metabase-enterprise/tenants/containers/NewTenantModal/NewTenantModal.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/containers/NewTenantModal/NewTenantModal.tsx
@@ -1,3 +1,5 @@
+import type { Location } from "history";
+import { useMemo } from "react";
import { t } from "ttag";
import { useDispatch } from "metabase/lib/redux";
@@ -10,13 +12,20 @@ import { TenantForm } from "../../components/TenantForm";
interface NewUserModalProps {
onClose: () => void;
+ location?: Location;
}
-export const NewTenantModal = ({ onClose }: NewUserModalProps) => {
+export const NewTenantModal = ({ onClose, location }: NewUserModalProps) => {
const dispatch = useDispatch();
const [createTenant] = useCreateTenantMutation();
+ const isOnboarding = useMemo(() => {
+ const searchParams = new URLSearchParams(location?.search);
+
+ return searchParams.get("onboarding") === "true";
+ }, [location?.search]);
+
const handleSubmit = async (vals: Partial<Tenant>) => {
await createTenant({
...vals,
@@ -28,10 +37,15 @@ export const NewTenantModal = ({ onClose }: NewUserModalProps) => {
};
return (
- <Modal opened title={t`New tenant`} padding="xl" onClose={onClose}>
+ <Modal
+ opened
+ title={isOnboarding ? t`Set up your first tenant` : t`New tenant`}
+ padding="xl"
+ onClose={onClose}
+ >
<TenantForm
initialValues={{}}
- submitText={t`Create`}
+ submitText={t`Create tenant`}
onCancel={onClose}
onSubmit={handleSubmit}
/>
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/containers/TenantsListingApp.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/containers/TenantsListingApp.tsx
index e9d48138744..066b9cbc2e4 100644
--- a/enterprise/frontend/src/metabase-enterprise/tenants/containers/TenantsListingApp.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/containers/TenantsListingApp.tsx
@@ -9,10 +9,10 @@ import {
import { LoadingAndErrorWrapper } from "metabase/common/components/LoadingAndErrorWrapper";
import { useSelector } from "metabase/lib/redux";
import { getUserIsAdmin } from "metabase/selectors/user";
-import { Group, Tabs, Title } from "metabase/ui";
+import { Box, Group, Tabs, Title } from "metabase/ui";
import { useListTenantsQuery } from "metabase-enterprise/api";
-import { CreateTenantCollectionButton } from "../components/CreateTenantCollectionButton";
+import { EditUserStrategySettingsButton } from "../EditUserStrategySettingsButton";
import { TenantsListing } from "../components/TenantsListing";
import S from "./TenantsListingApp.module.css";
@@ -54,12 +54,17 @@ export const TenantsListingApp = ({
}
}, [hasDeactivatedTenants]);
+ const hasNoTenants = data?.data?.length === 0;
+
return (
- <div>
+ // Make the layout narrow when there are no tenants
+ <Box maw={hasNoTenants ? "700px" : undefined} mx="auto">
<Group justify="space-between" w="100%" mb="lg">
<Title order={1}>{t`Tenants`}</Title>
- <CreateTenantCollectionButton />
+ <Group gap="sm">
+ <EditUserStrategySettingsButton page="tenants" />
+ </Group>
</Group>
{isAdmin && hasDeactivatedTenants && (
@@ -82,11 +87,12 @@ export const TenantsListingApp = ({
searchInputValue={searchInputValue}
setSearchInputValue={setSearchInputValue}
status={status}
+ hasNoTenants={hasNoTenants}
/>
</LoadingAndErrorWrapper>
{children}
</SettingsSection>
- </div>
+ </Box>
);
};
diff --git a/enterprise/frontend/src/metabase-enterprise/tenants/index.tsx b/enterprise/frontend/src/metabase-enterprise/tenants/index.tsx
index cb44e813017..1840ad903ab 100644
--- a/enterprise/frontend/src/metabase-enterprise/tenants/index.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/tenants/index.tsx
@@ -139,6 +139,8 @@ export function initializePlugin() {
</Route>
);
+ PLUGIN_TENANTS.EditUserStrategyModal = EditUserStrategyModal;
+
PLUGIN_TENANTS.userStrategyRoute = (
<ModalRoute path="user-strategy" modal={EditUserStrategyModal} noWrap />
);
@@ -149,6 +151,11 @@ export function initializePlugin() {
<IndexRoute component={TenantsListingApp} />
<Route path="" component={TenantsListingApp}>
<ModalRoute path="new" modal={NewTenantModal} noWrap />
+ <ModalRoute
+ path="user-strategy"
+ modal={EditUserStrategyModal}
+ noWrap
+ />
</Route>
<Route path="groups">
<IndexRoute component={ExternalGroupsListingApp} />
diff --git a/enterprise/frontend/src/metabase-enterprise/urls.ts b/enterprise/frontend/src/metabase-enterprise/urls.ts
index 991b6ce8e94..42979e94b45 100644
--- a/enterprise/frontend/src/metabase-enterprise/urls.ts
+++ b/enterprise/frontend/src/metabase-enterprise/urls.ts
@@ -44,6 +44,6 @@ export function reactivateTenant(tenantId: Tenant["id"]) {
return `/admin/tenants/${tenantId}/reactivate`;
}
-export function editUserStrategy() {
- return `/admin/people/user-strategy`;
+export function editUserStrategy(page: "people" | "tenants") {
+ return `/admin/${page}/user-strategy`;
}
diff --git a/frontend/src/metabase/admin/people/containers/PeopleListingApp/PeopleListingApp.tsx b/frontend/src/metabase/admin/people/containers/PeopleListingApp/PeopleListingApp.tsx
index 7a0e9501f06..62e1482cd2f 100644
--- a/frontend/src/metabase/admin/people/containers/PeopleListingApp/PeopleListingApp.tsx
+++ b/frontend/src/metabase/admin/people/containers/PeopleListingApp/PeopleListingApp.tsx
@@ -101,7 +101,9 @@ export function PeopleListingApp({
<Group justify="space-between" w="100%" mb="lg">
<Title order={1}>{pageTitle}</Title>
- {!external && <PLUGIN_TENANTS.EditUserStrategySettingsButton />}
+ {!external && (
+ <PLUGIN_TENANTS.EditUserStrategySettingsButton page="people" />
+ )}
</Group>
{isAdmin && hasDeactivatedUsers && (
diff --git a/frontend/src/metabase/embedding/embedding-hub/components/EmbeddingHub.tsx b/frontend/src/metabase/embedding/embedding-hub/components/EmbeddingHub.tsx
index 16e1676b197..4dbf9e2550c 100644
--- a/frontend/src/metabase/embedding/embedding-hub/components/EmbeddingHub.tsx
+++ b/frontend/src/metabase/embedding/embedding-hub/components/EmbeddingHub.tsx
@@ -1,8 +1,10 @@
import { useMemo, useState } from "react";
import { P, match } from "ts-pattern";
+import { t } from "ttag";
import { CreateDashboardModal } from "metabase/dashboard/containers/CreateDashboardModal";
import { AddDataModal } from "metabase/nav/containers/MainNavbar/MainNavbarContainer/AddDataModal";
+import { PLUGIN_TENANTS } from "metabase/plugins";
import {
useCompletedEmbeddingHubSteps,
@@ -37,9 +39,31 @@ export const EmbeddingHub = () => {
);
const stepperSteps: StepperStep[] = useMemo(() => {
+ const getAlert = (stepId: string) => {
+ if (stepId === "create-test-embed") {
+ const areSimpleStepsCompleted =
+ completedSteps["add-data"] &&
+ completedSteps["create-dashboard"] &&
+ completedSteps["create-test-embed"];
+
+ if (areSimpleStepsCompleted) {
+ return {
+ type: "success" as const,
+ message: t`If all you want is a simple embedded dashboard, you're done! \n If you have a more sophisticated setup in mind, with many users and tenants, then keep going.`,
+ };
+ }
+
+ return {
+ type: "info" as const,
+ message: t`If all you want is a simple embedded dashboard, the steps above are all you need! \n If you have a more sophisticated setup in mind, with many users and tenants, then keep going.`,
+ };
+ }
+ };
+
return embeddingSteps.map((step) => ({
id: step.id,
title: step.title,
+ alert: getAlert(step.id),
cards: step.actions.map((action) => {
const stepId = action.stepId ?? step.id;
@@ -95,6 +119,9 @@ export const EmbeddingHub = () => {
opened={openedModal?.type === "xray-dashboard"}
onClose={closeModal}
/>
+ {openedModal?.type === "user-strategy" && (
+ <PLUGIN_TENANTS.EditUserStrategyModal onClose={closeModal} />
+ )}
</>
);
};
diff --git a/frontend/src/metabase/embedding/embedding-hub/components/EmbeddingHub.unit.spec.tsx b/frontend/src/metabase/embedding/embedding-hub/components/EmbeddingHub.unit.spec.tsx
index 8d89d6b7bb9..a46fdc58416 100644
--- a/frontend/src/metabase/embedding/embedding-hub/components/EmbeddingHub.unit.spec.tsx
+++ b/frontend/src/metabase/embedding/embedding-hub/components/EmbeddingHub.unit.spec.tsx
@@ -30,7 +30,7 @@ import { EmbeddingHub } from "./EmbeddingHub";
const mockPush = push as jest.MockedFunction<typeof push>;
-const setup = ({ isAdmin = true } = {}) => {
+const setup = ({ isAdmin = true, checklist = {} } = {}) => {
const state = createMockState({
currentUser: createMockUser({ is_superuser: isAdmin }),
settings: mockSettings({
@@ -75,7 +75,7 @@ const setup = ({ isAdmin = true } = {}) => {
query: { include_only_uploadable: true },
response: { data: [], total: 0 },
});
- fetchMock.get("path:/api/ee/embedding-hub/checklist", {});
+ fetchMock.get("path:/api/ee/embedding-hub/checklist", checklist);
return renderWithProviders(<EmbeddingHub />, { storeInitialState: state });
};
@@ -148,4 +148,31 @@ describe("EmbeddingHub", () => {
"https://www.metabase.com/docs/latest/permissions/embedding.html?utm_source=product&utm_medium=docs&utm_campaign=embedding_hub&utm_content=configure-row-column-security&source_plan=oss#one-database-for-all-customers-commingled-setups",
);
});
+
+ it("shows success banner when first 3 steps are completed", async () => {
+ setup({
+ checklist: {
+ "add-data": true,
+ "create-dashboard": true,
+ "create-test-embed": true,
+ "create-models": false,
+ "configure-row-column-security": false,
+ "embed-production": false,
+ "secure-embeds": false,
+ "setup-tenants": false,
+ },
+ });
+
+ const alert = screen.getByRole("alert");
+
+ expect(
+ await within(alert).findByText(
+ /If all you want is a simple embedded dashboard, you're done!/,
+ ),
+ ).toBeInTheDocument();
+
+ expect(
+ within(alert).getByRole("img", { name: "check icon" }),
+ ).toBeInTheDocument();
+ });
});
diff --git a/frontend/src/metabase/embedding/embedding-hub/components/StepperWithCards/StepperWithCards.module.css b/frontend/src/metabase/embedding/embedding-hub/components/StepperWithCards/StepperWithCards.module.css
index 9aeb28cffad..eccade9fdf2 100644
--- a/frontend/src/metabase/embedding/embedding-hub/components/StepperWithCards/StepperWithCards.module.css
+++ b/frontend/src/metabase/embedding/embedding-hub/components/StepperWithCards/StepperWithCards.module.css
@@ -73,3 +73,16 @@
.stepCard.nextStepCard {
border: 1px solid var(--mb-color-metabase-brand) !important;
}
+
+.infoAlertWrapper {
+ align-items: flex-start;
+}
+
+.infoAlertIcon {
+ margin-right: var(--mantine-spacing-xs);
+}
+
+.infoAlertMessage {
+ white-space: pre;
+ color: var(--mb-color-text-primary);
+}
diff --git a/frontend/src/metabase/embedding/embedding-hub/components/StepperWithCards/StepperWithCards.tsx b/frontend/src/metabase/embedding/embedding-hub/components/StepperWithCards/StepperWithCards.tsx
index 6c01574dacc..dd2a18df435 100644
--- a/frontend/src/metabase/embedding/embedding-hub/components/StepperWithCards/StepperWithCards.tsx
+++ b/frontend/src/metabase/embedding/embedding-hub/components/StepperWithCards/StepperWithCards.tsx
@@ -6,6 +6,7 @@ import { t } from "ttag";
import type { UtmProps } from "metabase/selectors/settings";
import {
+ Alert,
Card,
Flex,
Grid,
@@ -24,6 +25,9 @@ export interface StepperStep {
id: string;
title: string;
cards: StepperCard[];
+
+ /** Show an alert below the step */
+ alert?: { type: "info" | "success"; message: string };
}
export interface StepperCard {
@@ -89,109 +93,118 @@ export const StepperWithCards = ({ steps }: { steps: StepperStep[] }) => {
className={cx(S.step, isDone && S.stepDone)}
icon={isDone ? <Icon name="check" /> : undefined}
description={
- <Grid>
- {step.cards.map((card) => {
- const onClick =
- card.clickAction?.type === "click"
- ? card.clickAction.onClick
- : undefined;
-
- const isNextCard = nextCard && nextCard.id === card.id;
-
- return (
- <Grid.Col
- span={{ xs: 12, md: card.optional ? 4 : 8 }}
- key={card.id}
- >
- <CardAction card={card}>
- <Card
- h="100%"
- mih="8.75rem"
- className={cx(S.stepCard, {
- [S.lockedStepCard]: card.locked,
- [S.nextStepCard]: isNextCard,
- })}
- component={onClick ? "button" : undefined}
- onClick={onClick}
- disabled={card.locked}
- data-testid={`step-card-${card.id}`}
- data-next-step={isNextCard}
- >
- <Stack justify="space-between" h="100%">
- <Stack gap="xs" h="100%">
- <Text
- size={card.optional ? "md" : "lg"}
- fw="bold"
- c={
- card.done
- ? "var(--mb-color-text-secondary)"
- : "var(--mb-color-text-primary)"
- }
- >
- {card.title}
- </Text>
-
- <Text
- c="var(--mb-color-text-secondary)"
- size="sm"
- lh="lg"
- >
- {card.description}
- </Text>
- </Stack>
+ <div>
+ <Grid>
+ {step.cards.map((card) => {
+ const onClick =
+ card.clickAction?.type === "click"
+ ? card.clickAction.onClick
+ : undefined;
- {(card.optional || card.done || card.locked) && (
- <Flex justify="flex-end">
- {match(card)
- .with({ done: true }, () => (
- <Group gap="xs">
- <Icon
- name="check"
- c="var(--mb-color-success-darker)"
- size={12}
- />
- <Text
- size="sm"
- c="var(--mb-color-success-darker)"
- >
- {t`Done`}
- </Text>
- </Group>
- ))
- .with({ locked: true }, () => (
- <Group gap="xs">
- <Icon
- name="lock"
- c="var(--mb-color-text-secondary)"
- size={12}
- />
+ const isNextCard = nextCard && nextCard.id === card.id;
+
+ return (
+ <Grid.Col
+ span={{ xs: 12, md: card.optional ? 4 : 8 }}
+ key={card.id}
+ >
+ <CardAction card={card}>
+ <Card
+ h="100%"
+ mih="8.75rem"
+ className={cx(S.stepCard, {
+ [S.lockedStepCard]: card.locked,
+ [S.nextStepCard]: isNextCard,
+ })}
+ component={onClick ? "button" : undefined}
+ onClick={onClick}
+ disabled={card.locked}
+ data-testid={`step-card-${card.id}`}
+ data-next-step={isNextCard}
+ >
+ <Stack justify="space-between" h="100%">
+ <Stack gap="xs" h="100%">
+ <Text
+ size={card.optional ? "md" : "lg"}
+ fw="bold"
+ c={
+ card.done
+ ? "var(--mb-color-text-secondary)"
+ : "var(--mb-color-text-primary)"
+ }
+ >
+ {card.title}
+ </Text>
+ <Text
+ c="var(--mb-color-text-secondary)"
+ size="sm"
+ lh="lg"
+ >
+ {card.description}
+ </Text>
+ </Stack>
+
+ {(card.optional || card.done || card.locked) && (
+ <Flex justify="flex-end">
+ {match(card)
+ .with({ done: true }, () => (
+ <Group gap="xs">
+ <Icon
+ name="check"
+ c="var(--mb-color-success-darker)"
+ size={12}
+ />
+ <Text
+ size="sm"
+ c="var(--mb-color-success-darker)"
+ >
+ {t`Done`}
+ </Text>
+ </Group>
+ ))
+ .with({ locked: true }, () => (
+ <Group gap="xs">
+ <Icon
+ name="lock"
+ c="var(--mb-color-text-secondary)"
+ size={12}
+ />
+
+ <Text
+ c="var(--mb-color-text-secondary)"
+ fz={12}
+ >
+ {t`Complete the other steps to unlock`}
+ </Text>
+ </Group>
+ ))
+ .with({ optional: true }, () => (
<Text
+ size="sm"
c="var(--mb-color-text-secondary)"
- fz={12}
>
- {t`Complete the other steps to unlock`}
+ {t`Optional`}
</Text>
- </Group>
- ))
- .with({ optional: true }, () => (
- <Text
- size="sm"
- c="var(--mb-color-text-secondary)"
- >
- {t`Optional`}
- </Text>
- ))
- .otherwise(() => null)}
- </Flex>
- )}
- </Stack>
- </Card>
- </CardAction>
- </Grid.Col>
- );
- })}
- </Grid>
+ ))
+ .otherwise(() => null)}
+ </Flex>
+ )}
+ </Stack>
+ </Card>
+ </CardAction>
+ </Grid.Col>
+ );
+ })}
+ </Grid>
+
+ {step.alert && (
+ <StepAlert
+ type={step.alert.type}
+ message={step.alert.message}
+ />
+ )}
+ </div>
}
data-done={isDone}
></Stepper.Step>
@@ -226,3 +239,32 @@ const CardAction = ({
);
})
.otherwise(() => children);
+
+const StepAlert = ({
+ type,
+ message,
+}: {
+ type: "info" | "success";
+ message: string;
+}) => (
+ <Alert
+ icon={
+ <Icon
+ size={14}
+ name={type === "success" ? "check" : "info"}
+ c={type === "success" ? "success" : "text-secondary"}
+ />
+ }
+ mt="xl"
+ bg={type === "success" ? "background-success" : "brand-light"}
+ bd={type === "success" ? "1px solid var(--mb-color-success)" : undefined}
+ lh="lg"
+ classNames={{
+ wrapper: S.infoAlertWrapper,
+ icon: S.infoAlertIcon,
+ message: S.infoAlertMessage,
+ }}
+ >
+ {message}
+ </Alert>
+);
diff --git a/frontend/src/metabase/embedding/embedding-hub/hooks/use-get-embedding-hub-steps.ts b/frontend/src/metabase/embedding/embedding-hub/hooks/use-get-embedding-hub-steps.ts
index 3f92deccf9c..6ce7e965f9d 100644
--- a/frontend/src/metabase/embedding/embedding-hub/hooks/use-get-embedding-hub-steps.ts
+++ b/frontend/src/metabase/embedding/embedding-hub/hooks/use-get-embedding-hub-steps.ts
@@ -1,7 +1,6 @@
import { useCallback, useMemo } from "react";
import { t } from "ttag";
-import { useSetting } from "metabase/common/hooks";
import { useDispatch } from "metabase/lib/redux";
import {
PLUGIN_TENANTS,
@@ -9,11 +8,10 @@ import {
} from "metabase/plugins";
import { setOpenModalWithProps } from "metabase/redux/ui";
-import type { EmbeddingHubStep } from "../types";
+import type { EmbeddingHubAction, EmbeddingHubStep } from "../types";
export const useGetEmbeddingHubSteps = (): EmbeddingHubStep[] => {
const dispatch = useDispatch();
- const isUsingTenants = useSetting("use-tenants");
const openEmbedModal = useCallback(
(props: Pick<SdkIframeEmbedSetupModalProps, "initialState">) => {
@@ -33,7 +31,6 @@ export const useGetEmbeddingHubSteps = (): EmbeddingHubStep[] => {
const TEST_EMBED: EmbeddingHubStep = {
id: "create-test-embed",
title: t`Create embed`,
- icon: "test_tube",
actions: [
{
title: t`Get embed snippet`,
@@ -48,36 +45,12 @@ export const useGetEmbeddingHubSteps = (): EmbeddingHubStep[] => {
},
variant: "outline",
},
- ...(isTenantsFeatureAvailable
- ? [
- {
- title: t`Set up tenants`,
- description: t`Define a multi tenant user strategy to manage access for tenant users.`,
- to: isUsingTenants
- ? "/admin/tenants"
- : "/admin/people/user-strategy",
- optional: true,
- stepId: "setup-tenants" as const,
- },
- ]
- : []),
],
- image: {
- src: "app/assets/img/embedding_hub_create_embed.png",
- srcSet: "app/assets/img/[email protected] 2x",
- alt: t`Screenshot of creating an embed`,
- },
};
const ADD_DATA: EmbeddingHubStep = {
id: "add-data",
title: t`Add your data`,
- icon: "add_data",
- image: {
- src: "app/assets/img/onboarding_data_diagram.png",
- srcSet: "app/assets/img/[email protected] 2x",
- alt: t`Data sources and ETL diagram`,
- },
actions: [
{
title: t`Connect a database`,
@@ -91,12 +64,6 @@ export const useGetEmbeddingHubSteps = (): EmbeddingHubStep[] => {
const CREATE_DASHBOARD: EmbeddingHubStep = {
id: "create-dashboard",
title: t`Prepare data`,
- icon: "dashboard",
- video: {
- id: "FOAXF4p1AL0",
- trackingId: "COmu2w0SqGagUoVp",
- title: t`How to find and use X-rays?`,
- },
actions: [
{
title: t`Create a dashboard`,
@@ -114,10 +81,33 @@ export const useGetEmbeddingHubSteps = (): EmbeddingHubStep[] => {
],
};
+ const DATA_PERMISSION_CARD: EmbeddingHubAction = {
+ title: t`Configure data permissions`,
+ docsPath: "permissions/embedding",
+ anchor: "one-database-for-all-customers-commingled-setups",
+ description: t`Manage permissions to limit what data your users can access.`,
+ variant: "outline",
+ stepId: "configure-row-column-security",
+ optional: true,
+ };
+
+ const SETUP_TENANTS: EmbeddingHubStep = {
+ id: "setup-tenants",
+ title: t`Pick a strategy for users and permissions`,
+ actions: [
+ {
+ title: t`Pick a user strategy`,
+ description: t`Decide between a multi-tenant or single-tenant user strategy.`,
+ variant: "outline",
+ modal: { type: "user-strategy" },
+ },
+ DATA_PERMISSION_CARD,
+ ],
+ };
+
const SECURE_EMBEDS: EmbeddingHubStep = {
id: "secure-embeds",
- title: t`Security and permissions`,
- icon: "lock",
+ title: t`Set up authentication`,
actions: [
{
title: t`Configure SSO`,
@@ -127,30 +117,19 @@ export const useGetEmbeddingHubSteps = (): EmbeddingHubStep[] => {
variant: "outline",
stepId: "secure-embeds",
},
- {
- title: t`Configure data permissions`,
- docsPath: "permissions/embedding",
- anchor: "one-database-for-all-customers-commingled-setups",
- description: t`Manage permissions to limit what data your users can access.`,
- variant: "outline",
- stepId: "configure-row-column-security",
- optional: true,
- },
+
+ // If tenants are not available, show data permission card on the authentication step.
+ // Otherwise, it is already shown on the tenants setup step.
+ ...(isTenantsFeatureAvailable ? [] : [DATA_PERMISSION_CARD]),
],
- image: {
- src: "app/assets/img/embedding_hub_secure_embeds_diagram.png",
- srcSet: "app/assets/img/[email protected] 2x",
- alt: t`Diagram of the SSO authentication workflow`,
- },
};
const EMBED_PRODUCTION: EmbeddingHubStep = {
id: "embed-production",
title: t`Deployment`,
- icon: "code_block",
actions: [
{
- title: t`Embed in production`,
+ title: t`Embed in production with SSO`,
description: t`Deploy your embedded dashboard to a production environment and share with your users.`,
onClick: () => {
openEmbedModal({
@@ -163,23 +142,15 @@ export const useGetEmbeddingHubSteps = (): EmbeddingHubStep[] => {
variant: "outline",
},
],
- image: {
- src: "app/assets/img/embedding_hub_create_embed.png",
- srcSet: "app/assets/img/[email protected] 2x",
- alt: t`Screenshot of creating an embed`,
- },
- infoAlert: {
- type: "locked",
- message: t`Configure SSO authentication to unlock this step.`,
- },
};
return [
ADD_DATA,
CREATE_DASHBOARD,
TEST_EMBED,
+ ...(isTenantsFeatureAvailable ? [SETUP_TENANTS] : []),
SECURE_EMBEDS,
EMBED_PRODUCTION,
];
- }, [isUsingTenants, openEmbedModal]);
+ }, [openEmbedModal]);
};
diff --git a/frontend/src/metabase/embedding/embedding-hub/types/embedding-checklist.ts b/frontend/src/metabase/embedding/embedding-hub/types/embedding-checklist.ts
index 60dd409f147..4c88a02a270 100644
--- a/frontend/src/metabase/embedding/embedding-hub/types/embedding-checklist.ts
+++ b/frontend/src/metabase/embedding/embedding-hub/types/embedding-checklist.ts
@@ -1,5 +1,4 @@
import type { AddDataTab } from "metabase/nav/containers/MainNavbar/MainNavbarContainer/AddDataModal/utils";
-import type { IconName } from "metabase/ui";
export type EmbeddingHubStepId =
| "create-test-embed"
@@ -14,13 +13,6 @@ export type EmbeddingHubStepId =
export interface EmbeddingHubStep {
id: EmbeddingHubStepId;
title: string;
- icon: IconName;
-
- image?: EmbeddingHubImage;
- video?: EmbeddingHubVideo;
-
- /** Show an info alert box above the CTA */
- infoAlert?: EmbeddingHubInfoAlert;
actions: EmbeddingHubAction[];
}
@@ -28,14 +20,10 @@ export interface EmbeddingHubStep {
export type EmbeddingHubModalToTrigger =
| { type: "add-data"; initialTab: AddDataTab }
| { type: "new-dashboard" }
- | { type: "xray-dashboard" };
+ | { type: "xray-dashboard" }
+ | { type: "user-strategy" };
-/** `always` is always shown. `locked` only shows on locked steps */
-export type EmbeddingHubInfoAlert =
- | { type: "always"; message: string }
- | { type: "locked"; message: string };
-
-interface EmbeddingHubAction {
+export interface EmbeddingHubAction {
stepId?: EmbeddingHubStepId;
title: string;
@@ -63,15 +51,3 @@ interface EmbeddingHubAction {
optional?: boolean;
}
-
-interface EmbeddingHubImage {
- src: string;
- srcSet?: string;
- alt: string;
-}
-
-export interface EmbeddingHubVideo {
- id: string;
- trackingId: string;
- title: string;
-}
diff --git a/frontend/src/metabase/embedding/embedding-hub/types/index.ts b/frontend/src/metabase/embedding/embedding-hub/types/index.ts
index 4b806b32c94..03b4c37eca3 100644
--- a/frontend/src/metabase/embedding/embedding-hub/types/index.ts
+++ b/frontend/src/metabase/embedding/embedding-hub/types/index.ts
@@ -1,5 +1,6 @@
export type {
EmbeddingHubStep,
EmbeddingHubStepId,
+ EmbeddingHubAction,
EmbeddingHubModalToTrigger,
} from "./embedding-checklist";
diff --git a/frontend/src/metabase/lib/colors/colors.ts b/frontend/src/metabase/lib/colors/colors.ts
index 91f4460130f..939a8f6ee70 100644
--- a/frontend/src/metabase/lib/colors/colors.ts
+++ b/frontend/src/metabase/lib/colors/colors.ts
@@ -317,6 +317,10 @@ const getColorConfig = (settings: ColorSettings = {}) => ({
light: baseColors.lobster[10],
dark: baseColors.lobster[90],
},
+ "background-success": {
+ light: baseColors.palm[5],
+ dark: baseColors.palm[90],
+ },
"bg-light": { light: baseColors.orion[5], dark: baseColors.orion[110] }, //should be background-secondary
"bg-medium": { light: baseColors.orion[10], dark: baseColors.orion[80] }, //should be background-tertiary
"bg-night": { light: baseColors.orion[70], dark: baseColors.orion[30] }, //merge with background-secondary-inverse?
diff --git a/frontend/src/metabase/plugins/oss/tenants.ts b/frontend/src/metabase/plugins/oss/tenants.ts
index 6d3d1a6cec1..3c0db4f0600 100644
--- a/frontend/src/metabase/plugins/oss/tenants.ts
+++ b/frontend/src/metabase/plugins/oss/tenants.ts
@@ -48,6 +48,7 @@ const getDefaultPluginTenants = () => ({
TenantCollectionList: PluginPlaceholder,
GroupDescription: (_props: { group: Group }) =>
null as React.ReactElement | null,
+ EditUserStrategyModal: PluginPlaceholder,
getNewUserModalTitle: (_isExternal: boolean) => null as string | null,
getFormGroupsTitle: (_isExternal: boolean) => null as string | null,
SHARED_TENANT_NAMESPACE: null as CollectionNamespace,
@@ -83,7 +84,9 @@ export const PLUGIN_TENANTS: {
sharedTenantCollections: Collection[] | undefined;
};
tenantsRoutes: React.ReactElement | null;
- EditUserStrategySettingsButton: React.ComponentType;
+ EditUserStrategySettingsButton: (props: {
+ page: "people" | "tenants";
+ }) => React.ReactElement | null;
FormTenantWidget: (props: any) => React.ReactElement | null;
TenantDisplayName: (props: any) => React.ReactElement | null;
isExternalUsersGroup: (group: Pick<Group, "magic_group_type">) => boolean;
@@ -107,6 +110,9 @@ export const PLUGIN_TENANTS: {
) => React.ReactElement | null;
TenantCollectionList: React.ComponentType;
GroupDescription: (props: { group: Group }) => React.ReactElement | null;
+ EditUserStrategyModal: (props: {
+ onClose: () => void;
+ }) => React.ReactElement | null;
getNewUserModalTitle: (isExternal: boolean) => string | null;
getFormGroupsTitle: (isExternal: boolean) => string | null;
SHARED_TENANT_NAMESPACE: CollectionNamespace;