Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: routes.component.js and creation of ToastMaster (#27735)
## **Description** This PR is part of the larger effort to add `React.lazy` to routes. I would be very surprised if I did not break functionality somewhere, as this was a large and tough refactor. It needs some good QA, and Harika has been doing some testing that has passed. Summary of what I did: - Pulled all Toast-related logic out of routes.component.js and into the new ToastMaster - Pulled everything else I could pull out into routes-helpers.js - Moved things out of the general selectors.js and actions.ts into toast-master-selectors.ts - Simplification of some Pointless Thunks™ For later PRs: - Convert routes.component.js to TypeScript - Convert routes.component.js to Hooks - Convert routes.component.js to react-router v6 - Eliminate routes.container.js [](https://codespaces.new/MetaMask/metamask-extension/pull/27735?quickstart=1) ## **Related issues** Progresses: MetaMask/MetaMask-planning#2898 ## **Manual testing steps** Test all the Routes and all the Toasts ## **Screenshots/Recordings** ### **Before** ### **After** ## **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/develop/.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/develop/.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