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

feat(synapse-interface): maintenance notification components + eth dencun pause #2260

Merged
merged 34 commits into from
Mar 13, 2024

Conversation

bigboydiamonds
Copy link
Collaborator

@bigboydiamonds bigboydiamonds commented Mar 13, 2024

Description
Create reusable Announcement Banner and Countdown Progress Bar to be used for site wide announcements

Banner and Progress Bar will take in start time, end time values to automatically handle displaying/hiding annoucements and countdown.

Metadata

4b3d53668f8dc800d264c81a629582ef9bcf9890: synapse-interface preview link

Summary by CodeRabbit

  • New Features
    • Introduced an announcement banner for the Eth Dencun upgrade, including display scheduling.
    • Added a dynamic, animated progress bar component for visualizing progress based on time.
    • Implemented an event countdown progress bar for displaying and updating based on event progression.
    • Updated the bridge transaction button to handle bridge pausing scenarios.
    • Integrated countdown progress bar components to visualize the Eth Dencun upgrade progression on the bridge page.

2a146ab3c88275a2c2ff168d983c7f7f2f10dbb3: synapse-interface preview link
c44cf5bc5fb4216cf40443d35594d34b36753165: synapse-interface preview link
77b5ac0ada03d95be01cdd8e7e50cb8188397d39: synapse-interface preview link
42a9e5992b645a24f5fcffa87f1622fb842794ec: synapse-interface preview link
2d39823d2e894f3133393bcaeca68c4a1604f15a: synapse-interface preview link
d3e1e7399d5f5a181f2b02081803add72644ac53: synapse-interface preview link
39b3c5686cdc6f873922a94761234813ae6ad23b: synapse-interface preview link
5cdbd0dbbf25847857622d2e450165159808f525: synapse-interface preview link
fd71f6d3160614949c7615713d13a0c67162299a: synapse-interface preview link
71cc87b2e514392d1e6d531da2a74cea94288194: synapse-interface preview link
1feff46337d5db4651497f3bb3f2a6728d4bb937: synapse-interface preview link

Copy link
Contributor

coderabbitai bot commented Mar 13, 2024

Warning

Rate Limit Exceeded

@aureliusbtc has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 54 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 3bfa59f and 20fea1d.

Walkthrough

The recent update introduces enhancements to the maintenance and functionality of the Synapse interface, focusing on user interaction during specific events and bridge transactions. Notably, it adds a feature to display an announcement for the Eth Dencun upgrade and integrates dynamic, animated progress bars to visually represent the time-related aspects of events and maintenance activities. Additionally, the update improves the bridge transaction process by allowing for the handling of paused states, ensuring a smoother user experience.

Changes

Files Summary
.../Maintenance/EthDencunUpgrade.tsx
.../Maintenance/LinearAnimatedProgressBar.tsx
.../Maintenance/EventCountdownProgressBar.tsx
Introduced announcement and dynamic progress bars for events, including the Eth Dencun upgrade.
.../StateManagedBridge/BridgeTransactionButton.tsx
.../pages/state-managed-bridge/index.tsx
Enhanced bridge transaction functionality with pause handling and integrated event countdown progress bar.

🐇✨
In the land of code and pixel bright,
Changes dance in the moon's soft light.
Progress bars in motion, sleek and fine,
Marking time 'til upgrades entwine.
Amidst the bits, a pause, a play,
Our bridge stands strong, come what may.
🌉💾🚀

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>.
    • Generate unit-tests 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 tests 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

cloudflare-workers-and-pages bot commented Mar 13, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3bfa59f
Status: ✅  Deploy successful!
Preview URL: https://48f8a24c.sanguine-fe.pages.dev
Branch Preview URL: https://fe-upgrade-bridge-pause.sanguine-fe.pages.dev

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.

Review Status

Actionable comments generated: 4

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between f6e4834 and 1861820.
Files selected for processing (9)
  • packages/synapse-interface/components/Banner.tsx (2 hunks)
  • packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx (1 hunks)
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx (1 hunks)
  • packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx (1 hunks)
  • packages/synapse-interface/components/Maintenance/UpgradeProgressBar.tsx (1 hunks)
  • packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx (3 hunks)
  • packages/synapse-interface/constants/chains/index.tsx (1 hunks)
  • packages/synapse-interface/pages/index.tsx (2 hunks)
  • packages/synapse-interface/pages/state-managed-bridge/index.tsx (3 hunks)
