Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Routes component #3225

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Hide Routes component #3225

merged 2 commits into from
Oct 3, 2024

Conversation

lawsonkight
Copy link
Collaborator

@lawsonkight lawsonkight commented Oct 3, 2024

Hides the <Routes /> component until the Synapse @constants package is ready.

  • 05-Supported-Routes.md is a placeholde that directs users to the Synapse Bridge to see supported tokens, chains, and routes.
  • _05-Supported-Routes.md uses synapse-constants to show supported tokens and chains inline, which can replace the placeholder when ready.

Summary by CodeRabbit

  • New Features

    • Introduced a new documentation file detailing supported routes for the Synapse Bridge.
    • Added a sidebar label titled "Supported Routes" for easier navigation.
  • Documentation

    • Removed outdated routes documentation.
    • Renamed "Example Code" to "Sample Code" for clarity.
    • Updated hyperlink references for improved URL structure.
    • Added a new markdown file with routing information and a Routes component for display.

8e3874b: docs preview link

Copy link
Contributor

coderabbitai bot commented Oct 3, 2024

Walkthrough

The changes involve the removal of the 03-Routes.md documentation file and the introduction of two new files, 05-Supported-Routes.md and _05-Supported-Routes.md, which provide updated information on supported routes for the Synapse Bridge. Additionally, the Sample Code section in 04-Sample-Code.md has been renamed, and a hyperlink in index.md has been updated for better URL structure.

Changes

File Path Change Summary
docs/bridge/docs/01-About/03-Routes.md Removed file containing information about supported tokens and routes.
docs/bridge/docs/02-Bridge/04-Sample-Code.md Renamed section header from "Example Code" to "Sample Code"; no content changes.
docs/bridge/docs/02-Bridge/05-Supported-Routes.md New file created detailing supported routes for the Synapse Bridge.
docs/bridge/docs/02-Bridge/_05-Supported-Routes.md New file created with information on supported routes and includes <Routes /> component.
docs/bridge/docs/02-Bridge/index.md Updated hyperlink reference from /docs/About/Routes to ./Supported-Routes.

Possibly related PRs

  • feat(rest-api): Adds validateRouteExists validation [SLT-260] #3180: This PR introduces the validateRouteExists function, which checks for valid routes based on token and chain parameters, directly relating to the removal of the Routes component in the main PR that previously handled route information.
  • Docs/fix #3222: This PR updates documentation related to the RFQ and CCTP, which includes clarifications on routing transactions, connecting to the main PR's focus on routes and the removal of the Routes component in the documentation.

Suggested labels

size/s, M-deps

Suggested reviewers

  • bigboydiamonds
  • abtestingalpha

Poem

In the land of code where routes once ran,
A file was removed, a new path began.
With samples now shining, and routes to explore,
The bridge stands tall, inviting us more.
Hops of delight as we navigate through,
A journey of tokens, all fresh and new! 🐇✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 1f56641 and bb8b8b8.

📒 Files selected for processing (1)
  • docs/bridge/docs/02-Bridge/index.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/bridge/docs/02-Bridge/index.md

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

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.

Copy link

codecov bot commented Oct 3, 2024

Bundle Report

