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

Adding new venues to docs #3443

Closed
wants to merge 9 commits into from
Closed

Adding new venues to docs #3443

wants to merge 9 commits into from

Conversation

Defi-Moses
Copy link
Collaborator

@Defi-Moses Defi-Moses commented Dec 8, 2024

Description
A clear and concise description of the features you're adding in this pull request.

Additional context
Add any other context about the problem you're solving.

Metadata

  • Fixes #[Link to Issue]

Summary by CodeRabbit

Release Notes

  • New Features

    • Added new liquidity venues for the $SYN token: HTX, Kraken, and KuCoin, with links for trading.
  • Improvements

    • Enhanced localization for multiple languages (English, Spanish, French, Japanese, Turkish, Chinese) with updated translations and improved clarity in user interface elements.
  • Bug Fixes

    • Updated punctuation for consistency in English localization entries.
    • Added warnings regarding potential risks associated with specific bridges in the localization files.

9fa75a5: docs preview link

Copy link
Contributor

coderabbitai bot commented Dec 8, 2024

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 eslint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/synapse-interface/components/toast/index.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Failed to load parser '@babel/eslint-parser' declared in 'packages/synapse-interface/.eslintrc.js': Cannot find module '@babel/core/package.json'
Require stack:

  • /node_modules/@babel/eslint-parser/lib/parse.cjs
  • /node_modules/@babel/eslint-parser/lib/index.cjs
  • /node_modules/@eslint/eslintrc/dist/eslintrc.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Function.resolve (node:internal/modules/helpers:145:19)
    at Object. (/node_modules/@babel/eslint-parser/lib/parse.cjs:14:19)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
    at Module._load (node:internal/modules/cjs/loader:1127:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)

Walkthrough

The pull request introduces updates to the documentation and localization files for the Synapse interface. Specifically, it adds new liquidity venues for the $SYN token in the documentation and enhances the localization files for multiple languages, ensuring consistency and clarity in user interface text. Additionally, it updates toast notification components in the interface, replacing existing components with new ones from the react-hot-toast library.

Changes

File Path Change Summary
docs/bridge/docs/01-About/04-SYN.md Added entries for new liquidity venues: HTX, Kraken, and KuCoin with corresponding links.
packages/synapse-interface/components/toast/index.tsx Updated toast notification components to use HotToaster and HotToastBar from react-hot-toast.
packages/synapse-interface/messages/en-US.json Added periods for consistency in punctuation; updated warnings regarding Harmony and Fantom bridges.
packages/synapse-interface/messages/es.json Updated Spanish translations for various sections, enhancing clarity and adding new phrases.
packages/synapse-interface/messages/fr.json Updated French translations with new phrases and expanded the "Bridge" section for clarity.
packages/synapse-interface/messages/jp.json Enhanced Japanese translations across various sections, improving clarity and user guidance.
packages/synapse-interface/messages/tr.json Modified Turkish translations, including reordering and adding new strings for various sections.
packages/synapse-interface/messages/zh-CN.json Adjusted the order of entries in the Chinese localization file, ensuring consistency without new keys.

Possibly related PRs

  • feat(docs): Add SYN to docs #3441: The main PR updates the documentation for the $SYN token, which includes adding new liquidity venues and contract addresses. This is directly related to the changes made in the main PR that also updates the documentation for the $SYN token, enhancing its visibility and accessibility.

Suggested labels

M-docs, size/s

Suggested reviewers

  • trajan0x
  • aureliusbtc
  • bigboydiamonds

Poem

🐰 In the meadow, changes bloom,
New venues for $SYN find room.
Toasts now hot, translations bright,
Clarity shines, a joyful sight!
With every hop, we celebrate,
Synapse grows, oh, isn’t it great? 🌼


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

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 682ab90
Status:🚫  Build failed.

View logs

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

🧹 Outside diff range and nitpick comments (1)
packages/synapse-interface/components/toast/index.tsx (1)

Line range hint 33-33: Remove duplicate default export.

The component is already exported on line 8. This duplicate export will cause compilation errors.

-export default CustomToaster
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 58072ed and f03ce4f.

