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 syn token to docs #3440

Closed
wants to merge 7 commits into from
Closed

adding syn token to docs #3440

wants to merge 7 commits into from

Conversation

Defi-Moses
Copy link
Collaborator

@Defi-Moses Defi-Moses commented Dec 6, 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

    • Introduced comprehensive documentation for the $SYN token, including blockchain addresses across multiple chains and links to trading venues.
    • Added navigation links and information related to the $SYN token within the app interface.
  • Localization Updates

    • Enhanced translations for Arabic, English, Spanish, French, Japanese, Turkish, and Chinese, including new entries for the $SYN token and improved clarity in user prompts and warnings.
    • Updated warning messages regarding potential risks associated with specific bridges in multiple languages.

c4ea95b: docs preview link
5fd28d6: docs preview link
f85a0a9: docs preview link
a9a6043: docs preview link

@Defi-Moses Defi-Moses requested a review from trajan0x as a code owner December 6, 2024 16:49
Copy link
Contributor

coderabbitai bot commented Dec 6, 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 documentation for the $SYN token across multiple files, detailing its governance role within the Synapse Protocol and providing links to various trading venues. Additionally, it updates the navigation structure in the user interface to reflect these changes. Localization files for multiple languages are also updated to include new entries related to the $SYN token, enhancing user experience and accessibility for a diverse audience.

Changes

File Path Change Summary
docs/bridge/docs/05-Contracts/09-SYN.md Added a new section for "$SYN Token" with blockchain addresses and links to explorers.
docs/bridge/docs/01-About/04-SYN.md Introduced documentation for the $SYN token, detailing its governance and trading venues.
packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx Updated MoreInfoButtons in LandingNav to link to $SYN information instead of contracts.
packages/synapse-interface/constants/routes.ts Replaced INTERCHAIN_LINK with SYN_TOKEN_LINK, removed Contracts, and added SYN entry.
packages/synapse-interface/constants/urls/index.tsx Added new constant SYN_TOKEN_LINK for documentation URL of the $SYN token.
packages/synapse-interface/messages/ar.json Updated Arabic localization with new translations and entries for the $SYN token.
packages/synapse-interface/messages/en-US.json Added periods for consistency and a new entry for "$SYN" in the navigation section.
packages/synapse-interface/messages/es.json Enhanced Spanish localization with new translations and a new entry for "$SYN".
packages/synapse-interface/messages/fr.json Updated French localization with new entries and improved translations related to the $SYN token.
packages/synapse-interface/messages/jp.json Enhanced Japanese localization with new entries for "$SYN" and improved transaction-related phrases.
packages/synapse-interface/messages/tr.json Updated Turkish localization with new entries for "$SYN" and warnings about bridge risks.
packages/synapse-interface/messages/zh-CN.json Updated Chinese localization with new entries for "$SYN" and expanded warnings for bridge risks.

Possibly related PRs

Suggested labels

M-deps

Suggested reviewers

  • trajan0x
  • bigboydiamonds

🐇 In the meadow where tokens play,
The $SYN shines bright, leading the way.
With links to trade and docs to explore,
Hop along, dear friends, there's so much in store!
For every bridge and every chain,
The $SYN token brings joy, not pain! 🌟


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 3da6285 and 24a2530.

📒 Files selected for processing (1)
  • packages/synapse-interface/components/toast/index.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/synapse-interface/components/toast/index.tsx

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

cloudflare-workers-and-pages bot commented Dec 6, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 33adb11
Status: ✅  Deploy successful!
Preview URL: https://702a2ba6.sanguine-fe.pages.dev
Branch Preview URL: https://docs-add-token-info.sanguine-fe.pages.dev

View logs

Copy link

codecov bot commented Dec 6, 2024

Bundle Report

Changes will decrease total bundle size by 3.16MB (-8.86%) ⬇️. 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 117.55kB 312 bytes (0.27%) ⬆️
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.46MB 438.56kB (-5.55%) ⬇️
docs-bridge-server-cjs* 11.8MB 3.07MB (-20.66%) ⬇️
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: 0

🧹 Outside diff range and nitpick comments (2)
packages/synapse-interface/constants/urls/index.tsx (1)

28-28: LGTM! URL constant added correctly.

The SYN_TOKEN_LINK constant follows the established pattern for documentation URLs.

Consider renaming the file to index.ts since it only contains constants and no JSX.

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

347-347: Consider maintaining consistent entry ordering across language files.

While the Arabic translations for "$SYN" and "Support" (الدعم) are accurate, their order differs from other language files where "Support" comes before "$SYN". Consider reordering to maintain consistency:

