From bcfefea32325cce20af6739549019640f7bfaa72 Mon Sep 17 00:00:00 2001 From: Jayash Tripathy <76092296+JayashTripathy@users.noreply.github.com> Date: Wed, 31 Dec 2025 17:40:16 +0530 Subject: [PATCH] refactor: update Tabs component usage across multiple files to use new structure with TabsList, TabsTrigger, and TabsContent --- .../(projects)/analytics/[tabId]/page.tsx | 14 +++++------ .../components/core/image-picker-popover.tsx | 22 ++++++++--------- .../cycles/active-cycle/cycle-stats.tsx | 24 +++++++++---------- .../analytics-sidebar/progress-stats.tsx | 22 ++++++++--------- .../modal/card/base-paid-plan-card.tsx | 14 +++++------ .../analytics-sidebar/progress-stats.tsx | 22 ++++++++--------- .../components/pages/navigation-pane/root.tsx | 4 ++-- .../pages/navigation-pane/tab-panels/root.tsx | 6 ++--- .../pages/navigation-pane/tabs-list.tsx | 10 ++++---- 9 files changed, 69 insertions(+), 69 deletions(-) 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 58b0f9567b..f138bc3169 100644 --- a/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx +++ b/apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx @@ -5,7 +5,7 @@ import { useRouter } from "next/navigation"; import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; import { useTranslation } from "@plane/i18n"; import { EmptyStateDetailed } from "@plane/propel/empty-state"; -import { Tabs } from "@plane/propel/tabs"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@plane/propel/tabs"; // components import { cn } from "@plane/utils"; import AnalyticsFilterActions from "@/components/analytics/analytics-filter-actions"; @@ -74,9 +74,9 @@ function AnalyticsPage({ params }: Route.ComponentProps) { "px-6 py-2 border-b border-subtle flex items-center gap-4 overflow-hidden w-full justify-between bg-surface-1" )} > - + {ANALYTICS_TABS.map((tab) => ( - {tab.label} - + ))} - +
{ANALYTICS_TABS.map((tab) => ( - - + ))} diff --git a/apps/web/core/components/core/image-picker-popover.tsx b/apps/web/core/components/core/image-picker-popover.tsx index 06529b387a..b3afe4189a 100644 --- a/apps/web/core/components/core/image-picker-popover.tsx +++ b/apps/web/core/components/core/image-picker-popover.tsx @@ -19,7 +19,7 @@ import { useInstance } from "@/hooks/store/use-instance"; import { useDropdownKeyDown } from "@/hooks/use-dropdown-key-down"; // services import { FileService } from "@/services/file.service"; -import { Tabs } from "@plane/propel/tabs"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@plane/propel/tabs"; import { Popover } from "@plane/propel/popover"; type TTabOption = { @@ -194,15 +194,15 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr className="flex h-96 w-80 flex-col overflow-auto rounded border border-subtle bg-surface-1 shadow-raised-200 md:h-[36rem] md:w-[36rem] p-2" > - + {tabOptions.map((tab) => ( - + {tab.title} - + ))} - +
- + {(unsplashImages || !unsplashError) && ( <>
@@ -269,8 +269,8 @@ export const ImagePickerPopover = observer(function ImagePickerPopover(props: Pr )} )} - - + +
{Object.values(STATIC_COVER_IMAGES).map((imageUrl, index) => (
))}
- - + +
- +
diff --git a/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx b/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx index d1b26a9772..5fb807e5de 100644 --- a/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx +++ b/apps/web/core/components/cycles/active-cycle/cycle-stats.tsx @@ -6,7 +6,7 @@ import { CalendarCheck } from "lucide-react"; // plane imports import { useTranslation } from "@plane/i18n"; import { PriorityIcon } from "@plane/propel/icons"; -import { Tabs } from "@plane/propel/tabs"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@plane/propel/tabs"; import { Tooltip } from "@plane/propel/tooltip"; import type { TWorkItemFilterCondition } from "@plane/shared-state"; import type { ICycle } from "@plane/types"; @@ -88,13 +88,13 @@ export const ActiveCycleStats = observer(function ActiveCycleStats(props: Active return cycleId ? (
- - {t("project_cycles.active_cycle.priority_issue")} - {t("project_cycles.active_cycle.assignees")} - {t("project_cycles.active_cycle.labels")} - + + {t("project_cycles.active_cycle.priority_issue")} + {t("project_cycles.active_cycle.assignees")} + {t("project_cycles.active_cycle.labels")} + - @@ -181,9 +181,9 @@ export const ActiveCycleStats = observer(function ActiveCycleStats(props: Active loaders )}
-
+ - @@ -243,9 +243,9 @@ export const ActiveCycleStats = observer(function ActiveCycleStats(props: Active ) : ( loaders )} - + - @@ -286,7 +286,7 @@ export const ActiveCycleStats = observer(function ActiveCycleStats(props: Active ) : ( loaders )} - +
) : ( diff --git a/apps/web/core/components/cycles/analytics-sidebar/progress-stats.tsx b/apps/web/core/components/cycles/analytics-sidebar/progress-stats.tsx index 29f58cfa5a..ec92587c73 100644 --- a/apps/web/core/components/cycles/analytics-sidebar/progress-stats.tsx +++ b/apps/web/core/components/cycles/analytics-sidebar/progress-stats.tsx @@ -1,7 +1,7 @@ import { observer } from "mobx-react"; // plane imports import { useTranslation } from "@plane/i18n"; -import { Tabs } from "@plane/propel/tabs"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@plane/propel/tabs"; import type { TWorkItemFilterCondition } from "@plane/shared-state"; import type { TCycleDistribution, TCycleEstimateDistribution, TCyclePlotType } from "@plane/types"; import { toFilterArray } from "@plane/utils"; @@ -110,15 +110,15 @@ export const CycleProgressStats = observer(function CycleProgressStats(props: TC return (
setCycleTab(value)}> - + {PROGRESS_STATS.map((stat) => ( - + {t(stat.i18n_title)} - + ))} - +
- + - - + + - - + + - +
diff --git a/apps/web/core/components/license/modal/card/base-paid-plan-card.tsx b/apps/web/core/components/license/modal/card/base-paid-plan-card.tsx index 7630e8c2e9..8f65712221 100644 --- a/apps/web/core/components/license/modal/card/base-paid-plan-card.tsx +++ b/apps/web/core/components/license/modal/card/base-paid-plan-card.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import { observer } from "mobx-react"; import { CheckCircle } from "lucide-react"; // plane imports -import { Tabs } from "@plane/propel/tabs"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@plane/propel/tabs"; // helpers import type { EProductSubscriptionEnum, TBillingFrequency, TSubscriptionPrice } from "@plane/types"; import { cn, getBaseSubscriptionName, getSubscriptionName } from "@plane/utils"; @@ -38,17 +38,17 @@ export const BasePaidPlanCard = observer(function BasePaidPlanCard(props: TBaseP
setSelectedPlan(value as TBillingFrequency)}>
- + {prices.map((price: TSubscriptionPrice) => ( - + {renderPriceContent(price)} - + ))} - +
{prices.map((price: TSubscriptionPrice) => ( - +
Plane {planeName}
{renderActionButton(price)} @@ -72,7 +72,7 @@ export const BasePaidPlanCard = observer(function BasePaidPlanCard(props: TBaseP {extraFeatures &&
{extraFeatures}
}
-
+ ))}
diff --git a/apps/web/core/components/modules/analytics-sidebar/progress-stats.tsx b/apps/web/core/components/modules/analytics-sidebar/progress-stats.tsx index 0b58a3d81b..663a1defc1 100644 --- a/apps/web/core/components/modules/analytics-sidebar/progress-stats.tsx +++ b/apps/web/core/components/modules/analytics-sidebar/progress-stats.tsx @@ -1,6 +1,6 @@ import { observer } from "mobx-react"; import { useTranslation } from "@plane/i18n"; -import { Tabs } from "@plane/propel/tabs"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@plane/propel/tabs"; import type { TWorkItemFilterCondition } from "@plane/shared-state"; import type { TModuleDistribution, TModuleEstimateDistribution, TModulePlotType } from "@plane/types"; import { toFilterArray } from "@plane/utils"; @@ -106,30 +106,30 @@ export const ModuleProgressStats = observer(function ModuleProgressStats(props: return (
setModuleTab(value)}> - + {PROGRESS_STATS.map((stat) => ( - + {t(stat.i18n_title)} - + ))} - - + + - - + + - - + + - +
); diff --git a/apps/web/core/components/pages/navigation-pane/root.tsx b/apps/web/core/components/pages/navigation-pane/root.tsx index f323effd47..dd7e30ba5e 100644 --- a/apps/web/core/components/pages/navigation-pane/root.tsx +++ b/apps/web/core/components/pages/navigation-pane/root.tsx @@ -1,7 +1,7 @@ -import React, { useCallback } from "react"; +import { ArrowRightCircle } from "lucide-react"; import { observer } from "mobx-react"; import { useRouter, useSearchParams } from "next/navigation"; -import { ArrowRightCircle } from "lucide-react"; +import { useCallback } from "react"; // plane imports import { useTranslation } from "@plane/i18n"; import { Tabs } from "@plane/propel/tabs"; diff --git a/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx b/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx index 3db2ad95dd..c02d5f68e9 100644 --- a/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx +++ b/apps/web/core/components/pages/navigation-pane/tab-panels/root.tsx @@ -1,6 +1,6 @@ import React from "react"; // plane imports -import { Tabs } from "@plane/propel/tabs"; +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@plane/propel/tabs"; // components import type { TPageRootHandlers } from "@/components/pages/editor/page-root"; // plane web imports @@ -24,7 +24,7 @@ export function PageNavigationPaneTabPanelsRoot(props: Props) { return ( <> {ORDERED_PAGE_NAVIGATION_TABS_LIST.map((tab) => ( - } {tab.key === "assets" && } - + ))} ); diff --git a/apps/web/core/components/pages/navigation-pane/tabs-list.tsx b/apps/web/core/components/pages/navigation-pane/tabs-list.tsx index 00351dac1d..761e9c1b0a 100644 --- a/apps/web/core/components/pages/navigation-pane/tabs-list.tsx +++ b/apps/web/core/components/pages/navigation-pane/tabs-list.tsx @@ -1,6 +1,6 @@ // plane imports import { useTranslation } from "@plane/i18n"; -import { Tabs } from "@plane/propel/tabs"; +import { TabsList, TabsTrigger } from "@plane/propel/tabs"; // plane web components import { ORDERED_PAGE_NAVIGATION_TABS_LIST } from "@/plane-web/components/pages/navigation-pane"; @@ -9,12 +9,12 @@ export function PageNavigationPaneTabsList() { const { t } = useTranslation(); return ( - + {ORDERED_PAGE_NAVIGATION_TABS_LIST.map((tab) => ( - + {t(tab.i18n_label)} - + ))} - + ); }