-
Notifications
You must be signed in to change notification settings - Fork 5k
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: Add abstraction for Snaps permissions #25175
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. |
06cac8e
to
82ef486
Compare
Builds ready [82ef486]
Page Load Metrics (46 ± 4 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #25175 +/- ##
===========================================
- Coverage 70.13% 70.06% -0.07%
===========================================
Files 1435 1422 -13
Lines 50309 49946 -363
Branches 13897 13860 -37
===========================================
- Hits 35283 34991 -292
+ Misses 15026 14955 -71 ☔ View full report in Codecov by Sentry. |
0984e69
to
2525138
Compare
Builds ready [af6896d]
Page Load Metrics (52 ± 4 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ui/components/app/snaps/snap-permissions-list/snap-permissions-list.js
Outdated
Show resolved
Hide resolved
ui/components/app/snaps/snap-permissions-list/snap-permissions-list.js
Outdated
Show resolved
Hide resolved
ui/components/app/snaps/update-snap-permission-list/update-snap-permission-list.js
Show resolved
Hide resolved
4611681
to
d352000
Compare
Builds ready [d352000]
Page Load Metrics (53 ± 4 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ui/components/app/snaps/snap-permissions-list/snap-permissions-list.js
Outdated
Show resolved
Hide resolved
ui/components/app/snaps/snap-permissions-list/snap-permissions-list.js
Outdated
Show resolved
Hide resolved
ui/components/app/snaps/snap-permissions-list/snap-permissions-list.test.js
Outdated
Show resolved
Hide resolved
ui/components/app/snaps/snap-permissions-list/snap-permissions-list.js
Outdated
Show resolved
Hide resolved
Builds ready [9a40b7e]
Page Load Metrics (63 ± 6 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
9a40b7e
to
3084981
Compare
3084981
to
d53b6db
Compare
Refactor and handle edge cases Turn off abstraction for Snap settings Fix broken unit test and refactor some stuff Fix Snap View unit test Fix lint in mock-state.json Try fixing scrolling fix hasScrolledToBottom Fix scrolling on snap update Apply some non-functional refactoring Update and refactor Permission Weights Remove unused function for permission icon Fix another edge case with required scrolling Update permission weights again Fix permission fade-overlay on Snap update Try fixing failing e2e tests Add additional e2e test fix Minor refactoring Do some requested refactoring Fix edge case when showing only less important permissions Add some comments Fix permission weight spec Add different implementation for rendering permission list Update permission weight for accounts Revert e2e test changes for accounts Fix unit test for permission list Revert some other e2e test changes as well Refactor initial show all logic Remove useMemo on Snap update Refactor usage of permission adapter Update show all initial state logic for update
5796676
to
1ea21d9
Compare
Builds ready [1ea21d9]
Page Load Metrics (274 ± 301 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ui/pages/permissions-connect/snaps/snap-install/snap-install.js
Outdated
Show resolved
Hide resolved
ui/components/app/snaps/update-snap-permission-list/update-snap-permission-list.js
Outdated
Show resolved
Hide resolved
ui/components/app/snaps/snap-permissions-list/snap-permissions-list.js
Outdated
Show resolved
Hide resolved
Builds ready [4af4851]
Page Load Metrics (460 ± 354 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Quality Gate passedIssues Measures |
Builds ready [1861d6e]
Page Load Metrics (146 ± 182 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Add abstraction for Snaps permissions. Permissions under certain weight threshold are hidden, following the rules described in the related task.
Change summary
useScrollRequired
in order to handle the new scrolling behavior requested by @eriknson. The new requirement is to never show scroll arrow (requirement) again, if the user has scrolled to the bottom once.SnapPermissionAdapter
is added to avoid further code complication and duplication. This component will handle displaying final set of permissions.shared/constants/permissions.ts
.Notes
(For reviewers) Some small fragments of UI might be different from the design sources linked. This is outcome of the several discussions between me and @eriknson. For more information contact me or @eriknson.
Related issues
Fixes: MetaMask/snaps#2235
Manual testing steps
Screenshots/Recordings
Before
Before there was no "See all permissions" and similar functionalities related to the scrolling. I think that's the only thing that could compare. There is probably no need to screenshot everything from before, etc. QA to verify.
After
Pre-merge author checklist
Pre-merge reviewer checklist