You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--
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**
We were previously using a UI blocking, whole page spinner while loading
the redesigned confirmations. This overlapped with the individual
component spinners we use on some components that decode transaction
data. That second pattern is preferable because the spinner is contained
and doesn't block the user from taking action.
The global spinner comes from `routes.component`. The first part of this
fix is to bypass it in that file for redesigned confirmations.
The second aspect of this fix is to not condense two component spinners
into one. Since the transaction flow section always loads before the
send heading component, we can omit the spinner for that first
component.
Finally, this PR fixes the loading behaviour on the send heading
component so that if the decimals amount coming from `useAssetDetails`
hasn't been received yet, the heading is not shown, preventing
undesireable flickering in the hero value.
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
[](https://codespaces.new/MetaMask/metamask-extension/pull/28301?quickstart=1)
## **Related issues**
Fixes: #27972
## **Manual testing steps**
1. Go to test dapp
2. Click on malicious erc20 transfer to see the 2 spinners on top and
the different one in the middle
3. Click on malicious erc20 approve to see the different spinner in the
middle
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
<img width="362" alt="Screenshot 2024-10-18 at 18 11 08"
src="https://github.com/user-attachments/assets/9fbc5c1e-229c-4dfa-8231-4957a1ecf713">
### **After**
<!-- [screenshots/recordings] -->
https://github.com/user-attachments/assets/2f5dd8c2-3b9b-405d-b9b5-0eb8bf793fcb
## **Pre-merge author checklist**
- [ ] 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).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] 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.
Copy file name to clipboardExpand all lines: ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap
Copy file name to clipboardExpand all lines: ui/pages/confirmations/components/confirm/info/nft-token-transfer/__snapshots__/nft-token-transfer.test.tsx.snap
Copy file name to clipboardExpand all lines: ui/pages/confirmations/components/confirm/info/shared/confirm-loader/__snapshots__/confirm-loader.test.tsx.snap
Copy file name to clipboardExpand all lines: ui/pages/confirmations/components/confirm/info/shared/send-heading/__snapshots__/send-heading.test.tsx.snap
0 commit comments