-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: address the issue where account menu remains open on remove profile in extension mode #1532
Conversation
WalkthroughThe changes involve modifications to the Changes
Assessment against linked issues
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
CodeRabbit Configuration File (
|
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/FullScreenAccountMenu.tsx (3 hunks)
- packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/ProfileMenu.tsx (3 hunks)
- packages/extension-polkagate/src/partials/AccountMenu.tsx (1 hunks)
Additional comments not posted (4)
packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/FullScreenAccountMenu.tsx (2)
23-23
: Simplified Component Interface: Removal ofsetAnchorEl
The removal of the
setAnchorEl
prop from theMenus
component simplifies its interface, which is a positive change assuming the state management responsibility has been appropriately shifted elsewhere. This should make the component easier to maintain and less error-prone.
120-120
: Improved Modularity: Replacement ofsetUpperAnchorEl
withcloseParentMenu
Replacing
setUpperAnchorEl
withcloseParentMenu
in theProfileMenu
component is a good practice as it shifts the responsibility of closing the menu to the parent component. This change enhances modularity and separation of concerns, aligning with best practices in component-based architecture.packages/extension-polkagate/src/partials/AccountMenu.tsx (1)
138-138
: Enhanced User Interaction: Addition ofcloseParentMenu
PropThe addition of the
closeParentMenu
prop to theProfileMenu
component withinAccountMenu
enhances the functionality by providing a direct method to manage menu visibility. This change likely improves user interaction and responsiveness of the component.packages/extension-polkagate/src/fullscreen/homeFullScreen/partials/ProfileMenu.tsx (1)
16-16
: Refactoring for Better Separation of ConcernsThe changes in the
ProfileMenu
component, specifically the replacement ofsetUpperAnchorEl
withcloseParentMenu
, reflect a significant refactoring aimed at improving the separation of concerns. This adjustment allows the parent component to handle the closing of the menu, which is a cleaner and more modular approach. The updatedhandleClose
function now properly utilizescloseParentMenu
, ensuring that the menu closure is managed externally as intended.Also applies to: 183-200
closes #1531
Summary by CodeRabbit
New Features
ProfileMenu
component to include a newcloseParentMenu
functionality, improving user interaction by allowing the parent menu to be closed more intuitively.Menus
component by removing unnecessary props, streamlining its interface for better usability.Bug Fixes