Skip to content

Commit ea98087

Browse files
committed
Portal: UI tweaks/fixes (#7978)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on refining the UI components and code structure in the `apps/portal` directory, improving styles, and enhancing the functionality of various elements such as tabs, lists, and layouts. ### Detailed summary - Adjusted class names for styling consistency. - Reduced icon sizes in several components. - Removed unnecessary background styles from `InlineParameterItem`. - Simplified `UnorderedList` and `OrderedList` components. - Enhanced `FeatureCard` layout and styles. - Updated tab triggers by removing redundant margin classes. - Streamlined payment-related documentation and examples. - Improved overall readability and structure in multiple markdown files. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - Style - Simplified tab headers by removing platform icons across multiple pages. - Updated layout and spacing: Insight grid tweaks, refined DocLayout text color, toned-down lists and parameter blocks, redesigned FeatureCard, and streamlined Table of Contents styling. - Documentation - Replaced several tabbed sections with single-flow content; some pages now link directly to live demos. - Updated examples: Send now illustrates a multi-step execution flow; corrected/cleaned samples for Sell and other payments pages. - Transactions and Contracts pages use direct endpoint rendering in places for clarity. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 030349b commit ea98087

File tree

24 files changed

+315
-417
lines changed

24 files changed

+315
-417
lines changed

apps/portal/src/app/contracts/events/page.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ Query and listen to contract events for any deployed contract on any EVM chain.
1818
<Tabs defaultValue="http">
1919
<TabsList>
2020
<TabsTrigger value="http" className="flex items-center gap-2 [&>p]:mb-0">
21-
<EngineIcon className="w-4 h-4 mr-2" />
21+
<EngineIcon className="w-4 h-4" />
2222
HTTP
2323
</TabsTrigger>
2424
<TabsTrigger value="typescript" className="flex items-center gap-2 [&>p]:mb-0">
25-
<TypeScriptIcon className="w-4 h-4 mr-2" />
25+
<TypeScriptIcon className="w-4 h-4" />
2626
TypeScript
2727
</TabsTrigger>
2828
<TabsTrigger value="react" className="flex items-center gap-2 [&>p]:mb-0">
29-
<ReactIcon className="w-4 h-4 mr-2" />
29+
<ReactIcon className="w-4 h-4" />
3030
React
3131
</TabsTrigger>
3232
</TabsList>
@@ -88,11 +88,11 @@ Read more on how to [generate extension functions using the CLI](/contracts/gene
8888
```jsx
8989
import { useContractEvents } from "thirdweb/react";
9090
import { prepareEvent } from "thirdweb";
91-
91+
9292
const myEvent = prepareEvent({
9393
signature: "event Transfer(address indexed from, address indexed to, uint256 value)",
9494
});
95-
95+
9696
function YourComponent() {
9797
const { data: contractEvents } = useContractEvents({
9898
contract,
@@ -118,7 +118,7 @@ Read more on how to [generate extension functions using the CLI](/contracts/gene
118118
```jsx
119119
import { useContractEvents } from "thirdweb/react";
120120
import { transferEvent } from "thirdweb/extensions/erc20";
121-
121+
122122
function YourComponent() {
123123
const { data: contractEvents } = useContractEvents({
124124
contract,

apps/portal/src/app/contracts/page.mdx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,24 @@ Read, write, and deploy smart contracts on any EVM compatible blockchain.
3838
<Tabs defaultValue="http">
3939
<TabsList>
4040
<TabsTrigger value="http" className="flex items-center gap-2 [&>p]:mb-0">
41-
<EngineIcon className="w-4 h-4 mr-2" />
4241
HTTP
4342
</TabsTrigger>
4443
<TabsTrigger value="typescript" className="flex items-center gap-2 [&>p]:mb-0">
45-
<TypeScriptIcon className="w-4 h-4 mr-2" />
4644
TypeScript
4745
</TabsTrigger>
4846
<TabsTrigger value="react" className="flex items-center gap-2 [&>p]:mb-0">
49-
<ReactIcon className="w-4 h-4 mr-2" />
5047
React
5148
</TabsTrigger>
5249
<TabsTrigger value="reactnative" className="flex items-center gap-2 [&>p]:mb-0">
53-
<ReactIcon className="w-4 h-4 mr-2" />
5450
React Native
5551
</TabsTrigger>
5652
<TabsTrigger value="unity" className="flex items-center gap-2 [&>p]:mb-0">
57-
<UnityIcon className="w-4 h-4 mr-2" />
5853
Unity
5954
</TabsTrigger>
6055
<TabsTrigger value="dotnet" className="flex items-center gap-2 [&>p]:mb-0">
61-
<DotNetIcon className="w-4 h-4 mr-2" />
6256
.NET
6357
</TabsTrigger>
6458
<TabsTrigger value="unreal" className="flex items-center gap-2 [&>p]:mb-0">
65-
<UnrealEngineIcon className="w-4 h-4 mr-2" />
6659
Unreal Engine
6760
</TabsTrigger>
6861
</TabsList>

apps/portal/src/app/contracts/transactions/page.mdx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,4 @@ import {
1313

1414
Query all transactions for any deployed contract on any EVM chain.
1515

16-
<Tabs defaultValue="http">
17-
<TabsList>
18-
<TabsTrigger value="http" className="flex items-center gap-2 [&>p]:mb-0">
19-
<EngineIcon className="w-4 h-4 mr-2" />
20-
HTTP
21-
</TabsTrigger>
22-
</TabsList>
23-
24-
<TabsContent value="http">
25-
<OpenApiEndpoint path="/v1/contracts/{chainId}/{address}/transactions" method="GET" />
26-
27-
</TabsContent>
28-
</Tabs>
16+
<OpenApiEndpoint path="/v1/contracts/{chainId}/{address}/transactions" method="GET" />

apps/portal/src/app/insight/page.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ export const metadata = createMetadata({
1515

1616
# Insight
1717

18-
Insight is a tool that lets you retrieve blockchain data from any EVM chain, enrich it with metadata, and transform it using custom logic.
18+
Insight is a tool that lets you retrieve blockchain data from any EVM chain, enrich it with metadata, and transform it using custom logic.
1919

2020
<OpenSourceCard title="Insight" href="https://github.com/thirdweb-dev/insight" />
2121

2222
## Features
2323

2424
<div
25-
className="my-4 grid gap-2 md:grid-cols-2 lg:grid-cols-3"
25+
className="my-4 grid gap-4 lg:grid-cols-2"
2626
>
2727
<FeatureCard
2828
title="Easy-to-Use API"
2929
description="Easily understandable data API to query blockchain data."
30-
iconUrl={<BracesIcon />}
30+
iconUrl={<BracesIcon />}
3131
/>
3232

3333
<FeatureCard
@@ -58,7 +58,7 @@ Insight is a tool that lets you retrieve blockchain data from any EVM chain, enr
5858

5959
## Video Tutorials
6060

61-
<Grid>
61+
<div className="grid gap-4 lg:grid-cols-2">
6262

6363
<ArticleCard
6464
title="Insight Introduction"
@@ -72,7 +72,7 @@ Insight is a tool that lets you retrieve blockchain data from any EVM chain, enr
7272
href="https://m.youtube.com/watch?v=HvqewXLVRig"
7373
/>
7474

75-
</Grid>
75+
</div>
7676

7777
## Supported Chains
7878
Insight is supported on select EVM compatible chains. To view the full list, visit [thirdweb chainlist](https://thirdweb.com/chainlist?service=insight).

apps/portal/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function ArticleCardIndex(props: {
237237
<div className="rounded-lg border bg-card p-4 hover:border-active-border relative">
238238
<div className="flex mb-3">
239239
<div className="p-2 rounded-full border bg-background">
240-
<props.icon className="size-5 text-muted-foreground" />
240+
<props.icon className="size-4 text-muted-foreground" />
241241
</div>
242242
</div>
243243
<h3 className="mb-0.5 font-medium text-lg tracking-tight">

apps/portal/src/app/payments/custom-data/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ Associate user IDs, custom payment IDs, order details, and more with any payment
3535
<Tabs defaultValue="typescript">
3636
<TabsList>
3737
<TabsTrigger value="typescript" className="flex items-center gap-2 [&>p]:mb-0">
38-
<TypeScriptIcon className="w-4 h-4 mr-2" />
38+
<TypeScriptIcon className="w-4 h-4" />
3939
TypeScript
4040
</TabsTrigger>
4141
<TabsTrigger value="react" className="flex items-center gap-2 [&>p]:mb-0">
42-
<ReactIcon className="w-4 h-4 mr-2" />
42+
<ReactIcon className="w-4 h-4" />
4343
React
4444
</TabsTrigger>
4545
</TabsList>

apps/portal/src/app/payments/fund/page.mdx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@ export const metadata = createMetadata({
2525

2626
Fund wallets with crypto using the `BuyWidget`.
2727

28-
<Tabs defaultValue="react">
29-
<TabsList>
30-
<TabsTrigger value="react" className="flex items-center gap-2 [&>p]:mb-0">
31-
<ReactIcon className="w-4 h-4 mr-2" />
32-
React
33-
</TabsTrigger>
34-
</TabsList>
35-
36-
<TabsContent value="react">
3728

3829
### Fund a wallet with the `BuyWidget`
3930

@@ -70,10 +61,9 @@ function ProductPage() {
7061
```
7162

7263
The BuyWidget handles the complete payment flow, supporting both crypto and fiat payments across 50+ chains.
73-
</TabsContent>
74-
</Tabs>
7564

76-
## View it in action:
65+
66+
## View it in action:
7767

7868
<ArticleIconCard
7969
title="Fund Wallet Live Demo"

apps/portal/src/app/payments/products/page.mdx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@ export const metadata = createMetadata({
2424

2525
Accept crypto and fiat payments for any product using the `CheckoutWidget`.
2626

27-
<Tabs defaultValue="react">
28-
<TabsList>
29-
<TabsTrigger value="react" className="flex items-center gap-2 [&>p]:mb-0">
30-
<ReactIcon className="w-4 h-4 mr-2" />
31-
React
32-
</TabsTrigger>
33-
</TabsList>
34-
35-
<TabsContent value="react">
36-
3727
### Sell a Product with the `CheckoutWidget`
3828

3929
```tsx
@@ -75,10 +65,8 @@ function ProductPage() {
7565
```
7666

7767
The CheckoutWidget handles the complete payment flow, supporting both crypto and fiat payments across 50+ chains.
78-
</TabsContent>
79-
</Tabs>
8068

81-
## View it in action:
69+
## View it in action:
8270

8371
<ArticleIconCard
8472
title="Sell a Product Live Demo"

apps/portal/src/app/payments/sell/page.mdx

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -32,37 +32,28 @@ export const metadata = createMetadata({
3232

3333
You can create a payment with either the input amount (sell) or output amount (buy) of a token. Most examples focus on buying a specific amount, but you can just as easily sell a specific amount of tokens.
3434

35-
<Tabs defaultValue="typescript">
36-
<TabsList>
37-
<TabsTrigger value="typescript" className="flex items-center gap-2 [&>p]:mb-0">
38-
<TypeScriptIcon className="w-4 h-4 mr-2" />
39-
TypeScript
40-
</TabsTrigger>
41-
</TabsList>
4235

43-
<TabsContent value="typescript">
44-
### Generate a sell payment
36+
### Generate a sell payment
4537

46-
To generate a sale, use the same inputs as `Buy.prepare`, but with the `Sell.prepare` function. The following function will sell 50 USDT on Arbitrum. The returned `destinationAmount` will indicate how much USDC on Optimism you'll receive after fees.
38+
To generate a sale, use the same inputs as `Buy.prepare`, but with the `Sell.prepare` function. The following function will sell 50 USDT on Arbitrum. The returned `destinationAmount` will indicate how much USDC on Optimism you'll receive after fees.
4739

48-
```typescript
49-
import { Bridge } from "thirdweb";
40+
```typescript
41+
import { Bridge } from "thirdweb";
5042

51-
const preparedQuote = await Bridge.Sell.prepare({
52-
originChainId: 42161,
53-
originTokenAddress: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", // USDT on Arbitrum
54-
destinationChainId: 10,
55-
destinationTokenAddress: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", // USDC on Optimism
56-
amount: 50_000_000n, // 50 USDT in wei (USDT has 6 decimals)
57-
sender: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709",
58-
receiver: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
59-
client,
43+
const preparedQuote = await Bridge.Sell.prepare({
44+
originChainId: 42161,
45+
originTokenAddress: "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", // USDT on Arbitrum
46+
destinationChainId: 10,
47+
destinationTokenAddress: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", // USDC on Optimism
48+
amount: 50_000_000n, // 50 USDT in wei (USDT has 6 decimals)
49+
sender: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709",
50+
receiver: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
51+
client,
6052
});
61-
```
53+
```
54+
55+
You can execute this quote exactly like a buy. See the [Send a Payment](/payments/send) guide for more details on this process.
6256

63-
You can execute this quote exactly like a buy. See the [Send a Payment](/payments/send) guide for more details on this process.
64-
</TabsContent>
65-
</Tabs>
6657

6758
## Going further
6859

0 commit comments

Comments
 (0)