From 0312f496dd4d6af7c053bfd035f9c8cc4c69a8cb Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Thu, 17 Oct 2024 09:40:16 +1000 Subject: [PATCH 1/4] TI-553 fix import statement --- frontend/src/metabase/sharing/components/PulsesListSidebar.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/metabase/sharing/components/PulsesListSidebar.jsx b/frontend/src/metabase/sharing/components/PulsesListSidebar.jsx index b8a4c79fbb9d..b9141750d832 100644 --- a/frontend/src/metabase/sharing/components/PulsesListSidebar.jsx +++ b/frontend/src/metabase/sharing/components/PulsesListSidebar.jsx @@ -19,7 +19,7 @@ import { import { getActivePulseParameters } from "metabase/lib/pulse"; import { formatFrame } from "metabase/lib/time"; import { Icon } from "metabase/ui"; -import { getUser } from "metabase/home/selectors"; +import { getUser } from "metabase/selectors/user"; import Settings from "metabase/lib/settings"; import { PulseCard, SidebarActions } from "./PulsesListSidebar.styled"; From b22d7a20f566a1758cf4c39d6076b15fada18a76 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Wed, 6 Nov 2024 15:33:26 +1000 Subject: [PATCH 2/4] TI-559 fix section saving --- frontend/src/metabase/dashboard/actions/tabs.ts | 5 ++++- frontend/src/metabase/redux/user.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/metabase/dashboard/actions/tabs.ts b/frontend/src/metabase/dashboard/actions/tabs.ts index ba271e08d2a6..2e356cdecc50 100644 --- a/frontend/src/metabase/dashboard/actions/tabs.ts +++ b/frontend/src/metabase/dashboard/actions/tabs.ts @@ -513,6 +513,9 @@ export const tabsReducer = createReducer( ); builder.addCase(Dashboards.actionTypes.UPDATE, (state, { payload }) => { + if (!payload.dashboard) { + return; + } const { dashcards: newDashcards, tabs: newTabs } = payload.dashboard; const { prevDash, prevTabs } = getPrevDashAndTabs({ @@ -536,7 +539,7 @@ export const tabsReducer = createReducer( const prevDashcardData = state.dashcardData[prevId]; if (prevDashcardData) { - state.dashcardData[newDashcards[index].id] = prevDashcardData; + state.dashcardData[newDashcards[index]?.id] = prevDashcardData; } }); diff --git a/frontend/src/metabase/redux/user.ts b/frontend/src/metabase/redux/user.ts index 695cc1a3ecf5..b110ac9490e1 100644 --- a/frontend/src/metabase/redux/user.ts +++ b/frontend/src/metabase/redux/user.ts @@ -56,6 +56,7 @@ export const currentUser = createReducer(null, builder => { const { dashboard } = payload; if ( state != null && + dashboard != null && state.custom_homepage?.dashboard_id === dashboard.id && dashboard.archived ) { From 0286e2051fc13a3908eeb5b39423668c3aa484a7 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Tue, 26 Nov 2024 09:05:40 +1000 Subject: [PATCH 3/4] TI-570 remove csv upload button --- .../components/CollectionHeader/CollectionHeader.tsx | 8 -------- 1 file changed, 8 deletions(-) diff --git a/frontend/src/metabase/collections/components/CollectionHeader/CollectionHeader.tsx b/frontend/src/metabase/collections/components/CollectionHeader/CollectionHeader.tsx index df127bf3651a..d493b32bc013 100644 --- a/frontend/src/metabase/collections/components/CollectionHeader/CollectionHeader.tsx +++ b/frontend/src/metabase/collections/components/CollectionHeader/CollectionHeader.tsx @@ -48,14 +48,6 @@ const CollectionHeader = ({ onUpdateCollection={onUpdateCollection} /> - {showUploadButton && ( - - )} {!isInstanceAnalytics && } {isInstanceAnalytics && ( From 04b27b0dffd64b3e19645bd24e31f25583174ee4 Mon Sep 17 00:00:00 2001 From: Lev Feldman Date: Mon, 2 Dec 2024 10:06:46 +1000 Subject: [PATCH 4/4] TI-571 handle simpro_removed field for virtual cards --- src/metabase/models/dashboard.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/metabase/models/dashboard.clj b/src/metabase/models/dashboard.clj index 4c116e2ccd0e..c40dbbbe6666 100644 --- a/src/metabase/models/dashboard.clj +++ b/src/metabase/models/dashboard.clj @@ -210,7 +210,9 @@ [:collection :collection] [:= :collection.id :card.collection_id]] :where [:and [:in :dashcard.dashboard_id (map :id dashboards)] - [:= :card.simpro_removed false] + [:or + [:= :card.simpro_removed false] + [:= :card.simpro_removed nil]] ;handle virtual cards [:or [:= :card.archived false] [:= :card.archived nil]]] ; e.g. DashCards with no corresponding Card, e.g. text Cards