From 522e73b48e60bb77b15f4f7f2c77f055441035d1 Mon Sep 17 00:00:00 2001 From: Vishal Sharma Date: Fri, 26 Jul 2024 18:51:48 +0530 Subject: [PATCH] chore: move facing issues button in dashboards and disable intercom ping (#5571) * chore: move facing issues button in dashboards and disable intercom ping * chore: review comment --- .../facingIssueBtn/FacingIssueBtn.tsx | 5 +++- .../ListOfDashboard/DashboardsList.tsx | 3 ++- .../DashboardDescription/index.tsx | 23 ++++++++++--------- .../LeftContainer/QuerySection/index.tsx | 16 +++++++++++++ frontend/src/container/NewWidget/index.tsx | 16 ------------- 5 files changed, 34 insertions(+), 29 deletions(-) diff --git a/frontend/src/components/facingIssueBtn/FacingIssueBtn.tsx b/frontend/src/components/facingIssueBtn/FacingIssueBtn.tsx index 2a4b07aa22..093c2b8f02 100644 --- a/frontend/src/components/facingIssueBtn/FacingIssueBtn.tsx +++ b/frontend/src/components/facingIssueBtn/FacingIssueBtn.tsx @@ -16,6 +16,7 @@ export interface FacingIssueBtnProps { buttonText?: string; className?: string; onHoverText?: string; + intercomMessageDisabled?: boolean; } function FacingIssueBtn({ @@ -25,11 +26,12 @@ function FacingIssueBtn({ buttonText = '', className = '', onHoverText = '', + intercomMessageDisabled = false, }: FacingIssueBtnProps): JSX.Element | null { const handleFacingIssuesClick = (): void => { logEvent(eventName, attributes); - if (window.Intercom) { + if (window.Intercom && !intercomMessageDisabled) { window.Intercom('showNewMessage', defaultTo(message, '')); } }; @@ -62,6 +64,7 @@ FacingIssueBtn.defaultProps = { buttonText: '', className: '', onHoverText: '', + intercomMessageDisabled: false, }; export default FacingIssueBtn; diff --git a/frontend/src/container/ListOfDashboard/DashboardsList.tsx b/frontend/src/container/ListOfDashboard/DashboardsList.tsx index 05847cebde..17b6fe0863 100644 --- a/frontend/src/container/ListOfDashboard/DashboardsList.tsx +++ b/frontend/src/container/ListOfDashboard/DashboardsList.tsx @@ -653,8 +653,9 @@ function DashboardsList(): JSX.Element { }} eventName="Dashboard: Facing Issues in dashboard" message={dashboardListMessage} - buttonText="Facing issues with dashboards?" + buttonText="Need help with dashboards?" onHoverText="Click here to get help with dashboards" + intercomMessageDisabled /> diff --git a/frontend/src/container/NewDashboard/DashboardDescription/index.tsx b/frontend/src/container/NewDashboard/DashboardDescription/index.tsx index 60e9e90db8..d3c959ca8b 100644 --- a/frontend/src/container/NewDashboard/DashboardDescription/index.tsx +++ b/frontend/src/container/NewDashboard/DashboardDescription/index.tsx @@ -300,17 +300,6 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element { {title} -
@@ -323,6 +312,18 @@ function DashboardDescription(props: DashboardDescriptionProps): JSX.Element { {isDashboardLocked && }
+ + Configure panel -
{isSaveDisabled && (