📒 Files selected for processing (8)
  • docs/bridge/docs/01-About/04-SYN.md (1 hunks)
  • packages/synapse-interface/components/toast/index.tsx (1 hunks)
  • packages/synapse-interface/messages/en-US.json (1 hunks)
  • packages/synapse-interface/messages/es.json (1 hunks)
  • packages/synapse-interface/messages/fr.json (1 hunks)
  • packages/synapse-interface/messages/jp.json (1 hunks)
  • packages/synapse-interface/messages/tr.json (1 hunks)
  • packages/synapse-interface/messages/zh-CN.json (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • packages/synapse-interface/messages/zh-CN.json
  • packages/synapse-interface/messages/en-US.json
  • packages/synapse-interface/messages/tr.json
🔇 Additional comments (5)
packages/synapse-interface/messages/jp.json (1)

347-348: Verify navigation item ordering across language files

The reordering of "Support" and "$SYN" entries should be consistent with other language files (es.json, fr.json, tr.json, zh-CN.json) to maintain a uniform navigation structure.

✅ Verification successful

Let me verify the presence and ordering of "$SYN" entries with a different command.


Let me try a different approach to check for "$SYN" entries.


Navigation item ordering is consistent across language files

The order of "Support" and "$SYN" entries is consistent across all language files (ar.json, en-US.json, es.json, fr.json, jp.json, tr.json, zh-CN.json), with "$SYN" appearing after "Support" in the navigation structure.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the order of navigation items across all language files
# Expected: Consistent ordering of "Support" and "$SYN" entries

# Find all language files and check the order of navigation items
fd -e json -d 2 . packages/synapse-interface/messages/ -x awk '
  /"Nav": {/,/}/ {
    if (/"Support":|"\\$SYN":/) {
      printf "%s: %s\n", FILENAME, $0
    }
  }
'

Length of output: 659


Script:

#!/bin/bash
# Check for $SYN entries in all language files
rg -U '"Nav": \{.*?\}' --json packages/synapse-interface/messages/ | rg '\$SYN'

Length of output: 81


Script:

#!/bin/bash
# Check for $SYN entries in all language files directly
rg -A 1 -B 1 '"Support"' packages/synapse-interface/messages/

Length of output: 2984

packages/synapse-interface/components/toast/index.tsx (1)

Line range hint 8-31: LGTM! Well-structured toast component.

The implementation follows React best practices with proper configuration for positioning, styling, and duration.

docs/bridge/docs/01-About/04-SYN.md (1)

19-21: Verify the new venue links are accessible.

The added venues and their links look well-formatted. Let's verify they are accessible.

packages/synapse-interface/messages/es.json (1)

347-348: LGTM! Nav section updates.

The reordering of "Support" and "$SYN" entries in the Nav section is consistent with the changes mentioned in the AI summary.

packages/synapse-interface/messages/fr.json (1)

347-348: LGTM! The new navigation menu items are properly translated.

The French translations for "Support" and "$SYN" are appropriate and consistent with the UI terminology.

Let's verify the consistency of these new entries across other language files:

✅ Verification successful

The translations for "Support" and "$SYN" are consistent across all language files

The verification confirms that:

  • The "Support" entry is properly translated in all language files (ar, en-US, es, fr, jp, tr, zh-CN)
  • The "$SYN" token is consistently kept as "$SYN" across all translations, which is correct as it's a symbol/token that shouldn't be translated
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the new navigation menu items exist in other language files
# Expected: Similar entries should exist in other language files (es.json, jp.json, etc.)

# Search for Support and $SYN entries in all language files
echo "Checking Support entry:"
rg -U '"Support":' packages/synapse-interface/messages/

echo -e "\nChecking \$SYN entry:"
rg -U '"\$SYN":' packages/synapse-interface/messages/

Length of output: 1644

import React from 'react'
import toast, { Toaster, ToastBar } from 'react-hot-toast'
import { Toaster as HotToaster, ToastBar as HotToastBar } from 'react-hot-toast'
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Replace any type assertions with proper types.

Using any type assertions reduces type safety. Consider using the proper types from the react-hot-toast library.

-const Toaster = HotToaster as React.FC<any>
-const ToastBar = HotToastBar as React.FC<any>
+import type { ToasterProps, ToastBarProps } from 'react-hot-toast'
+const Toaster = HotToaster as React.FC<ToasterProps>
+const ToastBar = HotToastBar as React.FC<ToastBarProps>

Also applies to: 5-6

@Defi-Moses Defi-Moses closed this Dec 8, 2024
@github-actions github-actions bot deleted the docs/add-token-info branch December 8, 2024 02:24
Copy link

codecov bot commented Dec 8, 2024

Bundle Report

Changes will decrease total bundle size by 2.71MB (-7.59%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sdk-router-@synapsecns/sdk-router-esm* 255.26kB 609 bytes (0.24%) ⬆️
sdk-router-@synapsecns/sdk-router-cjs* 527.39kB 410.15kB (349.84%) ⬆️
explorer-ui-server-cjs* 724.31kB 141.75kB (-16.37%) ⬇️
explorer-ui-client-array-push* 2.17MB 146.63kB (-6.34%) ⬇️
synapse-interface-client-array-push* 7.41MB 132.56kB (1.82%) ⬆️
synapse-interface-server-cjs* 1.66MB 160.49kB (10.74%) ⬆️
widget-cjs-esm* 271.27kB 2.03kB (-0.74%) ⬇️
docs-bridge-client-array-push 7.48MB 424.82kB (-5.38%) ⬇️
docs-bridge-server-cjs 11.83MB 3.04MB (-20.46%) ⬇️
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

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