Skip to content

docs: clean up widget pages and document widget-react#642

Open
raq0x wants to merge 1 commit into
mainfrom
docs/widget-fixes
Open

docs: clean up widget pages and document widget-react#642
raq0x wants to merge 1 commit into
mainfrom
docs/widget-fixes

Conversation

@raq0x

@raq0x raq0x commented Jul 9, 2026

Copy link
Copy Markdown

Description

The widget overview page (Integrate section) had drifted out of sync with the widget tutorial, and some tutorial examples were broken when copy-pasted. The React wrapper was not documented at all.

Changes

  • Restructured integrate/widget.mdx to match the other integrate pages and removed duplicated examples
  • Fixed broken tutorial examples (createCowSwapWidget return value usage, missing container declarations)
  • Documented @cowprotocol/widget-react
  • Fixed a dead link, made internal links relative, fixed typos

Summary by CodeRabbit

  • Documentation
    • Clarified widget setup and usage guidance.
    • Updated examples to use pixel-based dimensions for layout settings.
    • Added React-specific integration instructions and recommended package usage.
    • Refreshed tutorial snippets, corrected typos, and improved wording for standalone usage and customization.
    • Expanded examples for advanced configuration, events, and updating widget settings.

@raq0x raq0x requested a review from a team as a code owner July 9, 2026 09:31
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Jul 9, 2026 9:31am

Request Review

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 56e6c679-1651-4d5c-9c45-48a4aabf0a5d

📥 Commits

Reviewing files that changed from the base of the PR and between c793c55 and 871cb3d.

📒 Files selected for processing (2)
  • docs/cow-protocol/integrate/widget.mdx
  • docs/cow-protocol/tutorials/widget/widget.md

📝 Walkthrough

Walkthrough

Documentation updates across the CoW Widget integration overview page and widget tutorial: reworded widget description, switched width/height to pixel strings, added React integration guidance and example, fixed typos, corrected appCode placeholders, fixed customTokens type, and rewrote the widget-updating example.

Changes

Widget Documentation Refresh

Layer / File(s) Summary
Widget overview page updates
docs/cow-protocol/integrate/widget.mdx
Description reworded to remove React-specific phrasing, width/height changed to pixel strings, React usage note added, and configuration options list expanded.
React integration section and quick start fix
docs/cow-protocol/tutorials/widget/widget.md
Corrected the appCode placeholder typo and added a new React integration subsection with installation instructions and a component usage example.
Partner fee and wallet provider examples
docs/cow-protocol/tutorials/widget/widget.md
Fixed a typo ("Bellow" to "Below"), added a widget container lookup to the advanced partner fee example, and clarified wallet provider standalone-mode guidance with corrected appCode.
Theming, tokens, events, and update examples
docs/cow-protocol/tutorials/widget/widget.md
Corrected appCode in the custom theme example, fixed customTokens type to an array, added a container lookup to the events example, and rewrote the widget-updating example around updateParams.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • cowprotocol/docs#619: Both PRs update the same widget tutorial file with overlapping changes to width/height values and CowSwapWidgetParams configuration guidance.

Suggested reviewers: Danziger, limitofzero, kernelwhisperer, pretf00d

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the PR’s main changes: widget docs cleanup and documenting widget-react.
Description check ✅ Passed The description follows the template with context and a clear changes list covering the main updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/widget-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

github-actions Bot added a commit that referenced this pull request Jul 9, 2026
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.

1 participant