[Feature][Flask] Snaps settings UX v1#6443
Merged
owencraston merged 56 commits intoflaskfrom Jun 1, 2023
Merged
Conversation
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. |
gantunesr
reviewed
May 31, 2023
app/components/Views/Snaps/components/SnapDescription/SnapDescription.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapDetails/SnapDetails.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapElement/SnapElement.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapPermissions/SnapPermissions.tsx
Outdated
Show resolved
Hide resolved
Contributor
Author
|
Based on the discussion we had in our review session, I have made issues to track the work to...
|
app/components/Views/Snaps/components/SnapVersionBadge/SnapVersionBadge.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapDescription/SnapDescription.styles.tsx
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapDescription/SnapDescription.styles.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapDetails/SnapDetails.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapDetails/SnapDetails.styles.ts
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapDetails/SnapDetails.styles.ts
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapElement/SnapElement.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapPermissions/SnapPermissions.tsx
Outdated
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapPermissions/SnapPermissions.tsx
Show resolved
Hide resolved
Contributor
Author
gantunesr
reviewed
Jun 1, 2023
app/components/Views/Snaps/components/SnapPermissions/SnapPermissions.tsx
Show resolved
Hide resolved
app/components/Views/Snaps/components/SnapPermissions/test/SnapPermission.test.tsx
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Development & PR Process
release-xxlabel to identify the PR slated for a upcoming release (will be used in release discussion)needs-dev-reviewlabel when work is completedneeds-qalabel when dev review is completedQA Passedlabel when QA has signed offDescription
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?
To have better snaps UX in the settings that allows a user to understand what is installed in their wallet.
This PR adds...
The designs for this feature can be found here
This PR does not...
2. What is the improvement/solution?
Create a stack navigator for the snaps settings and put it inside the
app/components/Nav/Main/MainNavigator.js. This stack will then live in theSettingsFlowstack navigatorRemoves the old placement for the snaps workflows inside the DrawerView.
Add the entry point to the SnapsSettingsList inside the settings screen under the Networks section
Renamed the old SnapsDev screen to
SnapsSettingsList.tsxand had it render a list of SnapElements. This is the component that shows the snap name and id. When clicked it takes the user to the Settings page for a specific snap.Modified the
SnapElementcomponent to render a a Cell. This cell contains the snap name, snap id, a default icon for all snaps. I did not render the specific snap icon in this PR.Clicking on the SnapElement is brings you to a specific SnapSettings screen. This screen contains
SnapController.removeSnap(snap.id);andnavigation.goBack();The
app/components/Views/Snapscontains all of these screens and components and matches the desired file structure for components of this nature. Each component lives within its own folder, each of which have astyles.tsfile.index.tsfile, the component itself and a test folder.New Components
SnapDescription (Low Complexity)
The designs:
My Version:

SnapElement (Low Complexity)
The designs:
My version:

SnapVersionBadge (Low Complexity)
vprefix and has an icon beside it. As of now clicking this button does nothing but in the future it will most likely link to other versions of that snap.The designs:
My version:

SnapDetails (Medium Complexity)
The designs:
My Version:

SnapPermissions (High Complexity)
The designs:
My version:

Notes for reviewers
This PR is big so to help make the reviews easier, I encourage you to look at the tests to get a better understanding of the input/outputs
The tests to look at in order of importance are...
Screenshots/Recordings
Screen.Recording.2023-05-30.at.4.06.36.PM.mov
Photos:
Issue
Progresses https://github.com/MetaMask/mobile-planning/issues/1000
Checklist