From f32d88a2069605fcc657efd0188bf4dc8aed5bc1 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Fri, 11 Apr 2025 14:00:47 -0600 Subject: [PATCH] make dropzone for available items bigger --- .../MetricStylingApp/Common/StylingLabel.tsx | 3 +- .../MetricStylingApp/MetricStylingApp.tsx | 6 ++-- .../StylingAppStyling/StylingAppStyling.tsx | 2 +- .../SelectAxis/SelectAxis.tsx | 16 ++++----- .../SelectAxisDropdownContent.tsx | 4 +-- .../SelectAxisAvailableItemsList.tsx | 36 ++++++++++--------- .../SelectAxisDropzones.tsx | 2 +- .../StylingAppVisualize.tsx | 5 +-- 8 files changed, 39 insertions(+), 35 deletions(-) diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/Common/StylingLabel.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/Common/StylingLabel.tsx index dc068f83c..ecc8a2325 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/Common/StylingLabel.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/Common/StylingLabel.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { Text } from '@/components/ui/typography'; +import { cn } from '@/lib/classMerge'; interface StylingLabelProps { label: string; @@ -12,7 +13,7 @@ interface StylingLabelProps { export const StylingLabel = React.forwardRef( ({ label, labelExtra, children, className = '', id }, ref) => { return ( -
+
{label} diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/MetricStylingApp.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/MetricStylingApp.tsx index d01e7c658..dea250c93 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/MetricStylingApp.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/MetricStylingApp.tsx @@ -96,8 +96,10 @@ export const MetricStylingApp: React.FC<{ setSegment={setSegment} selectedChartType={selectedChartType} /> - - + { + //this crazy css selector is so that the available section has a large dropzone + } + {segment === MetricStylingAppSegments.VISUALIZE && ( - - - -
+ + + ); }); SelectAxis.displayName = 'SelectAxis'; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/SelectAxisDropdownContent.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/SelectAxisDropdownContent.tsx index 5548a9b05..e107c6821 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/SelectAxisDropdownContent.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisColumnContent/SelectAxisDropdownContent.tsx @@ -257,7 +257,7 @@ const ColumnSettingComponent: React.FC<{ return ( <> -
+
{EnabledComponentsLoop.map(({ enabled, key, Component }) => { return {Component}; })} @@ -429,7 +429,7 @@ const LabelSettings: React.FC<{ return ( -
+
{ComponentsLoop.map(({ key, Component }) => { return {Component}; })} diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/SelectAxisAvailableItemsList.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/SelectAxisAvailableItemsList.tsx index 79869e48b..c62d70a35 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/SelectAxisAvailableItemsList.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/SelectAxisAvailableItemsList.tsx @@ -28,22 +28,24 @@ export const AvailableItemsList: React.FC = ({ (isOver || isActive) && activeZone !== SelectAxisContainerId.Available; return ( -
- -
- {items.map((item) => ( - - ))} -
-
-
+ +
+ {items.map((item) => ( + + ))} +
+
); }; diff --git a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/SelectAxisDropzones.tsx b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/SelectAxisDropzones.tsx index 93d22292b..f05cb8322 100644 --- a/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/SelectAxisDropzones.tsx +++ b/web/src/controllers/MetricController/MetricViewChart/MetricEditController/MetricStylingApp/StylingAppVisualize/SelectAxis/SelectAxisDragContainer/SelectAxisDropzones.tsx @@ -53,7 +53,7 @@ export const SelectAxisDropzones: React.FC<{ onDragStart={handleDragStart} onDragOver={handleDragOver} onDragEnd={handleDragEnd}> -
+
{dropZones.map((zone) => ( +
{!isMetricChart && ( -
+
)}