Skip to content

Conversation

@MananTank
Copy link
Member

@MananTank MananTank commented Jan 5, 2026


PR-Codex overview

This PR enhances the Swap Widget by introducing an Iframe integration and a React Component, along with improved documentation. It adds features like customizable token selection and UI themes, promoting easier integration for developers.

Detailed summary

  • Added links for React Component and Iframe in sidebar.tsx.
  • Created IframeCodePreview component in iframe-code-preview.tsx.
  • Updated page.mdx for Iframe integration with features and examples.
  • Enhanced swap-widget documentation with more details on usage and configuration.
  • Updated features to reflect support for 90+ blockchains and improved UI customization options.

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

Summary by CodeRabbit

  • New Features

    • Added tabbed code preview interface for viewing iframe implementations alongside live previews.
    • New navigation links for iframe and React Component integration guides.
  • Documentation

    • Introduced comprehensive iframe integration documentation with examples and event handling guidance.
    • Created React Component integration documentation with usage examples.
    • Enhanced Swap Widget overview with expanded blockchain support (90+) and updated feature descriptions.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
docs-v2 Ready Ready Preview, Comment Jan 5, 2026 9:50pm
4 Skipped Deployments
Project Deployment Review Updated (UTC)
nebula Skipped Skipped Jan 5, 2026 9:50pm
thirdweb_playground Skipped Skipped Jan 5, 2026 9:50pm
thirdweb-www Skipped Skipped Jan 5, 2026 9:50pm
wallet-ui Skipped Skipped Jan 5, 2026 9:50pm

@linear
Copy link

linear bot commented Jan 5, 2026

@vercel vercel bot temporarily deployed to Preview – thirdweb-www January 5, 2026 19:57 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula January 5, 2026 19:57 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground January 5, 2026 19:57 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Jan 5, 2026

⚠️ No Changeset found

Latest commit: f344fb5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel vercel bot temporarily deployed to Preview – wallet-ui January 5, 2026 19:57 Inactive
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Walkthrough

This PR adds comprehensive documentation for the Swap Widget, introducing separate pages for React and iframe implementations, restructuring the main Swap Widget page with updated features and descriptions, and adding sidebar navigation links and a reusable tabbed code preview component.

Changes

Cohort / File(s) Summary
Sidebar Navigation
apps/portal/src/app/bridge/sidebar.tsx
Added nested links under Swap Widget entry with React Component and Iframe options for user navigation to implementation-specific documentation pages.
Iframe Preview Component
apps/portal/src/app/bridge/swap-widget/iframe/iframe-code-preview.tsx
New component providing a tabbed interface (Code/Preview tabs) for displaying HTML iframe snippets alongside live previews.
Documentation Pages
apps/portal/src/app/bridge/swap-widget/page.mdx, apps/portal/src/app/bridge/swap-widget/react/page.mdx, apps/portal/src/app/bridge/swap-widget/iframe/page.mdx
Main Swap Widget page restructured with expanded feature descriptions (50+ to 90+ blockchains), separated into React Component and Iframe entries with new documentation pages for each implementation including examples, API references, and integration guidance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main objective: adding swap widget iframe documentation to the Portal, which matches the primary changes in the PR.
Description check ✅ Passed The description includes PR-Codex overview with detailed summary of changes, but lacks explicit sections for 'Notes for the reviewer' and 'How to test' as specified in the template.
Linked Issues check ✅ Passed The PR implements iframe documentation with code preview component, sidebar links, and MDX pages for both iframe and React component integration, satisfying the objective to add swap widget iframe docs [MNY-351].
Out of Scope Changes check ✅ Passed All changes are directly related to the PR objective: sidebar navigation updates, iframe documentation pages, React component documentation, and a new IframeCodePreview component for displaying code and previews.
✨ Finishing touches
  • 📝 Generate docstrings

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the Portal Involves changes to the Portal (docs) codebase. label Jan 5, 2026
@MananTank MananTank marked this pull request as ready for review January 5, 2026 19:57
@MananTank MananTank requested review from a team as code owners January 5, 2026 19:57
Copy link
Member Author