Check Runs (12)
Deploy to Vercel (synapse-interface) completed (4)
Get PR Metadata completed (2)
test completed (6)
Change Detection completed (13)
general-linters completed (1)
lint completed (2)
label-statuses completed (3)
changesets-integrity-checker completed (2)
cypress-integration-tests completed (3)
changes completed (1)
pr-labeler completed (2)
Build (1.21.x, ubuntu-latest) completed (2)
Additional comments: 15
packages/synapse-interface/pages/index.tsx (1)
  • 6-6: The import of EthDencunUpgradeBanner from @/components/Maintenance/EthDencunUpgrade is correctly implemented. Ensure that the component is tested thoroughly, especially its responsiveness and behavior when the maintenance period is active or inactive.
packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx (2)
  • 5-9: The test values for the Eth Dencun upgrade start and end times are clearly defined. For production deployment, ensure these values accurately reflect the actual maintenance schedule.
  • 19-33: The EthDencunUpgradeBanner component is well-implemented, with clear messaging about the maintenance period. Ensure that the text is accessible and easily understandable by all users.
packages/synapse-interface/constants/chains/index.tsx (1)
  • 42-42: The addition of PAUSED_GLOBAL_BRIDGE with a value of true is correctly implemented. Ensure that this constant is used consistently across the application to manage the bridge's paused state effectively.
packages/synapse-interface/components/Maintenance/UpgradeProgressBar.tsx (1)
  • 4-48: The useUpgradeProgressBar hook is well-structured, providing a clear mechanism for tracking the progress of maintenance activities. Ensure that the interval timer is optimized to avoid unnecessary re-renders or performance issues.
packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx (1)
  • 10-108: The AnnouncementBanner component is well-implemented, with thoughtful use of local storage to manage banner visibility. Ensure that the component's behavior is thoroughly tested, particularly the logic for showing/hiding the banner based on start/end times and user interaction.
packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx (1)
  • 10-109: The LinearAnimatedProgressBar component is correctly implemented, with thoughtful use of SVG animations to represent progress. Ensure that the animation performance is optimized for all devices and that the component is accessible.
packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx (3)
  • 24-24: The addition of the isBridgePaused parameter to the BridgeTransactionButton component props is correctly implemented. Ensure that the paused state is handled securely and consistently across the application.
  • 79-80: The logic to disable the button based on various conditions, including the bridge's paused state, is correctly implemented. Ensure that all conditions are thoroughly tested to prevent unintended behavior.
  • 91-96: The handling of the bridge's paused state with a specific label is a good user experience practice. Consider adding a tooltip or modal to provide users with more information about the pause and expected resume time.
packages/synapse-interface/components/Banner.tsx (2)
  • 3-3: Updating the BANNER_VERSION constant to '5' is a good practice for versioning and managing changes to the banner content. Ensure that this versioning strategy is consistently applied across the application.
  • 228-230: The revised content within the InterruptedServiceBanner component clearly communicates the offline status and expected return time of the Bridge + RFQ service. Ensure that the message is accessible and easily understandable by all users.
packages/synapse-interface/pages/state-managed-bridge/index.tsx (3)
  • 89-93: The imports for useUpgradeProgressBar, ETH_DENCUN_START_DATE, and ETH_DENCUN_END_DATE are correctly added to support the new maintenance notification and progress tracking features. Ensure that these new components and constants are thoroughly tested, especially their edge cases around the start and end times of the maintenance period.
  • 526-533: The use of useUpgradeProgressBar hook to manage the state of the upgrade progress bar is a good practice. It encapsulates the logic for determining if an upgrade is pending and provides the EthDencunUpgradeProgressBar component for rendering. However, ensure that the logic within useUpgradeProgressBar correctly handles time zone differences and edge cases, such as when the current time is exactly on the start or end date.
  • 632-636: Modifying the BridgeTransactionButton component to consider isBridgePaused by passing isUpgradePending as a prop is a crucial update for handling the bridge service's paused state. This ensures that users cannot initiate new transactions during maintenance periods. Make sure to test this behavior thoroughly, including the UI feedback to the user when the bridge is paused.

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 1861820 and e491a8a.
Files selected for processing (2)
  • packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx (1 hunks)
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx (1 hunks)
Check Runs (12)
Build (1.21.x, ubuntu-latest) completed (2)
Deploy to Vercel (synapse-interface) completed (4)
Get PR Metadata completed (2)
Change Detection completed (13)
general-linters completed (1)
cypress-integration-tests completed (3)
lint completed (2)
changes completed (1)
test completed (6)
label-statuses completed (3)
changesets-integrity-checker completed (2)
pr-labeler completed (2)
Files skipped from review as they are similar to previous changes (2)
  • packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx

