-
Notifications
You must be signed in to change notification settings - Fork 32
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
Conversation
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
packages/synapse-interface/components/toast/index.tsxOops! 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'
WalkthroughThe 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 Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this 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
📒 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' |
There was a problem hiding this comment.
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
Bundle ReportChanges will decrease total bundle size by 2.71MB (-7.59%) ⬇️. This is within the configured threshold ✅ Detailed changes
ℹ️ *Bundle size includes cached data from a previous commit |
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
Summary by CodeRabbit
Release Notes
New Features
Improvements
Bug Fixes
9fa75a5: docs preview link