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

fix (cherry-pick): UX: Multichain: Fix dead network problem when switching tabs (#25425) #25669

Merged

Conversation

darkwing
Copy link
Contributor

@darkwing darkwing commented Jul 3, 2024

(Submitting as placeholder until previous cherry-picks are in, will rebase on that to fix merge conflict)

This PR ensures that a connection to a given network does not block the UI when switching to a dapp tab that remembers that down network, thus preventing a non-respondent network from not displaying the MetaMask UI

Open in GitHub Codespaces

Fixes: #25588

  1. Start local ganache

  2. Add the local network to your network listing (Settings -> Networks -> Add custom network)

  3. In tab 1, connect to dapp 1 on Localhost

  4. In tab 2, connect to dapp 2 on Ethereum Mainnet

  5. Kill local ganache

  6. Click tab 1

  7. Click the MetaMask icon in the extension bar

  8. See UI pop up as expected

  9. Start local ganache

  10. Add the local network to your network listing (Settings -> Networks -> Add custom network)

  11. In tab 1, connect to dapp 1 on Localhost

  12. In tab 2, connect to dapp 2 on Ethereum Mainnet

  13. Kill local ganache

  14. Click tab 1

  15. Trigger a transaction from the dapp

  16. See UI pop up quickly, with confirmation, as expected

  • 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.

  • 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.


Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

…5425)

<!--
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.
-->

This PR ensures that a connection to a given network does not block the
UI when switching to a dapp tab that remembers that down network, thus
preventing a non-respondent network from not displaying the MetaMask UI

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25425?quickstart=1)

Fixes: #25588

1. Start local ganache
2. Add the local network to your network listing (Settings -> Networks
-> Add custom network)
3. In tab 1, connect to dapp 1 on Localhost
4. In tab 2, connect to dapp 2 on Ethereum Mainnet
5. Kill local ganache
6. Click tab 1
7. Click the MetaMask icon in the extension bar
8. See UI pop up as expected

1. Start local ganache
2. Add the local network to your network listing (Settings -> Networks
-> Add custom network)
3. In tab 1, connect to dapp 1 on Localhost
4. In tab 2, connect to dapp 2 on Ethereum Mainnet
5. Kill local ganache
6. Click tab 1
7. Trigger a transaction from the dapp
8. See UI pop up quickly, with confirmation, as expected

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

<!-- [screenshots/recordings] -->

<!-- [screenshots/recordings] -->

- [ ] 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.

- [ ] 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.

---------

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
@darkwing darkwing requested a review from a team as a code owner July 3, 2024 22:15
@darkwing darkwing changed the title fix: UX: Multichain: Fix dead network problem when switching tabs (#25425) fix (cherry-pick): UX: Multichain: Fix dead network problem when switching tabs (#25425) Jul 3, 2024
Copy link
Contributor

github-actions bot commented Jul 3, 2024

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.

@danjm danjm merged commit 45e178f into Version-v12.0.0 Jul 9, 2024
72 of 80 checks passed
@danjm danjm deleted the Version-v12.0.0.0-cherrypick-unresponsive-network branch July 9, 2024 16:32
@github-actions github-actions bot locked and limited conversation to collaborators Jul 9, 2024
@metamaskbot metamaskbot added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Jul 9, 2024
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-12.0.0 on PR, as PR was cherry-picked in branch 12.0.0.

@danjm danjm restored the Version-v12.0.0.0-cherrypick-unresponsive-network branch July 10, 2024 13:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.0.0 Issue or pull request that will be included in release 12.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants