Skip to content

feat(demo): restyle demo pages with Relay design tokens - #1187

Merged
pedromcunha-uneven merged 3 commits into
mainfrom
demo-relay-restyle
Nov 13, 2026
Merged

pedromcunha-uneven merged 3 commits into
mainfrom
demo-relay-restyle

Conversation

@pedromcunha-uneven

Copy link
Copy Markdown
Collaborator

Restyles every demo page except /orders with the Relay tokens from packages/ui/src/styles/base.css: --relay-colors-* (violet primary, slate gray), --relay-radii-* and Inter via --relay-fonts-*, in light and dark mode.

Changes and decisions to review:

  • All demo styles live in demo/global.css inside @layer demo with demo-* class names, so they can't collide with the /orders CSS module in feat(sdk): add limit order actions and run quote/v3 style steps #1184. global.css is imported before the relay-kit stylesheet.
  • New sticky navbar: Relay mark (demo/public/relay-mark.svg, cut from relay-black.svg), "Relay Kit" + Demo badge, styled API select, sun/moon theme icon button, Dynamic connect button. Wraps at phone widths.
  • Home page sections become cards of link tiles.
  • New DemoPage / DemoOutput components (demo/components/DemoPage.tsx) give SDK and hook pages a shared heading, card form and mono JSON output.
  • Primary buttons are bold uppercase in the heading font, matching relay-kit's CTA buttons.
  • The per-page ConnectButton on SDK pages is removed because the navbar already has one; the SDK Swap page's extra BaseApiSwitcher is removed for the same reason.
  • Widget pages drop their hard-coded backgrounds and use the token page background; the widgets are unchanged. Layout keeps its styles prop.
  • Customize sidebar chrome uses tokens; its theme-picker default colors are unchanged.
  • The unused Tailwind classes on <body> in _document.tsx are removed.
  • No changeset: the demo is a private package.

Verification: tsc passes in demo; all 19 routes captured in light mode and the main ones in dark mode and at 390px. Onramp couldn't be rendered locally without a real MoonPay key (pre-existing, not caused by this change).

@vercel

vercel Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
relay-sdk-demo Ready Ready Preview Nov 13, 2026 7:08pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @pedromcunha-uneven's task in 10s —— View job


📝 Docs Drift Check — No docs impact

This PR does not touch surfaces that require a relayprotocol/relay-docs update.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @pedromcunha-uneven's task in 55s —— View job


Code Review: 2 issues found, both minor. Neither blocks the merge.

  1. [NOTE] Correctness: Home page tile links to a page that doesn't exist
    demo/pages/index.tsx:623: The "SDK Read Actions" section links to /sdk/actions/getSolverCapacity, but demo/pages/sdk/actions/ has no getSolverCapacity.tsx. Clicking that tile gives a 404. The broken link was already on main, but this PR makes it a full-size tile on the landing page, so it's easier to hit now. Either remove the entry from SECTIONS or add the page.

  2. [NOTE] Layout: Inline minWidth on inputs overflows the card on phones
    demo/pages/sdk/actions/claimAppFees.tsx (Recipient input, style={{ minWidth: 350 }}): The inputs now sit inside .demo-panel, which already sets width: 100%. On a 390px screen the page has 16px padding on each side and the card has 24px, which leaves about 310px for the input. A 350px minimum pushes it past the card edge. The minWidth: 100 inputs on the same page are fine, but they no longer do anything. Removing the inline minWidth styles fixes this.

Everything else looks fine:

  • Theme variables: --relay-colors-* and --relay-fonts-* are defined on :root and .dark in base.css, so the body, navbar and sidebar can use them outside .relay-kit-reset.
  • Style collisions: Importing global.css first means @layer demo is declared before the relay layers and has the lowest priority. The demo selectors all start with .demo-*, so they can't leak into the widgets.
  • Removed useTheme: It's gone from every page that stopped using it. onramp.tsx keeps it because it still sets moonPayThemeMode.
  • Connect button: Removing the per-page ConnectButton is safe because DemoPage wraps pages in Layout, which renders the navbar.

Reviewed 28 files, about 2,800 lines changed. Checked for correctness, security, error handling and the repo's guidelines.

ted-uneven
ted-uneven previously approved these changes Nov 13, 2026
@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous card overflow is fixed and no new blocking issues were found.

Summary

The demo pages adopt Relay design tokens, shared form and output cards, and a refreshed navbar.

  • The demo header and home page use Relay’s shared visual style.
  • SDK and hook demos use shared forms and result panels.
  • Widget demos use the same page background as the rest of the site.

Reviews (2) · Last reviewed commit: "fix(demo): keep demo cards inside phone ..." · Reviewed by Greptile

Comment thread demo/pages/ui/singleWallet.tsx Resolved

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ampagent can you update this outdate relay mark to use the latest Relay logo?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Updated in 8d5a1ae: demo/public/relay-mark.svg is now the starburst from the current Relay logo (relay-docs logo/relay-black.svg, violet #4615C8), and it turns white in dark mode like relay-white.svg.

@amp-for-github

Copy link
Copy Markdown

Addressed the Claude review notes in ba13369:

  • Removed the dead /sdk/actions/getSolverCapacity tile from the home page; there is no such page or SDK action.
  • Removed the inline minWidth styles on the Claim App Fees inputs, so the Recipient input no longer overflows the card at 390px.

@pedromcunha-uneven
pedromcunha-uneven merged commit 921a301 into main Nov 13, 2026
11 of 13 checks passed
@pedromcunha-uneven
pedromcunha-uneven deleted the demo-relay-restyle branch November 13, 2026 19:57

This branch was successfully deployed

1 active deployment
Preview — ba133693 Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants