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

FE Release 2024-01-06 #3483

Merged
merged 2 commits into from
Jan 6, 2025
Merged

FE Release 2024-01-06 #3483

merged 2 commits into from
Jan 6, 2025

Conversation

abtestingalpha
Copy link
Collaborator

@abtestingalpha abtestingalpha commented Jan 6, 2025

Summary by CodeRabbit

  • New Features
    • Added a staking banner with a message encouraging users to stake SYN tokens for CX tokens
  • Improvements
    • Updated announcement banner with a more modular content component
    • Extended announcement banner duration to February 25, 2025
  • Chores
    • Updated package version to 0.41.4 in the changelog and package.json

39056c8: synapse-interface preview link

* Link out to staking in announcement message
Copy link
Contributor

coderabbitai bot commented Jan 6, 2025

Walkthrough

The pull request modifies the LandingPageWrapper component in the Synapse interface by introducing a new StakingBannerContent component. This component replaces the previous static banner content with a more structured approach, prompting users to stake SYN tokens for CX tokens. The change includes adding a new URL constant and extending the announcement banner's end date to February 25, 2025.

Changes

File Change Summary
packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx Added StakingBannerContent component, updated AnnouncementBanner content and end date
@/constants/urls Introduced new constant STAKE_SYN_FOR_CX_URL
packages/synapse-interface/CHANGELOG.md Added entry for version 0.41.4, indicating a version bump only
packages/synapse-interface/package.json Updated version from 0.41.3 to 0.41.4

Possibly related PRs

Suggested labels

size/s, Sol, Typescript

Suggested reviewers

  • bigboydiamonds
  • aureliusbtc

Poem

🐰 Stake your SYN, watch CX unfold
A banner bright, a story told
Modular code, with rabbit's might
Extending dates, a coding delight!
Synapse dances, tokens take flight 🚀


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9b896d0 and a100d0f.

📒 Files selected for processing (2)
  • packages/synapse-interface/CHANGELOG.md (1 hunks)
  • packages/synapse-interface/package.json (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/synapse-interface/package.json
  • packages/synapse-interface/CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: report-build-status

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 generate docstrings to generate docstrings for this PR. (Beta)
  • @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
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
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ef834d5 and 9b896d0.

📒 Files selected for processing (1)
  • packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: Deploy to Vercel (synapse-interface)
  • GitHub Check: lint
  • GitHub Check: SonarCloud
  • GitHub Check: test
  • GitHub Check: Deploy to Vercel (synapse-interface)
  • GitHub Check: test
  • GitHub Check: SonarCloud
  • GitHub Check: lint
  • GitHub Check: Analyze go
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (2)
packages/synapse-interface/components/layouts/LandingPageWrapper/index.tsx (2)

80-83: End date extension and banner content look fine.

• Updating the end date from January 25, 2025, to February 25, 2025, seems to align with the new timeline.
• Switching the inline string to the StakingBannerContent component is more modular and maintains code cleanliness.


24-24: Check correctness of the newly introduced STAKE_SYN_FOR_CX_URL import.

Everything looks fine here, but please verify that the constant name is consistent with other URL constants, and confirm that its value correctly points to the intended staking page.

Run the following script to search for other URL constants, ensuring consistency in naming and usage:

✅ Verification successful

URL constant follows established naming conventions and patterns

The STAKE_SYN_FOR_CX_URL constant is correctly named following the codebase's established URL constant patterns and points to the appropriate staking page.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any URL constants and compare naming
rg -A 2 $'_URL'

Length of output: 54586

Comment on lines +55 to +69
const StakingBannerContent = () => {
return (
<div>
Stake your SYN to receive CX (Cortex Protocol) tokens{' '}
<a
href={STAKE_SYN_FOR_CX_URL}
target="blank"
className="underline hover:cursor hover:text-white/65"
>
here
</a>
!
</div>
)
}
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 the external link to prevent security risks.

The target="blank" attribute should be target="_blank" and, as a best practice, include rel="noopener noreferrer" to reduce security vulnerabilities and prevent passing window context to other sites.

Apply the following diff to fix it:

<a
-  href={STAKE_SYN_FOR_CX_URL}
-  target="blank"
+  href={STAKE_SYN_FOR_CX_URL}
+  target="_blank"
+  rel="noopener noreferrer"
  className="underline hover:cursor hover:text-white/65"
>
📝 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
const StakingBannerContent = () => {
return (
<div>
Stake your SYN to receive CX (Cortex Protocol) tokens{' '}
<a
href={STAKE_SYN_FOR_CX_URL}
target="blank"
className="underline hover:cursor hover:text-white/65"
>
here
</a>
!
</div>
)
}
const StakingBannerContent = () => {
return (
<div>
Stake your SYN to receive CX (Cortex Protocol) tokens{' '}
<a
href={STAKE_SYN_FOR_CX_URL}
target="_blank"
rel="noopener noreferrer"
className="underline hover:cursor hover:text-white/65"
>
here
</a>
!
</div>
)
}

Copy link

cloudflare-workers-and-pages bot commented Jan 6, 2025

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: a100d0f
Status: ✅  Deploy successful!
Preview URL: https://73997f24.sanguine-fe.pages.dev
Branch Preview URL: https://snyk-fix-dee825cc72f0ba34122.sanguine-fe.pages.dev

View logs

Copy link

codecov bot commented Jan 6, 2025

Bundle Report

Changes will increase total bundle size by 385 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
synapse-interface-server-cjs 1.67MB 165 bytes (0.01%) ⬆️
synapse-interface-client-array-push 7.42MB 220 bytes (0.0%) ⬆️

@aureliusbtc aureliusbtc merged commit b73a224 into fe-release Jan 6, 2025
11 of 19 checks passed
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.

3 participants