Skip to content

feat(checkout): embed checkout inline in playground and polish funding UI#830

Merged
chybisov merged 1 commit into
mainfrom
fix/checkout-wallet-icon-and-inline-embed
Jul 20, 2026
Merged

feat(checkout): embed checkout inline in playground and polish funding UI#830
chybisov merged 1 commit into
mainfrom
fix/checkout-wallet-icon-and-inline-embed

Conversation

@chybisov

Copy link
Copy Markdown
Member

Which Linear task is linked to this PR?

N/A

Why was it implemented this way?

Three small, related improvements to the checkout experience (all in private packages — no changeset needed):

  1. Inline checkout embed (playground). The playground's Checkout preview showed a DEPOSIT button that opened the checkout as a centered modal overlay (which dimmed the whole page). @lifi/widget-checkout was modal-only, so a new opt-in inline prop was added to LifiWidgetCheckout/CheckoutModal that renders the panel in-flow (no <Modal>/backdrop) and hides the header close button. The inline panel inherits only the host widget theme's card appearance (theme.container → border-radius + drop-shadow), matching the standard widget, while keeping its own structural layout (display:flex / maxHeight / overflow:hidden) so the internal scroll chain still engages on tall pages (e.g. the deposit-address screen). Spreading the whole theme.container was avoided because it pulls in layout props (display/height) that broke the flex-scroll and clipped tall content.

  2. Connected wallet icon fix. The connected "Pay from Wallet" row read account.connector?.icon, which is undefined for the widget's custom EVM SDK connectors (metaMask/coinbase/walletConnect/…), leaving a near-invisible avatar. It now resolves through the existing getConnectorIcon helper (getWalletIcon(id) || connector.icon) and, when no icon is available, renders the same GenericIconWrap black glyph used by the disconnected state.

  3. Default checkout destination → USDC on Base (playground demo default).

Visual showcase (Screenshots or Videos)

Checkout now renders inline in the playground preview as a proper elevated card (white-on-grey, 16px radius, drop-shadow(0 8px 32px rgba(0,0,0,0.08)) — identical to the standard widget), with a working close-button-less header, correct connected-wallet icon, and internal scrolling on tall pages.

Checklist before requesting a review

  • I have performed a self-review and testing of my code.
  • This pull request is focused and addresses a single problem.
  • If this PR modifies the Widget API or adds new features that require documentation, I have updated the documentation in the public-docs repository.

Verification: check:types + Biome pass; @lifi/widget-checkout tests 196/196; inline embed, shadow, scroll, and the connected wallet icon confirmed in the running playground.

…g UI

- widget-checkout: add an `inline` (non-modal) render mode to
  LifiWidgetCheckout/CheckoutModal so the checkout can be embedded in a
  page instead of a centered modal overlay; hide the header close button
  in inline mode. The inline panel inherits the host widget theme's card
  appearance (radius, drop-shadow) while keeping its own layout so the
  internal scroll works on tall pages.
- widget-checkout: fix the connected "Pay from Wallet" icon — resolve it
  via getConnectorIcon (falls back to the hosted wallet SVG), and render
  the disconnected-style GenericIconWrap glyph when no icon is available.
- widget-playground: render the checkout inline in the Checkout preview
  (replacing the DEPOSIT button placeholder) and default the checkout
  destination to USDC on Base.
@changeset-bot

changeset-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 06e1f3a

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ E2E Dev Smoke — passing

Check Result
Dev server start (pnpm dev) ✅ started
Smoke tests ✅ passed

4 passed · 0 failed · 0 skipped · 22s

View run

@github-actions

Copy link
Copy Markdown
Contributor

E2E Playground results

passed  158 passed

Details

stats  158 tests across 10 suites
duration  2 minutes, 28 seconds
commit  06e1f3a

📥 Download full HTML report (open the run → Artifacts → playwright-report)

@chybisov
chybisov merged commit f474ae0 into main Jul 20, 2026
21 checks passed
@chybisov
chybisov deleted the fix/checkout-wallet-icon-and-inline-embed branch July 20, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant