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: UX improvement to address blockaid performance issue #7680

Merged
merged 59 commits into from
Nov 9, 2023

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented Nov 3, 2023

Description

UX improvement for blockaid performance issue. Currently we intervene incoming transaction and blockaid UI rendering till request is validated. With the change validation is made an async background process so UI loading is not blocked for it.

Related issues

Fixes: #7521

Manual testing steps

  1. Go to test dapp.
  2. Trigger a transaction
  3. For the first transaction which takes longer loader should be visible on transaction page

Screenshots/Recordings

Screen.Recording.2023-11-07.at.9.16.51.PM.mov

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • 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 properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@jpuri jpuri added the team-confirmations-secure-ux-PR PR from the confirmations team label Nov 3, 2023
Copy link
Contributor

github-actions bot commented Nov 3, 2023

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.

@jpuri jpuri changed the title UX improvement for blockaid performance issue Feature: UX improvement to address blockaid performance issue Nov 3, 2023
@jpuri jpuri changed the title Feature: UX improvement to address blockaid performance issue feat: UX improvement to address blockaid performance issue Nov 3, 2023
@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (7ab69f4) 35.06% compared to head (cae8f72) 35.13%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7680      +/-   ##
==========================================
+ Coverage   35.06%   35.13%   +0.07%     
==========================================
  Files        1034     1036       +2     
  Lines       27532    27576      +44     
  Branches     2302     2315      +13     
==========================================
+ Hits         9653     9689      +36     
- Misses      17362    17367       +5     
- Partials      517      520       +3     
Files Coverage Δ
app/actions/signatureRequest/index.ts 100.00% <100.00%> (ø)
app/actions/transaction/index.js 33.33% <100.00%> (+4.76%) ⬆️
...ponents/UI/BlockaidBanner/BlockaidBanner.styles.ts 100.00% <ø> (ø)
app/components/UI/MessageSign/MessageSign.tsx 68.29% <ø> (ø)
app/components/UI/PersonalSign/PersonalSign.tsx 75.47% <100.00%> (+0.96%) ⬆️
app/components/UI/SignatureRequest/Root/Root.tsx 76.47% <100.00%> (+3.13%) ⬆️
app/components/UI/SignatureRequest/index.js 58.00% <100.00%> (+0.85%) ⬆️
app/components/UI/TypedSign/index.js 66.07% <ø> (ø)
app/core/RPCMethods/RPCMethodMiddleware.ts 46.06% <100.00%> (ø)
app/core/RPCMethods/eth_sendTransaction.ts 93.33% <100.00%> (ø)
... and 5 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

blackdevelopa
blackdevelopa previously approved these changes Nov 9, 2023
Copy link

sonarcloud bot commented Nov 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

88.6% 88.6% Coverage
0.0% 0.0% Duplication

@jpuri jpuri merged commit d37ea80 into main Nov 9, 2023
26 checks passed
@jpuri jpuri deleted the blockaid_performance_ux_improvement branch November 9, 2023 23:57
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2023
@metamaskbot metamaskbot added the release-7.12.0 Issue or pull request that will be included in release 7.12.0 label Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.12.0 Issue or pull request that will be included in release 7.12.0 team-confirmations-secure-ux-PR PR from the confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: PPOM - It takes too long to trigger the transaction modal with the feature enabled
5 participants