Changes will increase total bundle size by 5.56MB (15.58%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
explorer-ui-server-cjs* 866.14kB 76 bytes (0.01%) ⬆️
explorer-ui-client-array-push* 2.31MB 152 bytes (0.01%) ⬆️
synapse-interface-client-array-push* 7.28MB 746 bytes (0.01%) ⬆️
synapse-interface-server-cjs* 1.64MB 147.92kB (9.9%) ⬆️⚠️
widget-cjs-esm* 271.27kB 2.03kB (-0.74%) ⬇️
docs-bridge-client-array-push 10.15MB 2.25MB (28.5%) ⬆️⚠️
docs-bridge-server-cjs 17.68MB 2.81MB (18.87%) ⬆️⚠️
synapse-constants-esm-cjs* 174.63kB 174.63kB (100%) ⬆️⚠️
synapse-constants-cjs-esm* 174.18kB 174.18kB (100%) ⬆️⚠️

ℹ️ *Bundle size includes cached data from a previous commit

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9c1dc5b and 1f56641.

📒 Files selected for processing (5)
  • docs/bridge/docs/01-About/03-Routes.md (0 hunks)
  • docs/bridge/docs/02-Bridge/04-Sample-Code.md (1 hunks)
  • docs/bridge/docs/02-Bridge/05-Supported-Routes.md (1 hunks)
  • docs/bridge/docs/02-Bridge/_05-Supported-Routes.md (1 hunks)
  • docs/bridge/docs/02-Bridge/index.md (1 hunks)
💤 Files with no reviewable changes (1)
  • docs/bridge/docs/01-About/03-Routes.md
✅ Files skipped from review due to trivial changes (2)
  • docs/bridge/docs/02-Bridge/04-Sample-Code.md
  • docs/bridge/docs/02-Bridge/05-Supported-Routes.md
🔇 Additional comments (4)
docs/bridge/docs/02-Bridge/_05-Supported-Routes.md (3)

7-15: Verify the Synapse Bridge link

The content looks good and provides useful information about supported routes. However, please ensure that the link to the Synapse Bridge website is correct and functional.

Run the following script to verify the Synapse Bridge link:

#!/bin/bash
# Description: Verify the Synapse Bridge link

# Test: Check if the link is valid and returns a 200 OK status
curl -s -o /dev/null -w "%{http_code}" https://synapseprotocol.com

5-5: Verify the imported Routes component

Please ensure that the Routes component exists at the specified path and is up-to-date with the latest changes.

Run the following script to verify the existence of the Routes component:

✅ Verification successful

Please run the following script to search for the Routes component across the entire codebase:


Please run the following scripts to locate the Routes component and gather more information about its usage:


Please run the following scripts to verify the existence and modification dates of the Routes component, as well as to check its recent commit history:


Routes component exists and is up-to-date

The Routes.tsx file is present at docs/bridge/src/components/Routes.tsx and was recently updated with the latest commit 60 minutes ago. No issues detected.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the Routes component

# Test: Check if the Routes component file exists
fd -t f Routes.js Routes.jsx Routes.ts Routes.tsx -p src/components

# Test: If found, display the last modification date of the file
fd -t f Routes.js Routes.jsx Routes.ts Routes.tsx -p src/components -x stat -c "%y %n"

Length of output: 505


Script:

#!/bin/bash
# Description: Search for the Routes component in the entire repository

# Test: Check if the Routes component file exists anywhere in the repository
fd -t f Routes.js Routes.jsx Routes.ts Routes.tsx

# Test: If found, display the last modification date of the file
fd -t f Routes.js Routes.jsx Routes.ts Routes.tsx -x stat -c "%y %n"

Length of output: 544


Script:

#!/bin/bash
# Description: Search for the Routes component files in the entire repository

# Test: Find all Routes component files with common extensions
fd Routes -t f -e js -e jsx -e ts -e tsx

# Test: If found, display the last modification date of each file
fd Routes -t f -e js -e jsx -e ts -e tsx -x stat -c "%y %n"

Length of output: 560


Script:

#!/bin/bash
# Description: Search for import statements of the Routes component

# Test: Find all import statements importing Routes
rg "import\s+Routes\s+from\s+['\"](.+)['\"]" --no-filename

Length of output: 113


Script:

#!/bin/bash
# Description: Display the last modification date of the Routes component files

# Test: List Routes component files with their modification dates
ls -l docs/bridge/src/components/Routes.tsx
ls -l packages/widget/src/constants/existingBridgeRoutes.ts
ls -l packages/synapse-interface/constants/existingSwapRoutes.ts
ls -l packages/synapse-interface/constants/existingBridgeRoutes.ts
ls -l packages/synapse-interface/__tests__/__fixtures__/mockRoutes.ts

Length of output: 837


Script:

#!/bin/bash
# Description: Show the latest commits for the Routes.tsx file

# Test: Display the last 3 commits for Routes.tsx
git log -n 3 --pretty=format:"%h - %an, %ar : %s" docs/bridge/src/components/Routes.tsx

Length of output: 134


17-17: Verify the usage of the Routes component

The Routes component is used without any props. Please confirm that this is the intended usage and that the component doesn't require any additional props to function correctly.

Run the following script to check the Routes component implementation:

docs/bridge/docs/02-Bridge/index.md (1)

10-10: LGTM! Please verify the new link.

The simplification of the URL from /docs/About/Routes to /Routes looks good and aligns with the PR objectives. This change improves the documentation structure.

Could you please verify that the new link /Routes correctly points to the newly created 05-Supported-Routes.md file? Run the following script to check if the file exists and its content:

✅ Verification successful

Verified: The new link /Routes correctly points to 05-Supported-Routes.md.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and content of the Routes file

# Test 1: Check if the file exists
if fd -t f "05-Supported-Routes.md"; then
    echo "File exists."
    # Test 2: Display the content of the file
    cat $(fd -t f "05-Supported-Routes.md")
else
    echo "File not found."
fi

Length of output: 999

Comment on lines +1 to +3
---
sidebar_label: Supported Rotues
---
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typo in sidebar label

There's a typo in the sidebar label. "Rotues" should be "Routes".

Please apply the following change:

---
-sidebar_label: Supported Rotues
+sidebar_label: Supported Routes
---
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
---
sidebar_label: Supported Rotues
---
---
sidebar_label: Supported Routes
---

Copy link

cloudflare-workers-and-pages bot commented Oct 3, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: bb8b8b8
Status: ✅  Deploy successful!
Preview URL: https://fb8ef1e1.sanguine-fe.pages.dev
Branch Preview URL: https://docs-hide-routes-component.sanguine-fe.pages.dev

View logs

@trajan0x trajan0x merged commit b93ba4b into master Oct 3, 2024
30 checks passed
@trajan0x trajan0x deleted the docs/hide-routes-component branch October 3, 2024 18:16
trajan0x added a commit that referenced this pull request Oct 3, 2024
abtestingalpha added a commit that referenced this pull request Oct 7, 2024
* Revert "Hide Routes component (#3225)"

This reverts commit b93ba4b.

* Fixes img height width bug

* Refactor for checks, already imported value

---------

Co-authored-by: Trajan0x <trajan0x@users.noreply.github.com>
Co-authored-by: abtestingalpha <abtestingalpha@gmail.com>
This was referenced Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants