From a557c0157f2d4dc16675afdf972e66fe8fcbcf20 Mon Sep 17 00:00:00 2001 From: Developing-Gamer Date: Wed, 15 Jul 2026 18:47:48 -0700 Subject: [PATCH] Adopt custom-dropdown free trial editor and fix sidebar footer background Migrate the product free-trial field to DesignEditableGrid custom-dropdown with design components, and add a subtle background to the sticky sidebar footer so it stays readable over scrolling content. Co-authored-by: Cursor --- .../products/[productId]/page-client.tsx | 112 ++++++++---------- .../projects/[projectId]/sidebar-layout.tsx | 2 +- 2 files changed, 51 insertions(+), 63 deletions(-) diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/[productId]/page-client.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/[productId]/page-client.tsx index 71efa7ddb..1d70528ed 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/[productId]/page-client.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/[productId]/page-client.tsx @@ -1,6 +1,12 @@ "use client"; -import { DesignEditableGrid, type DesignEditableGridItem } from "@/components/design-components"; +import { + DesignEditableGrid, + DesignButton, + DesignInput, + DesignSelectorDropdown, + type DesignEditableGridItem, +} from "@/components/design-components"; import { EditableInput } from "@/components/editable-input"; import { Link, StyledLink } from "@/components/link"; import { ItemDialog } from "@/components/payments/item-dialog"; @@ -26,9 +32,6 @@ import { DropdownMenuTrigger, Input, Label, - Popover, - PopoverContent, - PopoverTrigger, Select, SelectContent, SelectItem, @@ -647,69 +650,54 @@ function ProductDetailsSection({ productId, product, config }: ProductDetailsSec ) : 'No', }, { - type: 'custom', + type: 'custom-dropdown', itemKey: 'freeTrial', icon: , name: "Free Trial", tooltip: "Free trial period before billing starts. Customers won't be charged during this period.", - children: ( - - - - - -
-
- setFreeTrialCount(parseInt(e.target.value) || 1)} - /> - -
-
- - {localFreeTrial && ( - - )} -
-
-
-
+ Apply + + {localFreeTrial && ( + + Remove + + )} + + ), }, { diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sidebar-layout.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sidebar-layout.tsx index 9e2cf81ce..909a960d2 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sidebar-layout.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sidebar-layout.tsx @@ -614,7 +614,7 @@ function SidebarContent({