docs(wcp): custom theming for data collection form + structure cleanup#74
docs(wcp): custom theming for data collection form + structure cleanup#74ignaciosantise wants to merge 6 commits into
Conversation
Add themeVariables/theme query params for the embedded data collection form (generated from the Pay Dashboard), documented via a shared "Form URL parameters" reference table and "Customizing the form appearance" section in the overview snippet. Cleanup done alongside: - Standardize prefill encoding to base64url across all SDKs - Dedupe the web iframe copy into the shared overview snippet; render the previously-imported-but-unused best-practices snippet - Rename buildPrefillUrl -> buildFormUrl (now takes theme params) - Make data collection consistently per-option: add collectData to the PaymentOption type and switch examples/prose to selectedOption.collectData across the 4 pages that used the deprecated top-level field - Add a theming FAQ to the wallet overview - Update the WalletKit ai-prompt files to match Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Cross-platform consistency pass on the wallet integration docs: - Unify section names and ordering across all 10 SDK pages (Data Collection Implementation, Data Models, Payment Link Detection; consistent API Reference -> Error Handling -> Best Practices tail) - Nav: order React Native above Flutter in the WalletKit group - Sync Flutter Payment Flow steps with the rest (add Sign Actions, rename to Get Required Actions); remove Flutter's duplicate Examples - Merge Swift deep-link + QR handling into Payment Link Detection - Rename WalletKit Swift "Configuration" -> "Initialization" - Fold the WCP ID prerequisite under Requirements (drop Pre-Requisites) - Trim the in-page TOC: demote per-item Data Models / Error Handling / API Reference sub-headings and redundant install/config sub-headings to bold so only meaningful sections remain Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
Pull request overview
Adds themeable URL parameters for the embedded data-collection form (WebView/iframe) across WalletConnect Pay wallet integration docs, while also standardizing structure and per-option collectData guidance across SDK pages.
Changes:
- Documented and propagated
theme+themeVariables(and standardizedprefillas base64url) via shared “Form URL parameters” + “Customizing the form appearance” sections and updated SDK examples. - Refactored docs to consistently use per-option
selectedOption.collectDataand updated utility naming (buildPrefillUrl→buildFormUrl) in examples/prompts. - Cleaned up navigation/structure: unified section ordering, reduced TOC noise by demoting subheadings, and reordered WalletKit nav entries.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| snippets/webview-message-types.mdx | Formatting cleanup for the bridge names section. |
| snippets/webview-data-collection-overview.mdx | Central “embedded form” overview, URL parameter reference, and theming guidance. |
| snippets/webview-data-collection-best-practices.mdx | Shared best-practices snippet updated for “form” wording + theming guidance. |
| snippets/app-id.mdx | Requirements copy updated and condensed for WCP ID guidance. |
| payments/wallets/walletkit/web.mdx | Uses shared form overview/best practices; updates examples to per-option collectData + theme params + buildFormUrl. |
| payments/wallets/walletkit/swift.mdx | Imports shared snippets; adds link detection examples; updates data-collection examples for base64url + theming. |
| payments/wallets/walletkit/react-native.mdx | Imports shared snippets; updates per-option collectData, base64url prefill, theming params, and buildFormUrl. |
| payments/wallets/walletkit/kotlin.mdx | Imports shared snippets; updates prefill to base64url no-padding + theming params; embeds best practices. |
| payments/wallets/walletkit/flutter.mdx | Imports shared snippets; aligns flow steps; adds signing step; updates data-collection example + theming params. |
| payments/wallets/walletkit/ai-prompts/swift.mdx | Updates prompt guidance to per-option collectData + theming params and buildFormUrl. |
| payments/wallets/walletkit/ai-prompts/react-native.mdx | Adds buildFormUrl guidance including theme params for the prompt. |
| payments/wallets/walletkit/ai-prompts/kotlin.mdx | Updates prompt to per-option collectData and adds theme param guidance + buildFormUrl. |
| payments/wallets/walletkit/ai-prompts/flutter.mdx | Updates prompt to per-option collectData and adds theme param guidance + buildFormUrl. |
| payments/wallets/standalone/web.mdx | Uses shared form overview/best practices; updates per-option collectData, base64url prefill, theming, and URL builder. |
| payments/wallets/standalone/swift.mdx | Uses shared form overview/best practices; updates link detection and data-collection URL building + theming params. |
| payments/wallets/standalone/react-native.mdx | Uses shared form overview/best practices; updates per-option collectData, base64url prefill, theming, and URL builder. |
| payments/wallets/standalone/kotlin.mdx | Uses shared form overview/best practices; updates base64url no-padding + theme params; updates URL builder. |
| payments/wallets/standalone/flutter.mdx | Uses shared form overview/best practices; aligns flow steps; updates data-collection + adds buildFormUrl. |
| payments/wallets/overview.mdx | Adds theming FAQ and updates prefill encoding wording. |
| docs.json | Reorders WalletKit nav entries (React Native above Flutter). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ection-docs # Conflicts: # payments/wallets/standalone/flutter.mdx # payments/wallets/standalone/kotlin.mdx # payments/wallets/standalone/react-native.mdx # payments/wallets/standalone/swift.mdx # payments/wallets/standalone/web.mdx # payments/wallets/walletkit/flutter.mdx # payments/wallets/walletkit/kotlin.mdx # payments/wallets/walletkit/react-native.mdx # payments/wallets/walletkit/swift.mdx # payments/wallets/walletkit/web.mdx
Fold "Accessing the Pay Client" into Initialization and remove the redundant "Direct Access" section (both just showed `walletKit.pay`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Unify the SDK-setup section heading across standalone and WalletKit pages (all now "Initialization"). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| ## Examples | ||
| 9. **WebView Data Collection**: When `selectedOption.collectData.url` is present, display the URL in a WebView using `webview_flutter` rather than building native forms. The WebView handles form rendering, validation, and T&C acceptance. | ||
|
|
||
| For a complete example implementation, see the [reown_walletkit example](https://github.com/reown-com/reown_flutter/tree/master/packages/reown_walletkit/example/lib/walletconnect_pay). |
There was a problem hiding this comment.
(this was redundant with the wallet sample link at top)
|
|
||
| <Step title="Collect User Data (If Required)" titleSize="h3"> | ||
|
|
||
| Some payments require collecting additional user information. After the user selects an option, check for `collectData` on that option and complete data collection **before** fetching the required actions — the backend rejects the actions request if data collection is required but not yet captured: |
There was a problem hiding this comment.
the backend error info was moved to a shared snippet, still present in the docs
|
|
||
| <Step title="Collect User Data (If Required)" titleSize="h3"> | ||
|
|
||
| Some payments may require additional user data. After the user selects an option, check for `collectData` in the payment options response and run this step **before** fetching the required payment actions — the backend rejects the actions request with `400 IC data required` for options needing Information Capture if data has not yet been collected: |
There was a problem hiding this comment.
the backend error info was moved to a shared snippet, still present in the docs
Dart's base64Url.encode includes `=` padding; strip it so the Flutter prefill examples match the unpadded base64url used by the other SDKs. Addresses Copilot review feedback on PR #74. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
What
Adds custom theming for the WalletConnect Pay data collection form, plus a consistency/clarity pass across the wallet integration docs.
Feature: themeable data collection form
Wallets can now style the embedded (WebView/iframe) data collection form via two optional URL query params:
theme=light|dark— base color modethemeVariables=<base64url>— design-token overrides (font, font size, some colors, button/input border radius), generated and exported from the WalletConnect Pay Dashboard and appended verbatimDocumented via a shared "Form URL parameters" reference table + a "Customizing the form appearance" section in the overview snippet, theme params in every per-tech code example, and a theme FAQ on the wallet overview.
Clarity cleanup (done alongside)
prefillencoding to base64url across all SDKsbuildPrefillUrl→buildFormUrl(now takes theme params)collectDatato thePaymentOptiontype and switched examples/prose toselectedOption.collectDataon the 4 pages that used the deprecated top-level fieldStructure & navigation
API Reference → Data Models → Error Handling → Best Practicestail)Verification
mint validate(strict) andmint broken-linksboth pass.Notes
🤖 Generated with Claude Code