-
Notifications
You must be signed in to change notification settings - Fork 603
SDK: Fix Embed widget container size, Dashboard: Fix Bridge embed UI width #8136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: aa0d23e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
WalkthroughUpdates layout and sizing for multiple embed containers and a bridge page layout, adjusts ConnectEmbed modal sizing logic in thirdweb, removes a Storybook centered layout preset, and adds a changeset entry. No functional logic or public API changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (6)**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/{dashboard,playground-web}/**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/{dashboard,playground}/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/{dashboard,playground}/**/*.tsx📄 CodeRabbit inference engine (AGENTS.md)
Files:
packages/thirdweb/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (5)📓 Common learnings
📚 Learning: 2025-09-23T19:56:43.668Z
Applied to files:
📚 Learning: 2025-07-18T19:20:32.530Z
Applied to files:
📚 Learning: 2025-08-29T23:44:47.512Z
Applied to files:
📚 Learning: 2025-07-18T19:19:55.613Z
Applied to files:
🧬 Code graph analysis (2)apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx (1)
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx (1)
🪛 GitHub Check: codecov/patchpackages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx[warning] 482-483: packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx#L482-L483 ⏰ 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). (3)
🔇 Additional comments (4)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit 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.
📒 Files selected for processing (7)
.changeset/social-showers-see.md
(1 hunks)apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
(1 hunks)apps/dashboard/src/@/components/blocks/grid-pattern-embed-container.tsx
(2 hunks)apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx
(1 hunks)apps/dashboard/src/app/bridge/page.tsx
(1 hunks)packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx
(1 hunks)packages/thirdweb/src/stories/ConnectEmbed.stories.tsx
(0 hunks)
💤 Files with no reviewable changes (1)
- packages/thirdweb/src/stories/ConnectEmbed.stories.tsx
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{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 localtypes.ts
barrels
Prefer type aliases over interface except for nominal shapes
Avoidany
andunknown
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
**/*.{ts,tsx}
: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/types
where applicable
Prefertype
aliases overinterface
except for nominal shapes
Avoidany
andunknown
unless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
apps/dashboard/src/@/components/blocks/grid-pattern-embed-container.tsx
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx
apps/dashboard/src/app/bridge/page.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
apps/dashboard/src/@/components/blocks/grid-pattern-embed-container.tsx
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx
apps/dashboard/src/app/bridge/page.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
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
UseNavLink
for internal navigation with automatic active states in dashboard and playground apps
Use Tailwind CSS only – no inline styles or CSS modules
Usecn()
from@/lib/utils
for conditional class logic
Use design system tokens (e.g.,bg-card
,border-border
,text-muted-foreground
)
Server Components (Node edge): Start files withimport "server-only";
Client Components (browser): Begin files with'use client';
Always callgetAuthToken()
to retrieve JWT from cookies on server side
UseAuthorization: Bearer
header – never embed tokens in URLs
Return typed results (e.g.,Project[]
,User[]
) – avoidany
Wrap client-side data fetching calls in React Query (@tanstack/react-query
)
Use descriptive, stablequeryKeys
for React Query cache hits
ConfigurestaleTime
/cacheTime
in React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never importposthog-js
in server components
Files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
apps/dashboard/src/@/components/blocks/grid-pattern-embed-container.tsx
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx
apps/dashboard/src/app/bridge/page.tsx
apps/{dashboard,playground}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
apps/{dashboard,playground}/**/*.{ts,tsx}
: Import UI primitives from@/components/ui/_
(e.g., Button, Input, Tabs, Card)
UseNavLink
for internal navigation to get active state handling
Use Tailwind CSS for styling; no inline styles
Merge class names withcn()
from@/lib/utils
for conditional classes
Stick to design tokens (e.g., bg-card, border-border, text-muted-foreground)
Server Components must start withimport "server-only"
; usenext/headers
, server‑only env, heavy data fetching, andredirect()
where appropriate
Client Components must start with'use client'
; handle interactivity with hooks and browser APIs
Server-side data fetching: callgetAuthToken()
from cookies, sendAuthorization: Bearer <token>
header, and return typed results (avoidany
)
Client-side data fetching: wrap calls in React Query with descriptive, stablequeryKeys
and set sensiblestaleTime/cacheTime
(≥ 60s default); keep tokens secret via internal routes or server actions
Do not importposthog-js
in server components (client-side only)
Files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
apps/dashboard/src/@/components/blocks/grid-pattern-embed-container.tsx
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx
apps/dashboard/src/app/bridge/page.tsx
apps/{dashboard,playground}/**/*.tsx
📄 CodeRabbit inference engine (AGENTS.md)
Expose a
className
prop on the root element of every component
Files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
apps/dashboard/src/@/components/blocks/grid-pattern-embed-container.tsx
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx
apps/dashboard/src/app/bridge/page.tsx
packages/thirdweb/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/thirdweb/**/*.{ts,tsx}
: Every public symbol must have comprehensive TSDoc with at least one compiling@example
and a custom tag (@beta
,@internal
,@experimental
, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g.,const { jsPDF } = await import("jspdf")
)
Files:
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx
.changeset/*.md
📄 CodeRabbit inference engine (AGENTS.md)
.changeset/*.md
: Each change inpackages/*
must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API
Files:
.changeset/social-showers-see.md
🧠 Learnings (9)
📓 Common learnings
Learnt from: MananTank
PR: thirdweb-dev/js#8106
File: packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx:482-485
Timestamp: 2025-09-23T19:56:43.668Z
Learning: In packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx, the EmbedContainer uses width: "100vw" intentionally rather than "100%" - this is by design for the bridge widget embedding use case.
📚 Learning: 2025-07-18T19:20:32.530Z
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 the `container` class with a `max-w-7xl` cap for page width consistency.
Applied to files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
apps/dashboard/src/@/components/blocks/grid-pattern-embed-container.tsx
📚 Learning: 2025-07-18T19:19:55.613Z
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
Applied to files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
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} : Add `className` to the root element of every component for external overrides.
Applied to files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
📚 Learning: 2025-09-23T19:56:43.668Z
Learnt from: MananTank
PR: thirdweb-dev/js#8106
File: packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx:482-485
Timestamp: 2025-09-23T19:56:43.668Z
Learning: In packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx, the EmbedContainer uses width: "100vw" intentionally rather than "100%" - this is by design for the bridge widget embedding use case.
Applied to files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx
📚 Learning: 2025-08-29T23:44:47.512Z
Learnt from: MananTank
PR: thirdweb-dev/js#7951
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx:38-38
Timestamp: 2025-08-29T23:44:47.512Z
Learning: The ContractPageLayout component in apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/_layout/contract-page-layout.tsx is not the root layout - it's nested within the dashboard layout which already handles footer positioning with min-h-dvh and AppFooter placement. The ContractPageLayout needs flex flex-col grow to properly participate in the parent's flex layout.
Applied to files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
apps/dashboard/src/@/components/blocks/grid-pattern-embed-container.tsx
apps/dashboard/src/app/bridge/page.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
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} : Layouts should reuse `SidebarLayout` / `FullWidthSidebarLayout` (`@/components/blocks/SidebarLayout`).
Applied to files:
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
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/**/layout.tsx : Building layout shells (`layout.tsx`) and top-level pages that mainly assemble data.
Applied to files:
apps/dashboard/src/app/bridge/page.tsx
📚 Learning: 2025-07-18T19:20:32.530Z
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:
apps/dashboard/src/app/bridge/page.tsx
🧬 Code graph analysis (2)
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx (1)
apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx (1)
BuyAndSwapEmbed
(32-229)
packages/thirdweb/src/react/web/ui/ConnectWallet/Modal/ConnectEmbed.tsx (1)
packages/thirdweb/src/react/web/ui/ConnectWallet/constants.ts (2)
modalMaxWidthCompact
(8-8)modalMaxWidthWide
(11-11)
⏰ 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: Build Packages
- GitHub Check: Lint Packages
- 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: Analyze (javascript)
🔇 Additional comments (5)
.changeset/social-showers-see.md (1)
1-5
: Changeset looks goodPatch bump for the
thirdweb
package with a concise summary—exactly what we need for this UI tweak.apps/dashboard/src/@/components/blocks/BuyAndSwapEmbed.tsx (1)
70-70
: Nice guard against flex overflow.Adding
min-w-0
lets the embed shrink inside tighter flex parents without blowing up the layout. 👍apps/dashboard/src/@/components/blocks/grid-pattern-embed-container.tsx (1)
7-21
: Layout tweaks look solid.Base-level flex plus
min-w-0
keeps the embed responsive while preserving the patterned frame. Looks good.apps/dashboard/src/app/bridge/page.tsx (1)
57-57
: Spacing + centering reads well.The updated wrapper keeps the section centered with adequate breathing room and still respects the background overlay. 👍
apps/dashboard/src/app/bridge/components/client/UniversalBridgeEmbed.tsx (1)
19-24
: Good call simplifying the wrapper.Returning the embed directly avoids redundant divs and lets the parent flex logic do its job.
size-limit report 📦
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8136 +/- ##
=======================================
Coverage 56.27% 56.28%
=======================================
Files 906 906
Lines 59193 59192 -1
Branches 4173 4174 +1
=======================================
+ Hits 33311 33316 +5
+ Misses 25777 25771 -6
Partials 105 105
🚀 New features to boost your workflow:
|
Merge activity
|
…width (#8136) <!-- ## 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 fixing the embed container size across various components in the `thirdweb` and `dashboard` applications, ensuring better layout and responsiveness. ### Detailed summary - Updated `maxWidth` in `ConnectEmbed` to `100%` and adjusted `width` based on `modalSize`. - Removed redundant `layout: "centered"` parameter in `ConnectEmbed` story. - Simplified `UniversalBridgeEmbed` structure by removing unnecessary wrapping `div`. - Added `min-w-0` class to `BuyAndSwapEmbed` and `GridPatternEmbedContainer` for better responsiveness. - Adjusted layout classes in `GridPatternEmbedContainer` for improved alignment. > ✨ 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 - Bug Fixes - Fixed embed container sizing in the Connect Wallet modal to respect modal width and prevent viewport overflow. - Resolved overflow and min-width issues in embed containers for smoother responsive behavior. - Style - Updated Bridge page layout to display components side-by-side on larger screens. - Improved responsive rounding and overflow handling around embed containers for cleaner visuals. - Chores - Updated thirdweb dependency to the latest patch release. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
065c457
to
aa0d23e
Compare
PR-Codex overview
This PR focuses on improving the layout and responsiveness of various components within the
thirdweb
anddashboard
applications, particularly enhancing container sizes and ensuring proper alignment.Detailed summary
maxWidth
to100%
and adjustedwidth
inConnectEmbed
.layout
parameter inConnectEmbed
story.div
structure inpage.tsx
by removinggrow flex-col
.BuyAndSwapEmbed
structure for better readability.min-w-0
class to severaldiv
elements for improved layout handling.Summary by CodeRabbit
Bug Fixes
Style
Chores