Skip to content
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

updated onClick of close button to call the same autohide fxn as the … #18504

Merged
merged 6 commits into from
Apr 17, 2023

Conversation

dswilson4
Copy link
Contributor

@dswilson4 dswilson4 commented Apr 7, 2023

…NFT import removal

Explanation

Referenced issue:
#18485

Problem: after adding an NFT, I cannot close the Toast Notification by clicking on the cross sign.

There's an onAutoHide fxn that is used in the removeNftMessage <ButtonIcon/> component to close the toast notification that wasn't being called in the newNftAddedMessage component. Calling this in an onClick allows the toast notification to close without relying on the autohide duration.

Screenshots/Screencaps

Before

oldNFTImportButton

After

newNFTImportButton

Manual Testing Steps

  1. Checkout and build yarn start
  2. I used the E2E test app to deploy a collection and mint a test NFT on Goerli here https://metamask.github.io/test-dapp/ if you don't have an NFT
  3. Once your connected wallet owns an NFT, input the collection + NFT ID into the fields after clicking import
  4. Try to click the x to close the toast notification, should work on this branch but not develop. The remove nft toast notification should work on both branches

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving
    • How this problem was solved
    • How reviewers can test my changes
  • Sufficient automated test coverage has been added

Pre-merge reviewer checklist

  • Manual testing (e.g. pull and build branch, run in browser, test code being changed)
  • PR is linked to the appropriate GitHub issue
  • IF this PR fixes a bug in the release milestone, add this PR to the release milestone

If further QA is required (e.g. new feature, complex testing steps, large refactor), add the Extension QA Board label.

In this case, a QA Engineer approval will be be required.

@dswilson4 dswilson4 requested a review from a team as a code owner April 7, 2023 03:10
@dswilson4 dswilson4 requested a review from montelaidev April 7, 2023 03:10
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

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.

@dswilson4
Copy link
Contributor Author

dswilson4 commented Apr 7, 2023

@georgewrmarshall @seaona

Copy link

@Pistondo Pistondo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@seaona
Copy link
Contributor

seaona commented Apr 14, 2023

I've re-run the failing pipeline.
From QA looks good @dswilson4 ! Nice work!

@seaona seaona merged commit ca10a1c into MetaMask:develop Apr 17, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants