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

feat: Editing flow #26635

Merged
merged 160 commits into from
Sep 26, 2024
Merged

feat: Editing flow #26635

merged 160 commits into from
Sep 26, 2024

Conversation

NidhiKJha
Copy link
Member

@NidhiKJha NidhiKJha commented Aug 23, 2024

This PR is to add editing flow while switching networks via dapp
This PR also includes the connections flow which includes editing

Related issues

Fixes:

  1. https://github.com/MetaMask/MetaMask-planning/issues/2683
  2. https://github.com/MetaMask/MetaMask-planning/issues/2684
  3. https://github.com/MetaMask/MetaMask-planning/issues/2697
  4. https://github.com/MetaMask/MetaMask-planning/issues/2698
  5. https://github.com/MetaMask/MetaMask-planning/issues/2663

Manual testing steps

  1. run the extension with CHAIN_PERMISSIONS flag
  2. Connect to a dapp
  3. Switch network via metamask
  4. toast should show up
  5. Then click on edit permissions, it should route to new permissions screen
  6. We have edit networks and edit accounts modal there

Screenshots/Recordings

Before

NA

After

Screen.Recording.2024-09-04.at.5.05.21.PM.mov
Screen.Recording.2024-09-04.at.5.27.57.PM.mov

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.

Copy link
Contributor

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.

@jiexi
Copy link
Contributor

jiexi commented Sep 25, 2024

Seeing an issue when switching to a network not currently permissioned for a dapp:

Great catch. Should be fixed here 1bc9e0f

Screen.Recording.2024-09-25.at.8.21.46.AM.mov

@metamaskbot
Copy link
Collaborator

Builds ready [e69d0f7]
Page Load Metrics (1751 ± 91 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint15682209175120297
domContentLoaded15552195171918388
load15692202175119091
domInteractive15187534823
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.17 KiB (0.03%)
  • ui: 28.66 KiB (0.39%)
  • common: 5.64 KiB (0.07%)

Copy link

sonarcloud bot commented Sep 25, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
59.8% Coverage on New Code (required ≥ 80%)
5.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@metamaskbot
Copy link
Collaborator

Builds ready [2429f51]
Page Load Metrics (1756 ± 67 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint23721311694361173
domContentLoaded15792088172413163
load16172134175613967
domInteractive236939157
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 1.17 KiB (0.03%)
  • ui: 28.8 KiB (0.39%)
  • common: 5.73 KiB (0.07%)

Copy link
Contributor

@adonesky1 adonesky1 left a comment

Choose a reason for hiding this comment

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

Awesome! So excited for this to go live!

});
await forceUpdateMetamaskState(dispatch);
};
}
Copy link
Member

Choose a reason for hiding this comment

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

Nit:

Suggested change
}
}

Copy link
Member

@Mrtenz Mrtenz left a comment

Choose a reason for hiding this comment

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

Snaps-related changes look good. I haven't reviewed everything else in-depth.

Copy link
Contributor

@darkwing darkwing left a comment

Choose a reason for hiding this comment

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

Nit: The Sepolia network circle doesn't have the same background color as the networks menu:

SCR-20240926-jnre

[[] as NetworkConfiguration[], [] as NetworkConfiguration[]],
),
[networkConfigurations],
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Please move this to maybe a selector or somewhere outside of this UI component if possible.

Comment on lines +2805 to +2810
// if(chains.length === 0) {
// TODO: This particular case should also occur at the same time
// that eth_accounts is revoked. When eth_accounts is revoked,
// the networkClientId for that origin should be reset to track
// the globally selected network.
// }
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Again, should this comment be removed?

@NidhiKJha NidhiKJha merged commit 7b4eb5b into develop Sep 26, 2024
76 of 77 checks passed
@NidhiKJha NidhiKJha deleted the editing-flow branch September 26, 2024 15:38
@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 26, 2024
adonesky1 pushed a commit that referenced this pull request Sep 30, 2024
…flag (#27459)

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

Recent permission flow changes introduced behind the `CHAIN_PERMISSIONS`
feature flag have broken permission connection for Snaps. This PR fixes
it by removing an incorrect forced route direct in the permission
connection component.

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

## **Related issues**

Fixes: #26635

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **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.
micaelae pushed a commit that referenced this pull request Oct 1, 2024
…flag (#27459)

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

Recent permission flow changes introduced behind the `CHAIN_PERMISSIONS`
feature flag have broken permission connection for Snaps. This PR fixes
it by removing an incorrect forced route direct in the permission
connection component.

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

## **Related issues**

Fixes: #26635

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **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.
micaelae pushed a commit that referenced this pull request Oct 1, 2024
…flag (#27459)

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

Recent permission flow changes introduced behind the `CHAIN_PERMISSIONS`
feature flag have broken permission connection for Snaps. This PR fixes
it by removing an incorrect forced route direct in the permission
connection component.

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

## **Related issues**

Fixes: #26635

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **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.
micaelae pushed a commit that referenced this pull request Oct 1, 2024
…flag (#27459)

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

Recent permission flow changes introduced behind the `CHAIN_PERMISSIONS`
feature flag have broken permission connection for Snaps. This PR fixes
it by removing an incorrect forced route direct in the permission
connection component.

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

## **Related issues**

Fixes: #26635

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **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.
micaelae pushed a commit that referenced this pull request Oct 2, 2024
…flag (#27459)

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

Recent permission flow changes introduced behind the `CHAIN_PERMISSIONS`
feature flag have broken permission connection for Snaps. This PR fixes
it by removing an incorrect forced route direct in the permission
connection component.

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

## **Related issues**

Fixes: #26635

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **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.
micaelae pushed a commit that referenced this pull request Oct 2, 2024
…flag (#27459)

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

Recent permission flow changes introduced behind the `CHAIN_PERMISSIONS`
feature flag have broken permission connection for Snaps. This PR fixes
it by removing an incorrect forced route direct in the permission
connection component.

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

## **Related issues**

Fixes: #26635

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
INVALID-PR-TEMPLATE PR's body doesn't match template needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. release-12.6.0 Issue or pull request that will be included in release 12.6.0 team-wallet-ux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants