Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
temp+fix: cp-12.13.0 fixes drag and drop in network list menu modal (#…
…30437) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR fixes an issue with the drag-and-drop functionality in the network list menu by isolating the modal animation to only use opacity instead of transform. The transform animation was interfering with the `react-beautiful-dnd` library's positioning calculations, causing the draggable items to behave incorrectly. The solution introduces a custom `network-menu-fade` animation in the `index.scss` file for the network menu modal, which only animates opacity and removes the `transform` property. This ensures the drag-and-drop functionality works as expected while maintaining a smooth fade-in animation. ### Key Changes: - Added a custom `network-menu-fade` animation in `index.scss`. - Removed `transform` from the modal to fix drag-and-drop behavior. - Isolated the animation to the network menu component to avoid affecting other modals. [](https://codespaces.new/MetaMask/metamask-extension/pull/30437?quickstart=1) ## **Related issues** Fixes: #30436 ## **Manual testing steps** 1. Open the MetaMask extension. 2. Click on the network selector in the top left corner. 3. Try to drag and reorder any of the enabled networks. 4. Verify that the drag-and-drop functionality works smoothly and the modal fades in correctly. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> - Dragging network items was inconsistent or broken due to transform interference. https://github.com/user-attachments/assets/e26cf959-c064-4f12-bad7-6c2308caf50c ### **After** <!-- [screenshots/recordings] --> - Network items can be dragged and reordered smoothly. - The modal fades in without any transform-related issues. https://github.com/user-attachments/assets/9052359d-98f6-4267-8d60-92cdef44388b ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability. - [x] I’ve included tests if applicable. - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable. - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
- Loading branch information