Skip to content

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

Avoid flashing of subscriptions channel selections sidebar (#66870)

Mahatthana (Kelvin) Nomsawadib5788126a469
diff --git a/frontend/src/metabase/notifications/DashboardSubscriptionsSidebar/DashboardSubscriptionsSidebar.jsx b/frontend/src/metabase/notifications/DashboardSubscriptionsSidebar/DashboardSubscriptionsSidebar.jsx
index 0c3f65c245b..9a8748ff957 100644
--- a/frontend/src/metabase/notifications/DashboardSubscriptionsSidebar/DashboardSubscriptionsSidebar.jsx
+++ b/frontend/src/metabase/notifications/DashboardSubscriptionsSidebar/DashboardSubscriptionsSidebar.jsx
@@ -481,7 +481,7 @@ class DashboardSubscriptionsSidebarInner extends Component {
);
}
- if (shouldDisplayNewPulse(editingMode, pulses)) {
+ if (shouldDisplayNewPulse(editingMode, pulses) && !isEmbeddingSdk()) {
const emailConfigured = formInput?.channels?.email?.configured || false;
const slackConfigured = formInput?.channels?.slack?.configured || false;
diff --git a/frontend/src/metabase/notifications/DashboardSubscriptionsSidebar/tests/common.unit.spec.ts b/frontend/src/metabase/notifications/DashboardSubscriptionsSidebar/tests/common.unit.spec.ts
index d9f3fa174c4..a905f256656 100644
--- a/frontend/src/metabase/notifications/DashboardSubscriptionsSidebar/tests/common.unit.spec.ts
+++ b/frontend/src/metabase/notifications/DashboardSubscriptionsSidebar/tests/common.unit.spec.ts
@@ -202,6 +202,11 @@ describe("DashboardSubscriptionsSidebar", () => {
// Create the first subscription
await userEvent.click(screen.getByRole("button", { name: "Done" }));
+ // (EMB-1099) The subscription channel options sidebar shouldn't be shown
+ expect(
+ screen.queryByText("Set up a dashboard subscription"),
+ ).not.toBeInTheDocument();
+
expect(await screen.findByText("Subscriptions")).toBeInTheDocument();
expect(await screen.findByText("Emailed hourly")).toBeInTheDocument();
expect(await screen.findByText("John Doe")).toBeInTheDocument();
@@ -228,6 +233,11 @@ describe("DashboardSubscriptionsSidebar", () => {
// Create the first subscription
await userEvent.click(screen.getByRole("button", { name: "Done" }));
+ // (EMB-1099) The subscription channel options sidebar shouldn't be shown
+ expect(
+ screen.queryByText("Set up a dashboard subscription"),
+ ).not.toBeInTheDocument();
+
expect(await screen.findByText("Subscriptions")).toBeInTheDocument();
expect(await screen.findByText("Emailed hourly")).toBeInTheDocument();
expect(await screen.findByText("Admin User")).toBeInTheDocument();