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): Removes auto-toggling chain & token selects on hover, replacing with click action #2500

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

abtestingalpha
Copy link
Collaborator

@abtestingalpha abtestingalpha commented Apr 15, 2024

null
7889733219eaae176b6a107f244161f654190f60: synapse-interface preview link

Summary by CodeRabbit

  • New Features

    • Introduced a new hook to close the selector when clicking outside its area.
  • Enhancements

    • Improved dropdown visibility and interaction by replacing the hover state with an open state in various selectors. This change enhances user control through keyboard and mouse actions.

22cd28b1730906dffd330d76b639084e3ddd74b2: synapse-interface preview link

Copy link
Contributor

coderabbitai bot commented Apr 15, 2024

Walkthrough

The recent updates across several UI components in the Synapse Interface involve replacing the hover state with the open state for dropdown visibility and interaction management. This change enhances user experience by allowing better control and interaction consistency. Additionally, a new hook has been implemented to handle clicks outside the dropdown, ensuring it closes appropriately.

Changes

File Path Change Summary
.../ui/ChainSelector.tsx Replaced hover with open for dropdown control, key presses, and item selection.
.../ui/SelectorWrapper.tsx, .../ui/TokenSelector.tsx Updated state management from hover to open, added new imports and hooks, updated event handlers.

🐰✨
Oh hark! A change does come,
From hover to open, the dropdowns hum.
Click outside, and they shall hide,
With new states, we now abide.
Cheers to the devs, so keen and bright,
For making our dropdowns a delightful sight! 🌟
🐰💻


Recent Review Details

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 11d34d7 and 81e7931.
Files selected for processing (3)
  • packages/synapse-interface/components/ui/ChainSelector.tsx (3 hunks)
  • packages/synapse-interface/components/ui/SelectorWrapper.tsx (6 hunks)
  • packages/synapse-interface/components/ui/TokenSelector.tsx (3 hunks)
Files skipped from review as they are similar to previous changes (3)
  • packages/synapse-interface/components/ui/ChainSelector.tsx
  • packages/synapse-interface/components/ui/SelectorWrapper.tsx
  • packages/synapse-interface/components/ui/TokenSelector.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>.
    • 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 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 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.

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.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

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 Apr 15, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 81e7931
Status: ✅  Deploy successful!
Preview URL: https://03d5dcfa.sanguine-fe.pages.dev
Branch Preview URL: https://fe-remove-hover.sanguine-fe.pages.dev

View logs

Copy link

cloudflare-workers-and-pages bot commented Apr 15, 2024

Deploying sanguine with  Cloudflare Pages  Cloudflare Pages

Latest commit: 81e7931
Status: ✅  Deploy successful!
Preview URL: https://84609ba7.sanguine.pages.dev
Branch Preview URL: https://fe-remove-hover.sanguine.pages.dev

View logs

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.01766%. Comparing base (11d34d7) to head (81e7931).

Additional details and impacted files
@@                 Coverage Diff                 @@
##              master       #2500         +/-   ##
===================================================
+ Coverage   46.87958%   47.01766%   +0.13808%     
===================================================
  Files            397         384         -13     
  Lines          30685       29440       -1245     
  Branches          83          83                 
===================================================
- Hits           14385       13842        -543     
+ Misses         14781       14146        -635     
+ Partials        1519        1452         -67     
Flag Coverage Δ
cctp-relayer ?
packages 90.52734% <ø> (-0.09767%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abtestingalpha abtestingalpha merged commit beafcac into master Apr 15, 2024
42 checks passed
@abtestingalpha abtestingalpha deleted the fe/remove-hover branch April 15, 2024 15:38
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.

1 participant