feat: adds LocalStorageWithOffScreenStore, to be used in the future as a ba…
…ckup of critical data in PersistedStateManager
Description
This PR adds a class that extends the BaseStore and, in a future PR, will be used with the PersistanceManager to backup vault data in a location separate from storage.local. The data store used in this case is the localStorage within the offscreen document. localStorage is not available to us in the service worker, which is why we are using the one available to us in the offscreen document
Related issues
Fixes:
Manual testing steps
- Go to this page...
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [ ] I've followed MetaMask Contributor Docs and MetaMask Extension Coding Standards.
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using JSDoc format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). 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.
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.
Builds ready [eb231bd]
- builds: chrome, firefox
- builds (flask): chrome, firefox
- builds (MMI): chrome
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1577 ± 43 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 1403 | 1753 | 1576 | 89 | 43 |
| domContentLoaded | 1396 | 1719 | 1555 | 84 | 40 | ||
| load | 1404 | 1757 | 1577 | 89 | 43 | ||
| domInteractive | 23 | 104 | 44 | 28 | 14 | ||
| backgroundConnect | 10 | 62 | 23 | 16 | 8 | ||
| firstReactRender | 15 | 97 | 52 | 27 | 13 | ||
| getState | 4 | 58 | 12 | 14 | 7 | ||
| initialActions | 0 | 1 | 0 | 0 | 0 | ||
| loadScripts | 1007 | 1255 | 1124 | 70 | 34 | ||
| setupStore | 7 | 76 | 21 | 21 | 10 | ||
| uiStartup | 1552 | 2213 | 1833 | 156 | 75 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 136 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 100 Bytes (0.00%)
Builds ready [a004bbf]
- builds: chrome, firefox
- builds (flask): chrome, firefox
- builds (MMI): chrome
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1942 ± 211 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 303 | 3796 | 1748 | 716 | 344 |
| domContentLoaded | 1629 | 3732 | 1909 | 435 | 209 | ||
| load | 1634 | 3786 | 1942 | 440 | 211 | ||
| domInteractive | 27 | 412 | 63 | 82 | 39 | ||
| backgroundConnect | 9 | 72 | 35 | 21 | 10 | ||
| firstReactRender | 15 | 79 | 34 | 21 | 10 | ||
| getState | 6 | 59 | 17 | 16 | 7 | ||
| initialActions | 0 | 1 | 0 | 0 | 0 | ||
| loadScripts | 1212 | 2993 | 1447 | 368 | 177 | ||
| setupStore | 8 | 53 | 15 | 13 | 6 | ||
| uiStartup | 1885 | 4042 | 2189 | 447 | 214 |
This PR has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions.
This PR was closed because there has been no follow up activity in 7 days. Thank you for your contributions.