@bigboydiamonds bigboydiamonds changed the title feat(synapse-interface): maintenance notification components feat(synapse-interface): maintenance notification components + eth dencun pause Mar 13, 2024
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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between e491a8a and dfe940c.
Files selected for processing (5)
  • packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx (1 hunks)
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx (1 hunks)
  • packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx (1 hunks)
  • packages/synapse-interface/components/Maintenance/UpgradeProgressBar.tsx (1 hunks)
  • packages/synapse-interface/pages/state-managed-bridge/index.tsx (3 hunks)
Check Runs (8)
Get PR Metadata completed (2)
general-linters completed (2)
SonarCloud completed (2)
test completed (1)
Change Detection completed (13)
lint completed (1)
cypress-integration-tests completed (1)
build-goreleaser completed (2)
Files skipped from review as they are similar to previous changes (5)
  • packages/synapse-interface/components/Maintenance/AnnouncementBanner.tsx
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx
  • packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx
  • packages/synapse-interface/components/Maintenance/UpgradeProgressBar.tsx
  • packages/synapse-interface/pages/state-managed-bridge/index.tsx

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.

Review Status

Actionable comments generated: 1

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between dfe940c and ab16f63.
Files selected for processing (5)
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx (1 hunks)
  • packages/synapse-interface/components/Maintenance/EventCountdownProgressBar.tsx (1 hunks)
  • packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx (1 hunks)
  • packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx (4 hunks)
  • packages/synapse-interface/pages/state-managed-bridge/index.tsx (3 hunks)
Check Runs (12)
Build (1.21.x, ubuntu-latest) completed (2)
Deploy to Vercel (synapse-interface) completed (4)
Get PR Metadata completed (2)
test completed (6)
general-linters completed (1)
lint completed (2)
Change Detection completed (13)
cypress-integration-tests completed (2)
changesets-integrity-checker completed (2)
changes completed (1)
label-statuses completed (3)
pr-labeler completed (2)
Files skipped from review as they are similar to previous changes (4)
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx
  • packages/synapse-interface/components/Maintenance/LinearAnimatedProgressBar.tsx
  • packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx
  • packages/synapse-interface/pages/state-managed-bridge/index.tsx
Additional comments: 1
packages/synapse-interface/components/Maintenance/EventCountdownProgressBar.tsx (1)
  • 52-91: The EventCountdownProgressBar component is designed to render based on the event's status. A few suggestions for refinement:
  • Accessibility: Ensure that the progress bar is accessible. This includes adding appropriate ARIA roles and properties to communicate the progress bar's state and value to screen readers.
  • Styling Consistency: Verify that the component's styling is consistent with the rest of the application. The use of utility classes suggests a Tailwind CSS framework; ensure these classes are correctly applied and responsive.
  • Conditional Rendering: The component returns null when the status is not 'pending'. Consider if there's a need to display a message or indicator when the event is complete or has not started yet, enhancing user experience.

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between ab16f63 and 5ac2b40.
Files selected for processing (1)
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx (1 hunks)
Check Runs (12)
Build (1.21.x, ubuntu-latest) completed (2)
Deploy to Vercel (synapse-interface) completed (4)
Get PR Metadata completed (2)
test completed (6)
Change Detection completed (13)
general-linters completed (1)
cypress-integration-tests completed (2)
changes completed (1)
label-statuses completed (3)
lint completed (2)
changesets-integrity-checker completed (2)
pr-labeler completed (2)
Files skipped from review as they are similar to previous changes (1)
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx

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.

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 5ac2b40 and 3bfa59f.
Files selected for processing (1)
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx (1 hunks)
Check Runs (13)
Build (1.21.x, ubuntu-latest) completed (2)
Deploy to Vercel (synapse-interface) completed (4)
Get PR Metadata completed (2)
SonarCloud completed (2)
general-linters completed (1)
test completed (1)
cypress-integration-tests completed (2)
Change Detection completed (13)
lint completed (1)
changes completed (1)
label-statuses completed (3)
pr-labeler completed (2)
changesets-integrity-checker completed (2)
Files skipped from review as they are similar to previous changes (1)
  • packages/synapse-interface/components/Maintenance/EthDencunUpgrade.tsx

@bigboydiamonds bigboydiamonds merged commit 9ffae5b into master Mar 13, 2024
37 of 40 checks passed
@bigboydiamonds bigboydiamonds deleted the fe/upgrade-bridge-pause branch March 13, 2024 06:04
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