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: add create wallet drawer #316

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

edgarkhanzadian
Copy link
Collaborator

@edgarkhanzadian edgarkhanzadian commented Jul 25, 2024

createWallet.mov

Summary by CodeRabbit

  • New Features

    • Introduced a new modal for wallet creation in the Developer Console, enhancing user interactivity.
    • Added the AddWalletModal component for a visually appealing wallet management interface, featuring options to create, restore, and view wallet functionalities.
  • Improvements

    • Enhanced the Modal component with support for animated positioning and improved styling for a cohesive design.
  • Bug Fixes

    • Addressed consistency issues in the modal's default behavior and animations for better user experience.

Copy link

coderabbitai bot commented Jul 25, 2024

Walkthrough

The changes introduced in the mobile application enhance the wallet management functionality, particularly through the addition of a new modal for wallet creation. The DeveloperConsoleScreen integrates this modal, improving user interactivity. A new AddWalletModal component is created, offering a streamlined interface for adding and restoring wallets. Enhancements to the BottomSheetModal component improve its animation capabilities and styling, ensuring a cohesive and visually appealing user experience throughout the application.

Changes

Files Change Summary
.../wallet/developer-console.tsx
.../components/add-wallet/add-wallet-modal.tsx
Enhanced wallet management features with the addition of a modal for wallet creation in DeveloperConsoleScreen and the introduction of the AddWalletModal component for user interactions.
.../components/bottom-sheet-modal.tsx Improved modal functionality with support for animated positioning and dynamic styling for better integration with the app's theme.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant DeveloperConsoleScreen
    participant AddWalletModal

    User->>DeveloperConsoleScreen: Press "Add Wallet" Button
    DeveloperConsoleScreen->>AddWalletModal: Open Modal
    AddWalletModal-->>User: Display Wallet Options
    User->>AddWalletModal: Select "Create New Wallet"
    AddWalletModal->>DeveloperConsoleScreen: Create Wallet Process
    DeveloperConsoleScreen-->>User: Wallet Created Successfully
Loading

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.
    • @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 as 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.

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

CodeRabbit Configuration 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

@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: 2

Outside diff range, codebase verification and nitpick comments (1)
apps/mobile/src/components/bottom-sheet-modal.tsx (1)

Line range hint 109-112:
Reminder: Add tests for the new animated position functionality.

Ensure that tests are added to cover the new animated position functionality.

Do you want me to generate the unit testing code or open a GitHub issue to track this task?

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e580597 and 5d40b44.

Files ignored due to path filters (10)
  • apps/mobile/ios/Podfile.lock is excluded by !**/*.lock
  • apps/mobile/src/assets/arrow-rotate-clockwise.svg is excluded by !**/*.svg
  • apps/mobile/src/assets/color-swatch.svg is excluded by !**/*.svg
  • apps/mobile/src/assets/create-wallet-image.png is excluded by !**/*.png
  • apps/mobile/src/assets/dot-grid-horizontal.svg is excluded by !**/*.svg
  • apps/mobile/src/assets/envelope.svg is excluded by !**/*.svg
  • apps/mobile/src/assets/eye.svg is excluded by !**/*.svg
  • apps/mobile/src/assets/nfc.svg is excluded by !**/*.svg
  • apps/mobile/src/assets/plus-icon.svg is excluded by !**/*.svg
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (3)
  • apps/mobile/src/app/wallet/developer-console.tsx (4 hunks)
  • apps/mobile/src/components/add-wallet/add-wallet-modal.tsx (1 hunks)
  • apps/mobile/src/components/bottom-sheet-modal.tsx (3 hunks)
Additional comments not posted (9)
apps/mobile/src/app/wallet/developer-console.tsx (3)

1-10: LGTM! Import statements are appropriate.

The new imports are necessary for the modal functionality.


20-21: LGTM! New modal reference is correctly implemented.

The useRef hook is used appropriately to create a reference for the modal.


39-42: LGTM! Modal trigger is correctly implemented.

The PressableListItem correctly triggers the modal when pressed.

apps/mobile/src/components/bottom-sheet-modal.tsx (3)

5-9: LGTM! Import statements are appropriate.

The new imports are necessary for the animated position functionality.


74-74: LGTM! Constant declaration is appropriate.

The CLOSED_ANIMATED_POSITION constant is correctly defined and used.


76-102: LGTM! Component update is correctly implemented.

The Modal component is correctly updated to accept and use the animatedPosition prop.

apps/mobile/src/components/add-wallet/add-wallet-modal.tsx (3)

1-23: LGTM! Import statements are appropriate.

The new imports are necessary for the modal functionality.


25-65: LGTM! Component implementation is correct.

The AddWalletListItem component is well-structured and correctly handles optional props.


92-166: LGTM! Component implementation is correct.

The AddWalletModal component is well-structured and correctly uses the Modal component. The state and animated styles are appropriately managed.

@@ -59,6 +66,7 @@ export default function DeveloperConsoleScreen() {
setGetAddressesMessage(null);
}}
/>
<AddWalletModal addWalletModalRef={addWalletModalRef} />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminder: Add tests for the new modal functionality.

Ensure that tests are added to cover the new modal functionality.

Do you want me to generate the unit testing code or open a GitHub issue to track this task?

Copy link
Contributor

@pete-watters pete-watters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff! 🚀

Copy link
Collaborator

@kyranjamie kyranjamie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @edgarkhanzadian

Only improvement I'd suggestion would be to compose this UI of two component: one to handle business logic and content, another to encapsulate all the animation logic (of which there is lots).

@edgarkhanzadian
Copy link
Collaborator Author

@kyranjamie good point! I'll separate it when adding feature logic here, animations get out of hand pretty quickly

@edgarkhanzadian edgarkhanzadian added this pull request to the merge queue Jul 26, 2024
Merged via the queue into dev with commit 05360b4 Jul 26, 2024
9 checks passed
@edgarkhanzadian edgarkhanzadian deleted the feat/add-create-wallet-drawer branch July 26, 2024 09:30
@leather-bot leather-bot mentioned this pull request Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants