From db291d2d38f24ac31beca4d1e100ba62c62386e7 Mon Sep 17 00:00:00 2001 From: MananTank Date: Fri, 17 Oct 2025 20:23:13 +0000 Subject: [PATCH] [MNY-268] Bridge Status UI updates (#8273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR focuses on enhancing UI components in the dashboard by improving styles for better text handling and introducing a new `LinkWithCopyButton` component for copying links and displaying tooltips. ### Detailed summary - Updated `className` in `CopyTextButton` and `WalletAddress` for better text truncation. - Introduced `LinkWithCopyButton` component for link handling and copying functionality. - Adjusted styles in `BridgeStatus` and `TokenInfo` for improved UI consistency. - Replaced `CopyTextButton` with `LinkWithCopyButton` for token address and transaction hash. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` ## Summary by CodeRabbit * **New Features** * Added a combined copy-and-open-link component with tooltip and temporary visual feedback for quick copying and opening external links. * **Style** * Improved text truncation for wallet names, addresses and copy controls to prevent overflow. * Updated spacing, typography and section layout across the dashboard for clearer hierarchy. * Added external-link arrows for clearer link affordance. --- .../@/components/blocks/wallet-address.tsx | 4 +- .../src/@/components/ui/CopyTextButton.tsx | 2 +- .../@/components/ui/link-with-copy-button.tsx | 45 ++++++++ .../[chain_id]/tx/[txHash]/bridge-status.tsx | 109 ++++++++++-------- 4 files changed, 107 insertions(+), 53 deletions(-) create mode 100644 apps/dashboard/src/@/components/ui/link-with-copy-button.tsx diff --git a/apps/dashboard/src/@/components/blocks/wallet-address.tsx b/apps/dashboard/src/@/components/blocks/wallet-address.tsx index ff9727cad67..c7905aeaf2c 100644 --- a/apps/dashboard/src/@/components/blocks/wallet-address.tsx +++ b/apps/dashboard/src/@/components/blocks/wallet-address.tsx @@ -78,7 +78,7 @@ export function WalletAddress(props: { diff --git a/apps/dashboard/src/@/components/ui/CopyTextButton.tsx b/apps/dashboard/src/@/components/ui/CopyTextButton.tsx index 1ae9f9375b3..0f490b2d18a 100644 --- a/apps/dashboard/src/@/components/ui/CopyTextButton.tsx +++ b/apps/dashboard/src/@/components/ui/CopyTextButton.tsx @@ -41,7 +41,7 @@ export function CopyTextButton(props: { + + + {props.textToShow} + + + + ); +} diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx index ac220c4b6fa..9f05c4b0188 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/tx/[txHash]/bridge-status.tsx @@ -3,7 +3,12 @@ import { useQuery } from "@tanstack/react-query"; import { CodeClient } from "@workspace/ui/components/code/code.client"; import { Img } from "@workspace/ui/components/img"; import { Spinner } from "@workspace/ui/components/spinner"; -import { ArrowRightIcon, CircleCheckIcon, CircleXIcon } from "lucide-react"; +import { + ArrowRightIcon, + ArrowUpRightIcon, + CircleCheckIcon, + CircleXIcon, +} from "lucide-react"; import Link from "next/link"; import { NATIVE_TOKEN_ADDRESS, type ThirdwebClient } from "thirdweb"; import type { Status, Token } from "thirdweb/bridge"; @@ -11,6 +16,7 @@ import { status } from "thirdweb/bridge"; import { toTokens } from "thirdweb/utils"; import { WalletAddress } from "@/components/blocks/wallet-address"; import { CopyTextButton } from "@/components/ui/CopyTextButton"; +import { LinkWithCopyButton } from "@/components/ui/link-with-copy-button"; import { SkeletonContainer } from "@/components/ui/skeleton"; import { cn } from "@/lib/utils"; import { fetchChain } from "@/utils/fetchChain"; @@ -46,9 +52,9 @@ export function BridgeStatus(props: { /> )} -
-
-

Status

+
+
+

Status

-
-

Payment ID

+
+

Payment ID

@@ -90,7 +97,7 @@ export function BridgeStatus(props: { {purchaseDataString && (
-

Purchase Data

+

Purchase Data

@@ -121,8 +130,9 @@ function TokenInfo(props: { {props.label}
+
-
+
( - {data} + {data}{" "} + )} /> @@ -189,41 +200,44 @@ function TokenInfo(props: {
-
+
-
-
-

{props.addressLabel}

+
+
+

{props.addressLabel}

-
-

Token Address

- +

Token Address

+
-
-

Transaction Hash

+
+

Transaction Hash

{props.txHash ? ( - ) : (

N/A

@@ -288,10 +302,8 @@ function FailedBridgeStatusContent(props: { }) { return (
-

- Transactions -

-
+

Transactions

+
{props.transactions.map((tx) => { return ( +
{chainQuery.data?.name} +
} /> ( -

{data}

- )} + render={(data) =>

{data}

} />
-
);