diff --git a/packages/twenty-front/src/modules/command-menu/pages/page-layout/components/ChartTypeSelectionSection.tsx b/packages/twenty-front/src/modules/command-menu/pages/page-layout/components/ChartTypeSelectionSection.tsx index 0beed69933..8657148271 100644 --- a/packages/twenty-front/src/modules/command-menu/pages/page-layout/components/ChartTypeSelectionSection.tsx +++ b/packages/twenty-front/src/modules/command-menu/pages/page-layout/components/ChartTypeSelectionSection.tsx @@ -47,17 +47,18 @@ export const ChartTypeSelectionSection = ({ return ( { setCurrentGraphType(graphType); }} - label={ - isDisabled ? t`Soon` : t(GRAPH_TYPE_INFORMATION[graphType].label) - } showLabel disabled={isDisabled} + tooltipContent={ + isDisabled ? t`Soon` : t(GRAPH_TYPE_INFORMATION[graphType].label) + } /> ); })} diff --git a/packages/twenty-front/src/modules/command-menu/pages/page-layout/constants/GraphTypeInformation.ts b/packages/twenty-front/src/modules/command-menu/pages/page-layout/constants/GraphTypeInformation.ts index b3a7e3b883..3a06372484 100644 --- a/packages/twenty-front/src/modules/command-menu/pages/page-layout/constants/GraphTypeInformation.ts +++ b/packages/twenty-front/src/modules/command-menu/pages/page-layout/constants/GraphTypeInformation.ts @@ -26,32 +26,32 @@ export const GRAPH_TYPE_INFORMATION: Record< } > = { [GraphType.VERTICAL_BAR]: { - label: msg`Vertical`, + label: msg`Vertical Bar Chart`, icon: IconChartBar, settings: getBarChartSettings(GraphType.VERTICAL_BAR), }, [GraphType.HORIZONTAL_BAR]: { - label: msg`Horizontal`, + label: msg`Horizontal Bar Chart`, icon: IconChartBarHorizontal, settings: getBarChartSettings(GraphType.HORIZONTAL_BAR), }, [GraphType.PIE]: { - label: msg`Pie`, + label: msg`Pie Chart`, icon: IconChartPie, settings: PIE_CHART_SETTINGS, }, [GraphType.LINE]: { - label: msg`Line`, + label: msg`Line Chart`, icon: IconChartLine, settings: LINE_CHART_SETTINGS, }, [GraphType.AGGREGATE]: { - label: msg`Aggregate`, + label: msg`Aggregate Chart`, icon: IconSum, settings: AGGREGATE_CHART_SETTINGS, }, [GraphType.GAUGE]: { - label: msg`Gauge`, + label: msg`Gauge Chart`, icon: IconGauge, settings: GAUGE_CHART_SETTINGS, }, diff --git a/packages/twenty-ui/src/display/banner/components/SidePanelInformationBanner.tsx b/packages/twenty-ui/src/display/banner/components/SidePanelInformationBanner.tsx index 1e4cba49fe..2f2c3241e6 100644 --- a/packages/twenty-ui/src/display/banner/components/SidePanelInformationBanner.tsx +++ b/packages/twenty-ui/src/display/banner/components/SidePanelInformationBanner.tsx @@ -1,4 +1,5 @@ import styled from '@emotion/styled'; +import { isDefined } from 'twenty-shared/utils'; import { IconAlertTriangle, IconInfoCircle, @@ -66,7 +67,7 @@ export const SidePanelInformationBanner = ({ )} {message} - {tooltipMessage && ( + {isDefined(tooltipMessage) && ( void; selected?: boolean; showLabel?: boolean; testId?: string; + tooltipContent?: string; + tooltipDelay?: TooltipDelay; + tooltipOffset?: number; }; export const MenuPicker = ({ + id, icon: Icon, label, selected = false, @@ -120,29 +132,47 @@ export const MenuPicker = ({ onClick, className, testId, + tooltipContent, + tooltipDelay = TooltipDelay.noDelay, + tooltipOffset = 5, }: MenuPickerProps) => { const theme = useTheme(); return ( - - - - + <> + + + + - {showLabel && ( - - {label} - + {isDefined(label) && showLabel && ( + + {label} + + )} + + + {isNonEmptyString(tooltipContent) && ( + )} - + ); }; diff --git a/packages/twenty-ui/src/navigation/menu/components/__stories__/MenuPicker.stories.tsx b/packages/twenty-ui/src/navigation/menu/components/__stories__/MenuPicker.stories.tsx index d167edaa12..351126f368 100644 --- a/packages/twenty-ui/src/navigation/menu/components/__stories__/MenuPicker.stories.tsx +++ b/packages/twenty-ui/src/navigation/menu/components/__stories__/MenuPicker.stories.tsx @@ -1,6 +1,6 @@ import styled from '@emotion/styled'; import { type Meta, type StoryObj } from '@storybook/react'; -import { IconChartPie } from '@ui/display'; +import { IconChartPie, TooltipDelay } from '@ui/display'; import { MenuPicker } from '@ui/navigation/menu/components/MenuPicker'; import { ComponentDecorator } from '@ui/testing'; @@ -67,19 +67,44 @@ export const AllStates: Story = { >
Default - +
Selected - +
Disabled - +
No Label - + +
+
+ With Tooltip +
),