From bcb10910e37979c91c17c3725a04ed3ce53576dd Mon Sep 17 00:00:00 2001 From: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com> Date: Tue, 20 Aug 2024 00:41:33 +0200 Subject: [PATCH] tech: Delete old analytics code (#46986) --- .../AddSeriesButton/AddSeriesButton.tsx | 1 - .../DashCardActionButton/DashCardActionButton.tsx | 6 +----- .../DashCardActionsPanel/DashCardActionsPanel.tsx | 8 +------- .../DashboardHeader/buttons/DashboardActionMenu.tsx | 4 ---- 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/AddSeriesButton/AddSeriesButton.tsx b/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/AddSeriesButton/AddSeriesButton.tsx index 847ae7ed6ed..6b45f6289d2 100644 --- a/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/AddSeriesButton/AddSeriesButton.tsx +++ b/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/AddSeriesButton/AddSeriesButton.tsx @@ -33,7 +33,6 @@ export function AddSeriesButton({ <ActionButton onClick={onClick} tooltip={series.length > 1 ? t`Edit series` : t`Add series`} - analyticsEvent="Dashboard;Edit Series Modal;open" data-testid="add-series-button" > <IconContainer> diff --git a/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/DashCardActionButton/DashCardActionButton.tsx b/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/DashCardActionButton/DashCardActionButton.tsx index 6680339359e..ac036312faf 100644 --- a/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/DashCardActionButton/DashCardActionButton.tsx +++ b/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/DashCardActionButton/DashCardActionButton.tsx @@ -12,14 +12,10 @@ import { interface Props extends HTMLAttributes<HTMLAnchorElement> { as?: ElementType; tooltip?: string; - analyticsEvent?: string; } const DashActionButton = forwardRef<HTMLAnchorElement, Props>( - function DashActionButton( - { as, tooltip, analyticsEvent, children, ...props }, - ref, - ) { + function DashActionButton({ as, tooltip, children, ...props }, ref) { return ( <StyledAnchor {...props} as={as} ref={ref}> <Tooltip tooltip={tooltip}>{children}</Tooltip> diff --git a/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/DashCardActionsPanel.tsx b/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/DashCardActionsPanel.tsx index 5622a07cc0d..f302ed90a79 100644 --- a/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/DashCardActionsPanel.tsx +++ b/frontend/src/metabase/dashboard/components/DashCard/DashCardActionsPanel/DashCardActionsPanel.tsx @@ -142,7 +142,6 @@ function DashCardActionsPanelInner({ onClick={onPreviewToggle} tooltip={isPreviewing ? t`Edit` : t`Preview`} aria-label={isPreviewing ? t`Edit card` : t`Preview card`} - analyticsEvent="Dashboard;Text;edit" > {isPreviewing ? ( <DashCardActionButton.Icon name="edit_document" /> @@ -174,7 +173,6 @@ function DashCardActionsPanelInner({ key="click-behavior-tooltip" aria-label={t`Click behavior`} tooltip={t`Click behavior`} - analyticsEvent="Dashboard;Open Click Behavior Sidebar" onClick={showClickBehaviorSidebar} > <Icon name="click" /> @@ -251,11 +249,7 @@ function DashCardActionsPanelInner({ > <DashCardActionButtonsContainer> {buttons} - <DashCardActionButton - onClick={handleRemoveCard} - tooltip={t`Remove`} - analyticsEvent="Dashboard;Remove Card Modal" - > + <DashCardActionButton onClick={handleRemoveCard} tooltip={t`Remove`}> <DashCardActionButton.Icon name="close" /> </DashCardActionButton> </DashCardActionButtonsContainer> diff --git a/frontend/src/metabase/dashboard/components/DashboardHeader/buttons/DashboardActionMenu.tsx b/frontend/src/metabase/dashboard/components/DashboardHeader/buttons/DashboardActionMenu.tsx index 84b5c10797e..c17706ec109 100644 --- a/frontend/src/metabase/dashboard/components/DashboardHeader/buttons/DashboardActionMenu.tsx +++ b/frontend/src/metabase/dashboard/components/DashboardHeader/buttons/DashboardActionMenu.tsx @@ -54,7 +54,6 @@ export const getExtraButtons = ({ title: t`Enter fullscreen`, icon: "expand", action: (e: MouseEvent) => onFullscreenChange(!isFullscreen, !e.altKey), - event: `Dashboard;Fullscreen Mode;${!isFullscreen}`, }); extraButtons.push({ @@ -79,7 +78,6 @@ export const getExtraButtons = ({ title: t`Move`, icon: "move", link: `${pathname}/move`, - event: "Dashboard;Move", }); } @@ -87,7 +85,6 @@ export const getExtraButtons = ({ title: t`Duplicate`, icon: "clone", link: `${pathname}/copy`, - event: "Dashboard;Copy", }); if (canEdit) { @@ -97,7 +94,6 @@ export const getExtraButtons = ({ title: t`Move to trash`, icon: "trash", link: `${pathname}/archive`, - event: "Dashboard;Archive", }); } -- GitLab