From efdaf7ee4368b3e5b23f5b30081f8b355307b6d2 Mon Sep 17 00:00:00 2001 From: Vikrant Gupta Date: Fri, 18 Oct 2024 18:18:30 +0530 Subject: [PATCH] chore: make the clear selection view more highlighted (#6216) * chore: make the clear selection view more highlighted * chore: address minor design issue --- .../ExplorerOptions.styles.scss | 3 +- .../ExplorerOptions/ExplorerOptions.tsx | 47 ++++++++++--------- .../ExplorerOptionsHideArea.tsx | 6 ++- 3 files changed, 32 insertions(+), 24 deletions(-) diff --git a/frontend/src/container/ExplorerOptions/ExplorerOptions.styles.scss b/frontend/src/container/ExplorerOptions/ExplorerOptions.styles.scss index 54e87fa458..9efc053245 100644 --- a/frontend/src/container/ExplorerOptions/ExplorerOptions.styles.scss +++ b/frontend/src/container/ExplorerOptions/ExplorerOptions.styles.scss @@ -18,7 +18,7 @@ display: inline-flex; align-items: center; gap: 12px; - padding: 10px 12px; + padding: 10px 10px; border-radius: 50px; border: 1px solid var(--bg-slate-400); background: rgba(22, 24, 29, 0.6); @@ -33,6 +33,7 @@ border: 1px solid var(--bg-slate-400); background: var(--bg-slate-500); cursor: pointer; + box-shadow: none; } .hidden { diff --git a/frontend/src/container/ExplorerOptions/ExplorerOptions.tsx b/frontend/src/container/ExplorerOptions/ExplorerOptions.tsx index e882dd790e..8edd0444bf 100644 --- a/frontend/src/container/ExplorerOptions/ExplorerOptions.tsx +++ b/frontend/src/container/ExplorerOptions/ExplorerOptions.tsx @@ -45,7 +45,6 @@ import { PanelBottomClose, Plus, X, - XCircle, } from 'lucide-react'; import { CSSProperties, @@ -515,7 +514,11 @@ function ExplorerOptions({ return (
- {isQueryUpdated && !isExplorerOptionHidden && ( + { + // if a viewName is selected and the explorer options are not hidden then + // always show the clear option + } + {!isExplorerOptionHidden && viewName && (
} /> - - -
)} {!isExplorerOptionHidden && ( @@ -564,10 +574,7 @@ function ExplorerOptions({ }} dropdownStyle={dropdownStyle} className="views-dropdown" - allowClear={{ - clearIcon: , - }} - onClear={handleClearSelect} + allowClear={false} ref={ref} > {viewsData?.data?.data?.map((view) => { @@ -662,8 +669,8 @@ function ExplorerOptions({
)} - - Save this view} @@ -705,7 +711,6 @@ function ExplorerOptions({ /> - {isExplorerOptionHidden && ( <> - {isQueryUpdated && ( + {viewName && (