diff --git a/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx b/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx index c6b225de8f..c4d97924bc 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx @@ -67,7 +67,7 @@ function AnalyticsPage({ params }: Route.ComponentProps) { {workspaceProjectIds && ( <> {workspaceProjectIds.length > 0 || loader === "init-loader" ? ( -
+
- + {ANALYTICS_TABS.map((tab) => ( { + if (!tab.isDisabled) { + handleTabChange(tab.key); + } + }} > {tab.label} diff --git a/apps/web/core/components/analytics/overview/project-insights.tsx b/apps/web/core/components/analytics/overview/project-insights.tsx index 67da6f355f..c0fa6c6b1a 100644 --- a/apps/web/core/components/analytics/overview/project-insights.tsx +++ b/apps/web/core/components/analytics/overview/project-insights.tsx @@ -65,15 +65,15 @@ const ProjectInsights = observer(function ProjectInsights() { {projectInsightsData && ( }> + {percentage}% ); @@ -109,9 +110,12 @@ const CustomBar = React.memo(function CustomBar(props: TBarProps) { {showText && ( @@ -172,11 +176,13 @@ const createShapeVariant = ); }; +export { DEFAULT_BAR_FILL_COLOR }; + export const barShapeVariants: Record< TBarChartShapeVariant, (props: TShapeProps, bar: TBarItem, stackKeys: string[]) => React.ReactNode > = { - bar: createShapeVariant(CustomBar), // Standard bar with rounded-sm corners + bar: createShapeVariant(CustomBar), // Standard bar with rounded corners lollipop: createShapeVariant(CustomBarLollipop), // Line with circle at top "lollipop-dotted": createShapeVariant(CustomBarLollipop, { dotted: true }), // Dotted line lollipop variant }; diff --git a/packages/propel/src/charts/bar-chart/root.tsx b/packages/propel/src/charts/bar-chart/root.tsx index 64885e5895..0e373203e7 100644 --- a/packages/propel/src/charts/bar-chart/root.tsx +++ b/packages/propel/src/charts/bar-chart/root.tsx @@ -17,9 +17,7 @@ import type { TBarChartProps } from "@plane/types"; import { getLegendProps } from "../components/legend"; import { CustomXAxisTick, CustomYAxisTick } from "../components/tick"; import { CustomTooltip } from "../components/tooltip"; -import { barShapeVariants } from "./bar"; - -const DEFAULT_BAR_FILL_COLOR = "#000000"; +import { barShapeVariants, DEFAULT_BAR_FILL_COLOR } from "./bar"; export const BarChart = React.memo(function BarChart(props: TBarChartProps) { const { @@ -129,7 +127,7 @@ export const BarChart = React.memo(function BarChart - + { @@ -176,8 +174,8 @@ export const BarChart = React.memo(function BarChart ( } animationEasing="ease-out" isUpdateAnimationActive={isAnimationActive} @@ -29,7 +29,7 @@ export const TreeMapChart = React.memo(function TreeMapChart(props: TreeMapChart content={({ active, payload }) => } cursor={{ fill: "currentColor", - className: "text-custom-background-90/80 cursor-pointer", + className: "bg-layer-1 cursor-pointer", }} wrapperStyle={{ pointerEvents: "auto", diff --git a/packages/propel/src/tabs/tabs.tsx b/packages/propel/src/tabs/tabs.tsx index 6790bbe4ca..b6136731cb 100644 --- a/packages/propel/src/tabs/tabs.tsx +++ b/packages/propel/src/tabs/tabs.tsx @@ -2,11 +2,15 @@ import * as React from "react"; import { Tabs as TabsPrimitive } from "@base-ui-components/react/tabs"; import { cn } from "../utils/classname"; +type BackgroundVariant = "layer-1" | "layer-2" | "layer-3" | "layer-transparent"; + type TabsCompound = React.ForwardRefExoticComponent< React.ComponentProps & React.RefAttributes> > & { List: React.ForwardRefExoticComponent< - React.ComponentProps & React.RefAttributes> + React.ComponentProps & { + background?: BackgroundVariant; + } & React.RefAttributes> >; Trigger: React.ForwardRefExoticComponent< React.ComponentProps & { size?: "sm" | "md" | "lg" } & React.RefAttributes< @@ -34,14 +38,26 @@ const TabsRoot = React.forwardRef(function TabsRoot( }); const TabsList = React.forwardRef(function TabsList( - { className, ...props }: React.ComponentProps, + { + className, + background = "layer-1", + ...props + }: React.ComponentProps & { + background?: BackgroundVariant; + }, ref: React.ForwardedRef> ) { return (