feat: Refactor and update permission-connect UI#23557
Conversation
|
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. |
95818cd to
28db694
Compare
Builds ready [6394d20]
Page Load Metrics (1641 ± 396 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
ui/components/app/snaps/snap-authorship-header/snap-authorship-header.js
Outdated
Show resolved
Hide resolved
Builds ready [976d99a]
Page Load Metrics (894 ± 484 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #23557 +/- ##
===========================================
+ Coverage 67.47% 67.52% +0.05%
===========================================
Files 1257 1258 +1
Lines 49228 49207 -21
Branches 12819 12809 -10
===========================================
+ Hits 33216 33227 +11
+ Misses 16012 15980 -32 ☔ View full report in Codecov by Sentry. |
Builds ready [73c71a1]
Page Load Metrics (485 ± 380 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
d913c2d to
b9516c8
Compare
Builds ready [b9516c8]
Page Load Metrics (1174 ± 520 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
e7ca2c4 to
b6e78e4
Compare
Builds ready [b6e78e4]
Page Load Metrics (1589 ± 479 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [dfb3ab8]
Page Load Metrics (808 ± 477 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [0c69724]
Page Load Metrics (762 ± 441 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
0c69724 to
bd88e53
Compare
Builds ready [bd88e53]
Page Load Metrics (674 ± 433 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [a612af6]
Page Load Metrics (1403 ± 527 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
hmalik88
left a comment
There was a problem hiding this comment.
LGTM. Since we're re-doing these components, it might be worth our while to convert to functional components?
a612af6 to
52debfa
Compare
Builds ready [6ef9bbd]
Page Load Metrics (85 ± 11 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
ui/components/app/permissions-connect-footer/permissions-connect-footer.component.js
Show resolved
Hide resolved
Builds ready [da0dcb9]
Page Load Metrics (1807 ± 674 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
c96b1e7 to
510eb77
Compare
Builds ready [510eb77]
Page Load Metrics (1427 ± 646 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
510eb77 to
08cbb10
Compare
Builds ready [cc81a95]
Page Load Metrics (980 ± 581 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
cc81a95 to
b84ed15
Compare
Builds ready [b84ed15]
Page Load Metrics (984 ± 587 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
darkwing
left a comment
There was a problem hiding this comment.
Everything looks good visually but I did have some non-blocking nits.
ui/components/app/permission-connect-header/permission-connect-header.js
Outdated
Show resolved
Hide resolved
ui/components/app/permission-connect-header/permission-connect-header.js
Outdated
Show resolved
Hide resolved
Fix test and refactor code Fix lint error for unused translations Update data-test-id for select all checkbox Update permission request screen and refactor code Add PermissionConnectHeader component Revert changes in Snap Authorship Header Update button names and actions Update Snap connection UI and colors Add more UI adjustments Fix e2e tests Fix Snap e2e tests Fix account Snaps e2e test Fix test snap eth-provider Fix other snap insight related e2e tests Add another UI fixing iteration Add more UI updates for the connection flow Refactor and fix lint Fix lint Update title displaying logic for Permission Connect Header Refactor Snap permissions and fix small UI issue with permission display Fix position of last-connected account status icon Update background colors and fix some stuff Revert Snap avatar changes Fix width for Snap connect content Fix and update loading screens Update font size on account list page Update final connection result/redirect screen Update translation and font variant Adapt new e2e test Apply fix for account list pre-selected account Fix storybook error Address review requests Small refactoring Replace deprecated component for website icon Fix lint problems with locales Fix recent e2e test changes after rebase Adjust size of the titles (headingLg -> headingMd) Refactor way of getting fallback icon
fea872f to
f1ce1a6
Compare
Builds ready [f1ce1a6]
Page Load Metrics (1343 ± 554 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|



Description
This PR introduces some major code refactoring and UI updates to Connect and Permission Approval screens.
Motivation
There are several blockers encountered while trying to introduce (integrate) new features provided by Snaps Core Platform such as Dynamic Permissions.
The major reason for a blocker is the state of the current implementation of the Permission Approval component. More specifically, the large difference and inconsistencies between the UI components and overall UI structure used for the native and Snaps flows related to the permission approval features are making it close to impossible to maintain and extend with the new functionalities. Building even more fragmented conditional UI in order to introduce new features, as part of the same flows and features, would dramatically increase code complexity and maintenance demands, while resulting in poor UX/UI in the final product.
Hence, after multiple discussions inside the teams and between the different teams, it is determined that the best approach would be complete UI refactoring and consolidation of the user interface between native and Snaps flows. This PR is the first major step made in order to achieve the proposed results and unblock the new features waiting for integration.
What is done in this PR
Related issues
Fixes: #23316
Design: https://www.figma.com/file/jr7XsFvcPCnf4HOMvNWFfn/Permission-System?node-id=1%3A2&mode=dev (see facelift section).
Blocks: MetaMask/snaps#1821
Blocks: MetaMask/snaps#2088
Blocks: MetaMask/snaps#2198
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist