Conversation
Add the Grid periodic statements playground at components/grid-statements-demo and embed it in the Cards docs as a Statements group below Transactions. The playground renders a sample Reg E periodic statement for a card program: consumer and commercial variants, two color presets plus custom colors, logo upload, mobile and desktop previews in the shared app shell, and export as link, PDF, or HTML. The right rail shows the API calls that load the statement data. Shared chrome is copied byte-for-byte from the Cards and Wallet playgrounds and pinned by scripts/check-chrome-parity.mjs. Shared chrome is re-synced to the Cards demo on main. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
| 'vertical-align', | ||
| 'white-space', | ||
| 'width', | ||
| ] as const; |
There was a problem hiding this comment.
Print pagination rules are lost
The PDF export copies only the listed screen styles, removes the elements’ classes, and does not copy break-inside. This prevents the statement’s print rules from keeping transactions, fee totals, and notice paragraphs together, so content that reaches a page boundary can split across PDF pages. Please preserve these print properties or add equivalent rules to the generated document.
Prompt To Fix With AI
This is a comment left during a code review.
Path: components/grid-statements-demo/src/statement/export.ts
Line: 53
Comment:
**Print pagination rules are lost**
The PDF export copies only the listed screen styles, removes the elements’ classes, and does not copy `break-inside`. This prevents the statement’s print rules from keeping transactions, fee totals, and notice paragraphs together, so content that reaches a page boundary can split across PDF pages. Please preserve these print properties or add equivalent rules to the generated document.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Parked as a draft. The periodic statements guide ships separately in #1071. If the playground rolls out later, it needs a page path other than |
What
Adds the Statements playground under Cards. It builds a consumer or commercial periodic statement from sample Grid customer, account, and transaction data, and shows the exact API calls behind it.
The app is a re-fork of the Cards playground chrome, with the Wallet
AppShellfor the device frame. It exports the statement as a one-page PDF or a self-contained HTML file.The docs page embeds the production app at
/cards/statements.Single-commit resubmission of #1032 with review feedback applied and shared chrome re-synced to the Cards demo on main; #1032 is closed.
Try it
/cards/statementsWhat's in the diff
components/grid-statements-demo/— new Next.js app (port 4003). Statement model, fixtures, and API samples live insrc/statement/.scripts/check-chrome-parity.mjschecks byte parity with Cards and Wallet.mintlify/cards/statements.mdx+mintlify/snippets/cards/statements-demo-embed.mdx— the docs page and its iframe snippet.mintlify/docs.json— new Statements group after Transactions; head script adds/cards/statementsto thels-page-playgroundclass.mintlify/sidebar-toggle.js— same/cards/statementsroute for the playground class.components/grid-statements-demo/README.md— develop, parity, deploy, embed, and data contract.No OpenAPI changes. No changes to Cards, Wallet, or Flow Builder.
Parity with Cards/Wallet
npm run check:chromecompares every copied file to Cards (or Wallet) by bytes. It passes atf8c60776against the Cards and Wallet demos on main.Byte-equal with Cards:
public/fonts,src/app/fonts,src/app/globals.scss,src/apps/shared/typography,src/components/ApiPanel,ColumnResizeHandle,liquid-glass/squircle.ts,GridWordmark.tsx,PanelHeader,SectionDivider,ThemeSync.tsx,Tooltip,src/data/actions.ts,flow.ts,src/hooks/useColumnResize.ts,useNowTick.ts,useTheme.ts,useThemeMode.ts,src/lib/apiCodeFormat.tsx,easing.ts,formatRelativeTime.ts,groupApiEntries.ts,layout.ts,src/styles/breakpoints.scss.Byte-equal with Wallet:
src/apps/shared/AppShell/*except the two adapted files below.Adapted, with the exact transform pinned in
scripts/check-chrome-parity.mjs:next.config.mjssrc/components/PlaygroundIntro/PlaygroundIntro.tsxsrc/app/layout.tsxsrc/app/page.module.scsssrc/data/flowIcons.tsxLoad statementiconsrc/apps/shared/AppShell/AppShell.tsxsrc/apps/shared/AppShell/usePhoneFitScale.tssrc/components/ShareSheet/StageShareButton.*Deploy notes
Vercel project
grid-statements-demo, root directorycomponents/grid-statements-demo.vercel.jsonskips builds for commits that do not touch this directory. After merge, connect the project to GitHub with production branchmain.Held
A periodic statements guide page is not part of this PR. Only the playground ships.
Follow-ups
Mobile history stacking and iframe postMessage origin checks are shared with the Cards, Wallet, and Visualizer playgrounds and tracked in #1059.
Verification at
f8c60776npm test: 72 tests pass in 18 files.npm run check:chrome: passes.npm run buildandnpx tsc --noEmit: pass on Node 22.make lint: 0 errors.