From 82035fd0b760f7269ed75f69dbec86b4f6f62d3d Mon Sep 17 00:00:00 2001 From: MananTank Date: Tue, 3 Jun 2025 22:21:32 +0000 Subject: [PATCH] [TOOL-4670] Dashboard: Update Managed Engine CTA, UI tweaks (#7266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR introduces a new `bottomLineClassName` prop to the `TabLinks` and `TabPathLinks` components, enhancing customization options for styling. It also simplifies the UI in the `EmptyEngineState` component and updates the layout for better structure and readability. ### Detailed summary - Added `bottomLineClassName` prop to `TabLinks` and `TabPathLinks`. - Updated `TabLinks` to use `bottomLineClassName` for styling. - Simplified `EmptyEngineState` content and button structure. - Refactored layout in `Layout` component for improved organization. - Adjusted `EngineLegacyBannerUI` for better spacing and button layout. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` ## Summary by CodeRabbit - **Refactor** - Updated navigation layout for the engine section with new tabbed navigation and improved header structure. - Adjusted container layouts for more consistent spacing and alignment. - **Style** - Restyled the legacy banner, including button order, alignment, and icon adjustments for a clearer appearance. - Enhanced tab navigation with customizable bottom line styling for better visual integration. - **Bug Fixes** - Unified the messaging and actions for adding a managed engine instance, removing plan-based differences for a more consistent user experience. --- apps/dashboard/src/@/components/ui/tabs.tsx | 9 +- .../engine/dedicated/(general)/layout.tsx | 129 ++++++++++-------- .../overview/engine-instances-table.tsx | 38 ++---- 3 files changed, 86 insertions(+), 90 deletions(-) diff --git a/apps/dashboard/src/@/components/ui/tabs.tsx b/apps/dashboard/src/@/components/ui/tabs.tsx index c2ff5d947a3..2fd9d76629b 100644 --- a/apps/dashboard/src/@/components/ui/tabs.tsx +++ b/apps/dashboard/src/@/components/ui/tabs.tsx @@ -22,6 +22,7 @@ export function TabLinks(props: { tabContainerClassName?: string; shadowColor?: string; scrollableClassName?: string; + bottomLineClassName?: string; }) { const { containerRef, lineRef, activeTabRef } = useUnderline(); @@ -29,7 +30,12 @@ export function TabLinks(props: { return (
{/* Bottom line */} -
+
+
{/* header */} -
-
-
-

- Engine{" "} - - Dedicated - -

-

- Manage your deployed Engine instances -

+
+
+
+
+

+ Engine{" "} + + Dedicated + +

+

+ Manage your deployed Engine instances +

+
+
+ +
-
- -
-
-
-
+
- {/* sidebar layout */} - - {props.children} - +
+
+
+ +
+
+ +
{props.children}
); } @@ -78,32 +84,37 @@ function EngineLegacyBannerUI(props: { }) { return ( - Engine Cloud (Beta) - -
-

+ +

Try Engine Cloud (Beta) - now included for free in every thirdweb project.

-
    +
    • No recurring monthly cost, pay-per-request model
    • Powered by Vault: our new TEE based key management system
    • Improved performance and simplified transaction API
    -
    -
    - - - - - - + + + +
    diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx index 395bdf2fa4e..de58eae9213 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/engine/dedicated/(general)/overview/engine-instances-table.tsx @@ -2,7 +2,6 @@ import type { Team } from "@/api/team"; import { Spinner } from "@/components/ui/Spinner/Spinner"; -import { UnderlineLink } from "@/components/ui/UnderlineLink"; import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import { Badge, type BadgeProps } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; @@ -53,7 +52,6 @@ import { } from "@3rdweb-sdk/react/hooks/useEngine"; import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; -import { PRO_CONTACT_US_URL } from "constants/pro"; import { useTrack } from "hooks/analytics/useTrack"; import { CheckIcon, @@ -895,37 +893,17 @@ function EmptyEngineState(props: { Managed Engine

    - {props.teamPlan !== "pro" ? ( - <> - Upgrade your team plan to Accelerate or Scale to get a - fully managed engine instance.{" "} - - View pricing - - - ) : ( - <> - Contact us to add a managed engine instance to your team - - )} + Contact us to add a managed engine instance to your team.{" "} +
    We recommend using Engine Cloud in most cases

    - {props.teamPlan !== "pro" ? ( - - ) : ( - - )} +
    )}