Skip to content

feat(widget): add description for slippage config - #516

Merged
alfetopito merged 3 commits into
mainfrom
feat/add-slippage-doc
Jul 18, 2025
Merged

feat(widget): add description for slippage config#516
alfetopito merged 3 commits into
mainfrom
feat/add-slippage-doc

Conversation

@limitofzero

@limitofzero limitofzero commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

Description

Adds full documentation for the new slippage configuration feature

Changes

  • New “Slippage configuration” section
image
  • Added slippage in params table
image

Summary by CodeRabbit

  • Documentation
    • Added a new "Slippage configuration" section to the widget tutorial, detailing how to set minimum, maximum, and default slippage values for the CoW Swap widget.
    • Provided configuration examples, validation rules, and special handling for ETH-Flow trades.
    • Updated the main configuration table to include the new slippage parameter with a reference to the documentation.

@vercel

vercel Bot commented Jul 3, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Jul 3, 2025 8:18pm

@coderabbitai

coderabbitai Bot commented Jul 3, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

A new "Slippage configuration" section was added to the widget tutorial documentation. It describes how to declaratively set global or per-network slippage limits for the CoW Swap widget, introduces the SlippageConfig interface, outlines validation rules, and provides usage examples and parameter descriptions.

Changes

File(s) Change Summary
docs/cow-protocol/tutorials/widget/widget.md Added documentation for slippage configuration, interface details, validation, and usage guides

Poem

In the meadow of docs, a new section appears,
Slippage settings now banish old fears.
With basis points clear and rules in a row,
Widgets get smarter, as configs now show.
Hop, hop, hooray for slippage so neat—
The rabbits declare this update a treat! 🐇✨


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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

github-actions Bot commented Jul 3, 2025

Copy link
Copy Markdown

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

@limitofzero
limitofzero marked this pull request as ready for review July 3, 2025 20:13
@limitofzero
limitofzero requested a review from a team as a code owner July 3, 2025 20:13

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/cow-protocol/tutorials/widget/widget.md (2)

256-257: Duplicate horizontal rule — keep only one ---

Two consecutive --- lines render as two horizontal rules. One is sufficient and avoids visual noise.

----
----
+---

421-421: Grammar tweak

Remove the article before the plural noun.

-| You can set up a slippage settings for all networks in the widget.
+| You can configure slippage settings for all networks in the widget.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5667cc3 and bd0d21a.

📒 Files selected for processing (1)
  • docs/cow-protocol/tutorials/widget/widget.md (2 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/cow-protocol/tutorials/widget/widget.md

[grammar] ~421-~421: The plural noun “settings” cannot be used with the article “a”.
Context: ...--- | You can set up a slippage settings for all networks in the widget. See [Sl...

(A_NNS)

Comment thread docs/cow-protocol/tutorials/widget/widget.md
@limitofzero

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jul 3, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
docs/cow-protocol/tutorials/widget/widget.md (2)

321-327: Tighten wording around auto-slippage behaviour

In the “Auto slippage” rule it isn’t fully clear what happens when defaultValue is undefined or when auto-slippage exceeds defaultValue but is still within [min,max]. Consider adding one extra sentence to cover those edge cases to remove any ambiguity for integrators.
Example:

If defaultValue is undefined the widget falls back to X bps (internal default). If auto-slippage is higher than defaultValue but still inside the allowed range, the detected auto-slippage is used unchanged.


421-421: Fix minor grammar glitch in parameter description

“A slippage settings” → “slippage settings”.

-| You can set up a slippage settings for all networks in the widget.
+| You can set up slippage settings for all networks in the widget.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd0d21a and b0300e9.

📒 Files selected for processing (1)
  • docs/cow-protocol/tutorials/widget/widget.md (2 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/cow-protocol/tutorials/widget/widget.md

[grammar] ~421-~421: The plural noun “settings” cannot be used with the article “a”.
Context: ...--- | You can set up a slippage settings for all networks in the widget. See [Sl...

(A_NNS)

🔇 Additional comments (1)
docs/cow-protocol/tutorials/widget/widget.md (1)

260-276: 👍 Interface definition looks solid

The SlippageConfig interface is self-explanatory and the comments clearly convey intent. Optional fields make sense given the clamping rules below. Nothing to flag here.

@alfetopito alfetopito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great!

@alfetopito
alfetopito merged commit dcf3442 into main Jul 18, 2025
6 checks passed
@alfetopito
alfetopito deleted the feat/add-slippage-doc branch July 18, 2025 15:51
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants