-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
refactor: Unflatten tests #28776
Draft
MajorLift
wants to merge
86
commits into
jongsun/perf/redux/241204-unflatten-metamask-slice
Choose a base branch
from
jongsun/perf/redux/241127-unflatten-downstream-references-to-metamask-slice
base: jongsun/perf/redux/241204-unflatten-metamask-slice
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
refactor: Unflatten tests #28776
MajorLift
wants to merge
86
commits into
jongsun/perf/redux/241204-unflatten-metamask-slice
from
jongsun/perf/redux/241127-unflatten-downstream-references-to-metamask-slice
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
7 tasks
a7fc45e
to
907d672
Compare
a1fba1d
to
b75f215
Compare
907d672
to
fddacbc
Compare
b75f215
to
5317fec
Compare
…e-ui-properties-to-appstate-slice
fddacbc
to
f5b6067
Compare
817dfc4
to
0565217
Compare
Define types for metamask controller stores
… are assigned composed controller state objects
cf9e3ae
to
f854428
Compare
metamask
Redux slice (5/5)metamask
Redux slice (5/5)
56716cd
to
62df3ae
Compare
b5ddb61
to
62d01dd
Compare
1add77c
to
c47ed91
Compare
metamask
Redux slice (5/5)metamask
Redux slice (6/6)
metamask
Redux slice (6/6)metamask
Redux slice (6/6)
27 tasks
metamask
Redux slice (6/6)
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 13, 2025
…ate` slice (#28703) ## **Description** 1. Moves properties in the `metamask` Redux slice that are not part of background (i.e. controller-derived) state into the `appState` slice. The affected state properties are as follows: ``` customNonceValue: string; isAccountMenuOpen: boolean; isNetworkMenuOpen: boolean; nextNonce: string | null; pendingTokens: { [address: string]: Token & { isCustom?: boolean; unlisted?: boolean }; }; welcomeScreenSeen: boolean; confirmationExchangeRates: ContractExchangeRates; ``` - Foreground properties that are a part of `AppStateController` state have not been moved into the `appState` slice, and will remain in the unflattened `metamask` slice. - It's not immediately clear why the properties listed above were excluded from `AppStateController` state, but since all of them appear to neither require persistence beyond a given session, nor anonymization of PII, I'm opting to maintain the status quo and keep them out of controller state. - The `isInitialized` property is not included, because it's derived from background state before the Redux store is instantiated, and is updated by the `PatchStore` which supplies it directly to the `metamask` slice. 2. Groups `appState` slice selectors in `ui/selectors/selectors.js` together. [](https://codespaces.new/MetaMask/metamask-extension/pull/28703?quickstart=1) ## **Related issues** - Closes #29601 - Closes MetaMask/MetaMask-planning#2895 - 0 of 7 PRs that will close #29600 - Blocking MetaMask/MetaMask-planning#2894 - #28723 - #28929 - #28776 ## **Manual testing steps** ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **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.
c47ed91
to
7af2f6a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
DO-NOT-MERGE
Pull requests that should not be merged
team-extension-platform
Extension Platform team
team-tiger
Tiger team (for tech debt reduction + performance improvements)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Remaining downstream references to
metamask
slice, post-unflattening of selectors, hooks, mock objects:state\.metamask\.(?!(\w+Controller|AccountTracker|SnapsRegistry))
*.test.*
''
80 results - 11 files
Related issues
metamask
Redux slice #29600Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist