Skip to content

Commit

Permalink
UX: Faster perceived performance of popup (#21015)
Browse files Browse the repository at this point in the history
## **Description**
With #20843 we made
JavaScript for the extension load asynchronously, which helped to get
the popup displaying faster. Unfortunately with a timeout of `0` to kick
off the process, the popup still acts as though it's blocking (not
async). By adding a small timeout, the popup display *much faster*.

## **Manual testing steps**

1. On current `develop`, mentally note how much time it takes for the
popup to display
2. Check out this PR
3. Restart the extension
4. See that the popup displays *much* faster!

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained:
  - [ ] What problem this PR is solving.
  - [ ] How this problem was solved.
  - [ ] How reviewers can test my changes.
- [ ] I’ve indicated what issue this PR is linked to: Fixes #???
- [ ] I’ve included tests if applicable.
- [ ] I’ve documented any added code.
- [ ] 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)).
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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
darkwing authored Sep 25, 2023
1 parent 4ee7157 commit 8a16141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/scripts/load-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ setTimeout(() => {
document.documentElement.classList.add('metamask-loaded');
}
}
}, 0);
}, 10);

0 comments on commit 8a16141

Please sign in to comment.