Skip to content

Commit 439fa3d

Browse files
refactor: migrate web Tabs to @makeplane/propel (#9752)
* refactor: migrate web Tabs to @makeplane/propel Replace in-repo @plane/propel/tabs with @makeplane/propel/components/tabs in analytics, the image picker popover, and the page navigation pane. Published Tabs omit className on Tabs and TabsPanel, so fill-height layouts use a flex/grid wrapper instead. Tabs.Trigger, Tabs.Content, and Tabs.Indicator become Tab, TabsList, and TabsPanel. * fix: restore cover picker tab strip to full width Published TabsList is inline-flex, so Images/Upload hugged content instead of spanning the 36rem panel. Stretch the list to the previous full-width segmented bar. * chore: sync apps/space lockfile to @makeplane/propel 0.3.0 preview's lockfile still resolved apps/space to 0.2.0 after the catalog bump, so pnpm install --frozen-lockfile failed in CI. * fix: restore cover picker tab panel mt-3 p-3 spacing Match the previous scroll wrapper inset so thumbnail grid sizing stays aligned with the 36rem picker layout.
1 parent 8803088 commit 439fa3d

5 files changed

Lines changed: 204 additions & 203 deletions

File tree

apps/web/app/(all)/[workspaceSlug]/(projects)/analytics/[tabId]/page.tsx

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useRouter } from "next/navigation";
1111
import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
1212
import { useTranslation } from "@plane/i18n";
1313
import { EmptyStateDetailed } from "@plane/propel/empty-state";
14-
import { Tabs } from "@plane/propel/tabs";
14+
import { Tab, Tabs, TabsList, TabsPanel } from "@makeplane/propel/components/tabs";
1515
// components
1616
import { cn } from "@plane/utils";
1717
import AnalyticsFilterActions from "@/components/analytics/analytics-filter-actions";
@@ -73,45 +73,32 @@ function AnalyticsPage({ params }: Route.ComponentProps) {
7373
<>
7474
{workspaceProjectIds.length > 0 || loader === "init-loader" ? (
7575
<div className="flex h-full overflow-hidden">
76-
<Tabs value={selectedTab} onValueChange={handleTabChange} className="h-full w-full">
76+
<Tabs variant="contained" value={selectedTab} onValueChange={handleTabChange}>
7777
<div className={"flex h-full w-full flex-col"}>
7878
<div
7979
className={cn(
8080
"flex w-full items-center justify-between gap-4 overflow-hidden border-b border-subtle bg-surface-1 px-6 py-2"
8181
)}
8282
>
83-
<Tabs.List className={"flex h-7 w-fit overflow-x-auto"}>
83+
<TabsList>
8484
{ANALYTICS_TABS.map((tab) => (
85-
<Tabs.Trigger
86-
key={tab.key}
87-
value={tab.key}
88-
disabled={tab.isDisabled}
89-
size="md"
90-
className="h-6 px-3"
91-
onClick={() => {
92-
if (!tab.isDisabled) {
93-
handleTabChange(tab.key);
94-
}
95-
}}
96-
>
97-
{tab.label}
98-
</Tabs.Trigger>
85+
<Tab key={tab.key} value={tab.key} disabled={tab.isDisabled} label={tab.label} />
9986
))}
100-
</Tabs.List>
87+
</TabsList>
10188

10289
<div className="flex-shrink-0">
10390
<AnalyticsFilterActions />
10491
</div>
10592
</div>
106-
{ANALYTICS_TABS.map((tab) => (
107-
<Tabs.Content
108-
key={tab.key}
109-
value={tab.key}
110-
className={"h-full overflow-hidden overflow-y-auto px-2"}
111-
>
112-
<tab.content />
113-
</Tabs.Content>
114-
))}
93+
{/* Grid wrapper: Propel's TabsPanel omits className, so the single mounted panel
94+
gets its fill height from a one-row grid instead. */}
95+
<div className="grid min-h-0 w-full flex-1 grid-rows-1 overflow-x-hidden overflow-y-auto px-2">
96+
{ANALYTICS_TABS.map((tab) => (
97+
<TabsPanel key={tab.key} value={tab.key}>
98+
<tab.content />
99+
</TabsPanel>
100+
))}
101+
</div>
115102
</div>
116103
</Tabs>
117104
</div>

0 commit comments

Comments
 (0)