-    "$SYN": "$SYN",
-    "Support": "الدعم"
+    "Support": "الدعم",
+    "$SYN": "$SYN"
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between d74569f and 1419add.

📒 Files selected for processing (11)
  • docs/bridge/docs/01-About/04-SYN.md (1 hunks)
  • packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx (1 hunks)
  • packages/synapse-interface/constants/routes.ts (2 hunks)
  • packages/synapse-interface/constants/urls/index.tsx (1 hunks)
  • packages/synapse-interface/messages/ar.json (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 (1)
  • docs/bridge/docs/01-About/04-SYN.md
🔇 Additional comments (10)
packages/synapse-interface/constants/routes.ts (2)

9-9: LGTM! Import added correctly.

The SYN_TOKEN_LINK import is properly added alongside other URL imports.


56-60: LGTM! Navigation entry follows consistent pattern.

The new SYN navigation entry follows the established pattern with all required properties (path, text, match).

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

214-216: LGTM! MoreInfoItem updated consistently.

The MoreInfoItem component is correctly updated to use the new SYN navigation entry with appropriate description text.

packages/synapse-interface/messages/zh-CN.json (1)

347-348: LGTM! Translations are accurate and consistent.

The Chinese translations for "Support" (支持) and "$SYN" ($SYN) are correctly implemented and maintain consistency with other language files.

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

347-348: LGTM! Translations are accurate and consistent.

The Japanese translations for "Support" (サポート) and "$SYN" ($SYN) are correctly implemented and maintain consistency with other language files.

packages/synapse-interface/messages/en-US.json (1)

347-348: LGTM! Navigation entries added correctly.

The new entries for "Support" and "$SYN" are properly formatted and placed in the Nav section. The token symbol is correctly preserved without translation.

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

347-348: LGTM! Navigation entries properly localized.

The new entries are correctly added with proper Turkish translation for "Support" while preserving the "$SYN" token symbol.

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

347-348: LGTM! Navigation entries properly localized.

The new entries are correctly added with proper Spanish translation for "Support" while preserving the "$SYN" token symbol.


347-348: Verify consistency across all localization files.

Let's ensure all language files have the same updates for the navigation entries.

✅ Verification successful

Navigation entries are consistent across all localization files

The verification confirms that all language files have the required entries with proper translations:

  • "Support" is correctly translated in each language: English, Arabic (الدعم), Spanish (Soporte), French (Support), Japanese (サポート), Turkish (Destek), and Chinese (支持)
  • "$SYN" token symbol is preserved consistently as "$SYN" across all language files
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistent navigation entries across all localization files
# Test: Verify that all language files have the new entries with correct format

echo "Checking Nav section entries across all language files..."
for file in $(find . -name "*.json"); do
  echo "=== $file ==="
  # Check for Support entry in Nav section
  jq -r '.Nav.Support' "$file" 2>/dev/null || echo "Missing Support entry"
  # Check for $SYN entry in Nav section
  jq -r '.Nav."$SYN"' "$file" 2>/dev/null || echo "Missing $SYN entry"
done

Length of output: 105902


Script:

#!/bin/bash
# Let's specifically check the localization files in the synapse-interface package
echo "Checking localization files for Nav section entries..."
for file in $(find ./packages/synapse-interface/messages -name "*.json"); do
  echo "=== $file ==="
  jq -r '.Nav | {Support: .Support, "$SYN": ."$SYN"}' "$file"
done

Length of output: 2545

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

347-348: LGTM! Translations follow localization best practices.

The new entries maintain consistency with French tech terminology:

  • "Support" is commonly used in French interfaces without translation
  • "$SYN" token symbol is correctly kept unchanged

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 7-7: Remove commented positioning value

There's a commented top-right value next to the active bottom-right position. Clean up the code by removing unused comments to improve readability.

-      position="bottom-right" // top-right
+      position="bottom-right"
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 314a447 and 3da6285.

📒 Files selected for processing (1)
  • packages/synapse-interface/components/toast/index.tsx (1 hunks)

@@ -26,5 +26,5 @@ export default function CustomToaster() {
</ToastBar>
)}
</Toaster>
)
) as React.ReactElement
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

Consider using proper return type annotation instead of type assertion

Instead of using a type assertion, it's better to explicitly declare the return type in the function signature for better type safety and readability.

-export default function CustomToaster() {
+export default function CustomToaster(): React.ReactElement {
   return (
     <Toaster
       // ... component content ...
     />
-  ) as React.ReactElement
+  )
 }
📝 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
) as React.ReactElement
export default function CustomToaster(): React.ReactElement {
return (
<Toaster
// ... component content ...
/>
)

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