MananTank commented Jan 5, 2026


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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.19%. Comparing base (9f265bf) to head (f344fb5).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8604   +/-   ##
=======================================
  Coverage   53.19%   53.19%           
=======================================
  Files         922      922           
  Lines       61480    61480           
  Branches     4032     4032           
=======================================
  Hits        32706    32706           
  Misses      28676    28676           
  Partials       98       98           
Flag Coverage Δ
packages 53.19% <ø> (ø)
🚀 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 – thirdweb-www January 5, 2026 20:00 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula January 5, 2026 20:00 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui January 5, 2026 20:00 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground January 5, 2026 20:00 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui January 5, 2026 20:02 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground January 5, 2026 20:02 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www January 5, 2026 20:02 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula January 5, 2026 20:02 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

size-limit report 📦

Path Size
@thirdweb-dev/nexus (esm) 105.66 KB (0%)
@thirdweb-dev/nexus (cjs) 319.47 KB (0%)

@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 5, 2026

Merge activity

<!--

## 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 enhances the `Swap Widget` functionality by adding an `iframe` integration option and a new `React Component`. It updates documentation and examples for better usability and expands features like dark/light mode support and customizable token selections.

### Detailed summary
- Added `links` for `React Component` and `Iframe` in `sidebar.tsx`.
- Introduced `IframeCodePreview` component in `iframe-code-preview.tsx`.
- Updated `page.mdx` for `iframe` integration with features and examples.
- Revised `page.mdx` for `react` with improved descriptions and features.
- Enhanced API reference and examples for token selection configurations.
- Added iframe event listening instructions for swap results.

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

<!-- end pr-codex -->
@vercel vercel bot temporarily deployed to Preview – nebula January 5, 2026 21:40 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground January 5, 2026 21:40 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www January 5, 2026 21:40 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui January 5, 2026 21:40 Inactive
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 (1)
apps/portal/src/app/bridge/swap-widget/iframe/iframe-code-preview.tsx (1)

3-34: Consider consolidating duplicate IframeCodePreview components.

This component is nearly identical to the one at apps/portal/src/app/bridge/bridge-widget/iframe/iframe-code-preview.tsx. The only differences are the iframe title and the className prop. Consider creating a shared, reusable component that accepts title as a prop to eliminate duplication and simplify maintenance.

🔎 Proposed refactor to create a shared component

Create a shared component at apps/portal/src/components/iframe-code-preview.tsx:

import { CodeBlock, Tabs, TabsContent, TabsList, TabsTrigger } from "@doc";

export function IframeCodePreview(props: { 
  src: string; 
  title: string;
  className?: string;
}) {
  return (
    <Tabs defaultValue="code">
      <TabsList>
        <TabsTrigger value="code">Code</TabsTrigger>
        <TabsTrigger value="preview">Preview</TabsTrigger>
      </TabsList>
      <TabsContent value="code">
        <CodeBlock
          code={`\
<iframe
  src="${props.src}"
  height="750px"
  width="100%"
  style="border: 0;"
/>`}
          lang="html"
        />
      </TabsContent>
      <TabsContent value="preview">
        <iframe
          title={props.title}
          src={props.src}
          height="750px"
          width="100%"
          className={props.className}
          style={{ border: 0 }}
        />
      </TabsContent>
    </Tabs>
  );
}

Then use it in both locations:

import { IframeCodePreview } from "@/components/iframe-code-preview";

// In swap-widget
<IframeCodePreview 
  src={url} 
  title="Swap widget iframe" 
  className="rounded-xl" 
/>

// In bridge-widget
<IframeCodePreview 
  src={url} 
  title="Bridge widget iframe" 
/>
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9f265bf and f344fb5.

📒 Files selected for processing (5)
  • apps/portal/src/app/bridge/sidebar.tsx
  • apps/portal/src/app/bridge/swap-widget/iframe/iframe-code-preview.tsx
  • apps/portal/src/app/bridge/swap-widget/iframe/page.mdx
  • apps/portal/src/app/bridge/swap-widget/page.mdx
  • apps/portal/src/app/bridge/swap-widget/react/page.mdx
🧰 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 TypeScript 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 in TypeScript
Avoid any and unknown in TypeScript unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.) in TypeScript

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

Files:

  • apps/portal/src/app/bridge/swap-widget/iframe/iframe-code-preview.tsx
  • apps/portal/src/app/bridge/sidebar.tsx
**/*.{js,jsx,ts,tsx,json}

📄 CodeRabbit inference engine (AGENTS.md)

Biome governs formatting and linting; its rules live in biome.json. Run pnpm fix & pnpm lint before committing, ensure there are no linting errors

Files:

  • apps/portal/src/app/bridge/swap-widget/iframe/iframe-code-preview.tsx
  • apps/portal/src/app/bridge/sidebar.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Lazy-import optional features; avoid top-level side-effects

Files:

  • apps/portal/src/app/bridge/swap-widget/iframe/iframe-code-preview.tsx
  • apps/portal/src/app/bridge/sidebar.tsx
🧬 Code graph analysis (1)
apps/portal/src/app/bridge/swap-widget/iframe/iframe-code-preview.tsx (1)
apps/portal/src/app/bridge/bridge-widget/iframe/iframe-code-preview.tsx (1)
  • IframeCodePreview (3-33)
🪛 Gitleaks (8.30.0)
apps/portal/src/app/bridge/swap-widget/iframe/page.mdx

[high] 76-76: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

apps/portal/src/app/bridge/swap-widget/react/page.mdx

[high] 82-82: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 113-113: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


[high] 128-128: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ 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). (7)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Lint Packages
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
apps/portal/src/app/bridge/sidebar.tsx (1)

60-69: LGTM! Consistent navigation structure.

The nested links for Swap Widget follow the same pattern as Bridge Widget and Checkout Widget, maintaining consistency across the sidebar navigation.

apps/portal/src/app/bridge/swap-widget/iframe/page.mdx (1)

1-167: LGTM! Comprehensive iframe documentation.

The documentation is well-structured with clear examples for token selection, theming, currency, and event handling. The postMessage event listener code correctly validates the origin and source before processing events.

Note: The static analysis warning about an API key on line 76 is a false positive—it's an Ethereum contract address (Base USDC), which is public information.

apps/portal/src/app/bridge/swap-widget/react/page.mdx (1)

1-154: LGTM! Well-structured React component documentation.

The documentation provides clear, progressive examples from basic usage to advanced token configuration. The guidance to wrap with ThirdwebProvider is helpful, and the various prefill configuration examples cover common use cases effectively.

Note: The static analysis warnings about API keys on lines 82, 113, and 128 are false positives—these are Ethereum contract addresses (Base USDC), which are public information.

apps/portal/src/app/bridge/swap-widget/page.mdx (1)

1-68: LGTM! Improved documentation structure.

The restructuring creates a cleaner landing page that directs users to specific implementation guides (iframe vs React). The updated feature descriptions (90+ blockchains, route optimization) are more accurate and comprehensive, and the use of ArticleIconCard components provides clear navigation paths.

@graphite-app graphite-app bot merged commit f344fb5 into main Jan 5, 2026
25 checks passed
@graphite-app graphite-app bot deleted the mny-351 branch January 5, 2026 21:51
@vercel vercel bot temporarily deployed to Production – nebula January 5, 2026 21:51 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb-www January 5, 2026 21:51 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui January 5, 2026 21:51 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground January 5, 2026 21:51 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Portal Involves changes to the Portal (docs) codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants