Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Aug 6, 2025

[SDK] Feature: Add `buttonLabel` prop to widgets for CTA customization

BLD-74

## Notes for the reviewer

This PR introduces an optional `buttonLabel` string prop to `CheckoutWidget`, `TransactionWidget`, and `BuyWidget`. This prop allows overriding the default text of the main action button within the `FundWallet`, `TransactionPayment`, and `DirectPayment` components.

The `buttonLabel` is passed through the internal `UIOptions` metadata object. The implementation is fully backward compatible; existing widget usages will retain their default button labels.

## How to test

1.  Run Storybook: `pnpm storybook`
2.  Navigate to the following stories under "Bridge":
    *   `DirectPayment` -> `CustomButtonLabel` (and `CustomButtonLabelLight`)
    *   `FundWallet` -> `CustomButtonLabel` (and `CustomButtonLabelLight`)
    *   `TransactionPayment` -> `CustomButtonLabel` (and `CustomButtonLabelLight`)
3.  Verify that the main action button displays the custom label defined in the story (e.g., "Purchase Now", "Add Funds Now", "Execute Now").
4.  Check other stories for these widgets to ensure the default button labels are still displayed correctly when `buttonLabel` is not provided.

Slack Thread

Open in Cursor

PR-Codex overview

This PR introduces the ability to customize button labels across various payment widgets in the thirdweb package, enhancing user interface flexibility.

Detailed summary

  • Added buttonLabel prop to various components for custom button text.
  • Updated BridgeOrchestrator, TransactionPayment, DirectPayment, FundWallet, TransactionWidget, CheckoutWidget, and BuyWidget to utilize buttonLabel.
  • Introduced custom button label options in UI options for FundWallet, DirectPayment, and Transaction modes.
  • Enhanced LeftSection and RightSection to support custom button label input.
  • Added stories showcasing custom button labels in DirectPayment, FundWallet, and TransactionPayment.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features

    • Added support for custom button labels across Bridge UI components, allowing you to personalize main action button text in various flows.
    • Storybook examples now demonstrate how to use custom button labels for FundWallet, DirectPayment, and TransactionPayment components in both light and dark themes.
    • Added a new input in the playground UI to customize button labels for payment components.
  • Documentation

    • Updated Storybook documentation to showcase the new custom button label feature with descriptive examples.

@joaquim-verges joaquim-verges requested review from a team as code owners August 6, 2025 21:23
@changeset-bot
Copy link

changeset-bot bot commented Aug 6, 2025

🦋 Changeset detected

Latest commit: 001326c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
thirdweb Patch
@thirdweb-dev/nebula Patch
@thirdweb-dev/wagmi-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Aug 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2025 1:32am
nebula ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2025 1:32am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2025 1:32am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2025 1:32am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2025 1:32am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 6, 2025

Walkthrough

The changes introduce an optional buttonLabel property to the UI options and widget props of several bridge-related components, enabling customization of call-to-action button labels. The new prop is propagated through the data flow, conditionally rendered in UI elements, and demonstrated with new Storybook stories and fixture variants for testing and documentation.

Changes

Cohort / File(s) Change Summary
UI Option Types & Prop Extensions
packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx, packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx, packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx, packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx
Added optional buttonLabel property to UI options types and widget prop interfaces, enabling custom button text.
Conditional Button Label Rendering
packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx, packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx, packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
Updated UI components to render button label from uiOptions.buttonLabel if provided, otherwise fallback to default.
Storybook Demonstrations
packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx, packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx, packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
Added new stories for dark and light themes demonstrating the custom button label feature in each widget.
Fixture Enhancements
packages/thirdweb/src/stories/Bridge/fixtures.ts
Added customButton variants to UI options for FundWallet, DirectPayment, and Transaction with custom button labels.
Playground UI & Code Generation
apps/playground-web/src/app/payments/components/types.ts, apps/playground-web/src/app/payments/components/CodeGen.tsx, apps/playground-web/src/app/payments/embed/LeftSection.tsx, apps/playground-web/src/app/payments/embed/RightSection.tsx, apps/playground-web/src/app/payments/embed/page.tsx
Added buttonLabel support to playground options, UI inputs, widget props, and code generation for custom button text.

Sequence Diagram(s)

sequenceDiagram
    participant Consumer as Consumer (e.g., Storybook or App)
    participant Widget as Widget Component (e.g., FundWallet)
    participant UI as UI Element (Button)

    Consumer->>Widget: Passes buttonLabel prop (optional)
    Widget->>Widget: Includes buttonLabel in uiOptions
    Widget->>UI: Renders button with uiOptions.buttonLabel (if provided)
    UI-->>Consumer: Displays custom or default button label
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Add buttonLabel prop to customize CTA in widgets (BLD-74)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes were found.

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cursor/add-buttonlabel-prop-to-checkout-widgets-83cd

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 6, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Aug 6, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
packages/thirdweb/src/stories/Bridge/fixtures.ts (3)

686-688: Consider alphabetically ordering the union keys for easier scanning

"customButton" is appended at the end of the union string, breaking the previously-alphabetised order (ethDefault, ethWithAmount, uniLarge, usdcDefault).
Keeping these literals alphabetised makes large fixture objects easier to diff and maintain over time.


734-736: Apply the same key ordering nit to Direct Payment variants

For consistency with neighbouring code, consider alphabetising the literal list so "customButton" sits between "credits" and "digitalArt".


825-827: Maintain alphabetical ordering of Transaction variant keys

Same style nit: move "customButton" to keep the literal list ordered (contractInteraction, customButton, erc20Transfer, ethTransfer).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8bb2b0a and a7223f9.

📒 Files selected for processing (11)
  • packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx (3 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx (2 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx (1 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx (2 hunks)
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx (1 hunks)
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx (1 hunks)
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx (1 hunks)
  • packages/thirdweb/src/stories/Bridge/fixtures.ts (4 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

Files:

  • packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
**/*.stories.tsx

📄 CodeRabbit Inference Engine (CLAUDE.md)

For new UI components, add Storybook stories (*.stories.tsx) alongside the code

Files:

  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
🧠 Learnings (21)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.stories.tsx : For new UI components, add Storybook stories (`*.stories.tsx`) alongside the code
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Reuse core UI primitives; avoid re-implementing buttons, cards, modals.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Always import from the central UI library under `@/components/ui/*` – e.g. `import { Button } from "@/components/ui/button"`.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Learnt from: arcoraven
PR: thirdweb-dev/js#7505
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx:186-204
Timestamp: 2025-07-10T10:18:33.238Z
Learning: The ThirdwebBarChart component in apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx does not accept standard accessibility props like `aria-label` and `role` in its TypeScript interface, causing compilation errors when added.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/components/*.{stories,test}.{tsx,ts} : Provide a Storybook story (`MyComponent.stories.tsx`) or unit test alongside the component.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx} : Expose `className` prop on root element of components for overrides
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Use `NavLink` (`@/components/ui/NavLink`) for internal navigation so active states are handled automatically.
📚 Learning: applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : import ui primitives from `@/components/u...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
📚 Learning: the modulecarduiprops interface already includes a client prop of type thirdwebclient, so when compo...
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.332Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
📚 Learning: the thirdwebbarchart component in apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(side...
Learnt from: arcoraven
PR: thirdweb-dev/js#7505
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx:186-204
Timestamp: 2025-07-10T10:18:33.238Z
Learning: The ThirdwebBarChart component in apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx does not accept standard accessibility props like `aria-label` and `role` in its TypeScript interface, causing compilation errors when added.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
📚 Learning: applies to dashboard/**/*.{tsx,jsx} : always import from the central ui library under `@/components/...
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Always import from the central UI library under `@/components/ui/*` – e.g. `import { Button } from "@/components/ui/button"`.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
📚 Learning: applies to dashboard/**/*client.tsx : interactive ui that relies on hooks (`usestate`, `useeffect`, ...
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (`useState`, `useEffect`, React Query, wallet hooks).

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
📚 Learning: in the onramp webhook schema (`packages/thirdweb/src/bridge/webhook.ts`), the `currencyamount` field...
Learnt from: gregfromstl
PR: thirdweb-dev/js#7450
File: packages/thirdweb/src/bridge/Webhook.ts:57-81
Timestamp: 2025-06-26T19:46:04.024Z
Learning: In the onramp webhook schema (`packages/thirdweb/src/bridge/Webhook.ts`), the `currencyAmount` field is intentionally typed as `z.number()` while other amount fields use `z.string()` because `currencyAmount` represents fiat currency amounts in decimals (like $10.50), whereas other amount fields represent token amounts in wei (very large integers that benefit from bigint representation). The different naming convention (`currencyAmount` vs `amount`) reflects this intentional distinction.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
📚 Learning: applies to packages/thirdweb/src/wallets/** : unified `wallet` and `account` interfaces in wallet ar...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
📚 Learning: applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : use design system tokens (e.g., `bg-card`...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
📚 Learning: the `transfer` function from `thirdweb/extensions/erc20` accepts human-readable amounts via the `amo...
Learnt from: MananTank
PR: thirdweb-dev/js#7298
File: apps/dashboard/src/app/nebula-app/move-funds/move-funds.tsx:255-277
Timestamp: 2025-06-06T23:47:55.122Z
Learning: The `transfer` function from `thirdweb/extensions/erc20` accepts human-readable amounts via the `amount` property and automatically handles conversion to base units (wei) by fetching the token decimals internally. Manual conversion using `toWei()` is not required when using the `amount` property.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
📚 Learning: applies to dashboard/**/*.{tsx,jsx} : stick to design-tokens: background (`bg-card`), borders (`bord...
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (`bg-card`), borders (`border-border`), muted text (`text-muted-foreground`) etc.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
📚 Learning: applies to dashboard/**/*.{tsx,jsx} : reuse core ui primitives; avoid re-implementing buttons, cards...
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Reuse core UI primitives; avoid re-implementing buttons, cards, modals.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
📚 Learning: applies to packages/thirdweb/src/wallets/** : support for in-app wallets (social/email login)...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Support for in-app wallets (social/email login)

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
📚 Learning: applies to dashboard/**/*.{tsx,jsx} : prefer composable primitives over custom markup: `button`, `in...
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
📚 Learning: applies to **/*.stories.tsx : for new ui components, add storybook stories (`*.stories.tsx`) alongsi...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.stories.tsx : For new UI components, add Storybook stories (`*.stories.tsx`) alongside the code

Applied to files:

  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
📚 Learning: applies to dashboard/**/components/*.{stories,test}.{tsx,ts} : provide a storybook story (`mycompone...
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/components/*.{stories,test}.{tsx,ts} : Provide a Storybook story (`MyComponent.stories.tsx`) or unit test alongside the component.

Applied to files:

  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
📚 Learning: surface breaking changes prominently in pr descriptions...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions

Applied to files:

  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
📚 Learning: applies to dashboard/**/*.{tsx,jsx} : for notices & skeletons rely on `announcementbanner`, `generic...
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on `AnnouncementBanner`, `GenericLoadingPage`, `EmptyStateCard`.

Applied to files:

  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
📚 Learning: applies to dashboard/**/*.{tsx,jsx} : use `navlink` (`@/components/ui/navlink`) for internal navigat...
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Use `NavLink` (`@/components/ui/NavLink`) for internal navigation so active states are handled automatically.

Applied to files:

  • packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx
📚 Learning: applies to packages/thirdweb/src/wallets/** : eip-1193, eip-5792, eip-7702 standard support in walle...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Applied to files:

  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
📚 Learning: applies to test/src/test-wallets.ts : predefined test accounts are in `test/src/test-wallets.ts`...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.ts`

Applied to files:

  • packages/thirdweb/src/stories/Bridge/fixtures.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (17)
packages/thirdweb/src/react/web/ui/Bridge/BridgeOrchestrator.tsx (1)

45-45: LGTM! Clean foundational type addition.

The optional buttonLabel property is well-placed within the UIOptions type and follows consistent typing patterns. This serves as the foundation for button label customization across all Bridge components.

packages/thirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx (2)

190-194: Well-documented prop addition.

The buttonLabel prop is properly typed and documented with clear JSDoc comments, following the established pattern of other props in the interface.


318-318: Correct prop propagation.

The buttonLabel is properly passed through to the UI options, ensuring it reaches the underlying Bridge components that will render the customized button labels.

packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (2)

339-339: Perfect fallback implementation.

The conditional rendering correctly uses uiOptions.buttonLabel when provided, otherwise falls back to the dynamic label Buy ${amount} ${uiOptions.destinationToken.symbol}. This maintains full backward compatibility while enabling customization.


345-345: Consistent ConnectButton handling.

The ConnectButton label implementation matches the main button's approach, ensuring consistent behavior across both connected and disconnected states.

packages/thirdweb/src/react/web/ui/Bridge/TransactionWidget.tsx (2)

193-197: Consistent prop documentation.

The buttonLabel prop follows the same documentation pattern as other widget components, maintaining consistency across the Bridge UI.


357-357: Proper data flow integration.

The buttonLabel is correctly included in the UI options data structure, ensuring it's available to downstream components for rendering customized button labels.

packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx (2)

184-188: Complete widget interface consistency.

The buttonLabel prop maintains the same documentation and typing pattern across all Bridge widget components, ensuring a unified API experience.


343-343: Comprehensive flow coverage.

The buttonLabel is properly included in both the native token purchase flow and the specified token purchase flow, ensuring the customization feature works regardless of the token type being purchased.

Also applies to: 374-374

packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx (1)

115-115: LGTM! Clean implementation of custom button label.

The conditional logic properly falls back to the default label when buttonLabel is not provided, maintaining full backward compatibility.

packages/thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx (1)

67-86: LGTM! Conditional rendering handles both custom and default button labels correctly.

The implementation properly preserves the original UI with price display when no custom label is provided, while showing clean custom text when buttonLabel is specified.

packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx (1)

227-255: LGTM! Well-structured Storybook stories for the custom button label feature.

The stories follow the established pattern, provide clear documentation, and properly demonstrate both light and dark theme variants of the custom button functionality.

packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx (1)

172-200: LGTM! Consistent Storybook implementation for transaction custom button labels.

The stories properly demonstrate the custom button label feature with clear documentation and consistent theming patterns.

packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx (1)

198-226: LGTM! Comprehensive Storybook coverage for FundWallet custom button labels.

The stories maintain consistency with the other bridge component stories and provide clear documentation of the custom button functionality.

packages/thirdweb/src/stories/Bridge/fixtures.ts (3)

721-730: buttonLabel wired into the Fund Wallet fixture looks correct

The new customButton variant cleanly demonstrates the feature: the label is placed at the root (not inside metadata), mode is set appropriately, and other required fields are present.


807-821: Direct Payment customButton variant looks good

All mandatory properties (paymentInfo, mode, metadata) are present and the buttonLabel is correctly placed. No issues spotted.


853-861: Transaction customButton variant is valid

The variant correctly forwards the pre-prepared ethTransferTransaction and includes the new buttonLabel prop. ✅

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.16 KB (0%) 1.3 s (0%) 589 ms (+64.11% 🔺) 1.9 s
thirdweb (cjs) 352.95 KB (0%) 7.1 s (0%) 2.6 s (+2.6% 🔺) 9.6 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 213 ms (+1136.55% 🔺) 327 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 58 ms (+700.38% 🔺) 68 ms
thirdweb/react (minimal + tree-shaking) 19.26 KB (0%) 386 ms (0%) 148 ms (+182.26% 🔺) 533 ms

@codecov
Copy link

codecov bot commented Aug 6, 2025

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.34%. Comparing base (8bb2b0a) to head (001326c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...es/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx 0.00% 5 Missing ⚠️
...thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx 0.00% 4 Missing ⚠️
...ges/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx 0.00% 3 Missing ⚠️
...hirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx 0.00% 1 Missing ⚠️
...web/src/react/web/ui/Bridge/TransactionPayment.tsx 0.00% 1 Missing ⚠️
...dweb/src/react/web/ui/Bridge/TransactionWidget.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7805      +/-   ##
==========================================
- Coverage   56.35%   56.34%   -0.01%     
==========================================
  Files         905      905              
  Lines       58796    58806      +10     
  Branches     4143     4144       +1     
==========================================
  Hits        33135    33135              
- Misses      25556    25567      +11     
+ Partials      105      104       -1     
Flag Coverage Δ
packages 56.34% <0.00%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
...web/src/react/web/ui/Bridge/BridgeOrchestrator.tsx 7.08% <ø> (ø)
...hirdweb/src/react/web/ui/Bridge/CheckoutWidget.tsx 11.47% <0.00%> (-0.10%) ⬇️
...web/src/react/web/ui/Bridge/TransactionPayment.tsx 6.60% <0.00%> (ø)
...dweb/src/react/web/ui/Bridge/TransactionWidget.tsx 13.07% <0.00%> (-0.09%) ⬇️
...ges/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx 9.09% <0.00%> (-0.19%) ⬇️
...thirdweb/src/react/web/ui/Bridge/DirectPayment.tsx 9.09% <0.00%> (-0.19%) ⬇️
...es/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx 6.95% <0.00%> (-0.06%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vercel vercel bot temporarily deployed to Preview – wallet-ui August 7, 2025 00:57 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 August 7, 2025 00:57 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www August 7, 2025 00:57 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula August 7, 2025 00:57 Inactive
@github-actions github-actions bot added the Playground Changes involving the Playground codebase. label Aug 7, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.changeset/upset-pears-unite.md (1)

5-6: Clarify the changeset summary

Including the actual prop name improves traceability in release notes and searchability.

-Add ability to override button label for all payment widgets
+Add optional `buttonLabel` prop to payment widgets to override the CTA text
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a61b402 and 001326c.

📒 Files selected for processing (7)
  • .changeset/upset-pears-unite.md (1 hunks)
  • apps/playground-web/src/app/payments/embed/RightSection.tsx (3 hunks)
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx (1 hunks)
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx (1 hunks)
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx (1 hunks)
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx (1 hunks)
  • packages/thirdweb/src/stories/Bridge/fixtures.ts (4 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/thirdweb/src/react/web/ui/Bridge/FundWallet.tsx
  • packages/thirdweb/src/stories/Bridge/FundWallet.stories.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
  • apps/playground-web/src/app/payments/embed/RightSection.tsx
  • packages/thirdweb/src/stories/Bridge/DirectPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/TransactionPayment.stories.tsx
  • packages/thirdweb/src/stories/Bridge/fixtures.ts
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: `Button`, `Input`, `Select`, `Tabs`, `Card`, `Sidebar`, `Separator`, `Badge`.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.stories.tsx : For new UI components, add Storybook stories (`*.stories.tsx`) alongside the code
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Reuse core UI primitives; avoid re-implementing buttons, cards, modals.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Always import from the central UI library under `@/components/ui/*` – e.g. `import { Button } from "@/components/ui/button"`.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Learnt from: arcoraven
PR: thirdweb-dev/js#7505
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx:186-204
Timestamp: 2025-07-10T10:18:33.238Z
Learning: The ThirdwebBarChart component in apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx does not accept standard accessibility props like `aria-label` and `role` in its TypeScript interface, causing compilation errors when added.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/components/*.{stories,test}.{tsx,ts} : Provide a Storybook story (`MyComponent.stories.tsx`) or unit test alongside the component.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx} : Expose `className` prop on root element of components for overrides
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Use `NavLink` (`@/components/ui/NavLink`) for internal navigation so active states are handled automatically.
📚 Learning: surface breaking changes prominently in pr descriptions...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions

Applied to files:

  • .changeset/upset-pears-unite.md
📚 Learning: applies to packages/thirdweb/src/wallets/** : support for in-app wallets (social/email login)...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Support for in-app wallets (social/email login)

Applied to files:

  • .changeset/upset-pears-unite.md
📚 Learning: applies to packages/thirdweb/src/wallets/** : eip-1193, eip-5792, eip-7702 standard support in walle...
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Applied to files:

  • .changeset/upset-pears-unite.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Unit Tests
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)

Comment on lines +2 to +3
"thirdweb": patch
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Use a minor bump, not patch, for new public functionality

Per SemVer, adding a new backwards-compatible feature (the buttonLabel prop) warrants a minor version increment. Reserving patch for bug fixes avoids under-signalling changes to downstream consumers.

-"thirdweb": patch
+"thirdweb": minor
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"thirdweb": patch
---
"thirdweb": minor
---
🤖 Prompt for AI Agents
In the .changeset/upset-pears-unite.md file at lines 2 to 3, change the version
bump type from "patch" to "minor" because the addition of the new public
`buttonLabel` prop is a backwards-compatible feature and should be reflected as
a minor version increment according to SemVer guidelines.

@joaquim-verges joaquim-verges merged commit 621c1de into main Aug 7, 2025
19 of 24 checks passed
@joaquim-verges joaquim-verges deleted the cursor/add-buttonlabel-prop-to-checkout-widgets-83cd branch August 7, 2025 01:23
@joaquim-verges joaquim-verges mentioned this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages Playground Changes involving the Playground codebase. SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants