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: permit signature simulation info #24862

Merged
merged 52 commits into from
Jun 12, 2024
Merged

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented May 29, 2024

Description

Add simulation section to permit signatures

Related issues

Fixes: #24618, #24878

Manual testing steps

  1. Go to this test DAPP
  2. Submit permit signature
  3. Check that simulation section is present

Screenshots/Recordings

Screenshot 2024-06-04 at 7 06 29 PM
Screenshot 2024-06-04 at 7 09 58 PM

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • 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 format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

@jpuri jpuri added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) confirmation-redesign team-confirmations Push issues to confirmations team labels May 29, 2024
@jpuri jpuri requested review from a team as code owners May 29, 2024 12:23
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.

Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.74%. Comparing base (a85b6cf) to head (9d17164).

Current head 9d17164 differs from pull request most recent head 23f3050

Please upload reports for the commit 23f3050 to get more accurate results.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24862      +/-   ##
===========================================
+ Coverage    65.73%   65.74%   +0.02%     
===========================================
  Files         1369     1365       -4     
  Lines        54417    54274     -143     
  Branches     14161    14109      -52     
===========================================
- Hits         35766    35681      -85     
+ Misses       18651    18593      -58     

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

@metamaskbot
Copy link
Collaborator

Builds ready [11dc68b]
Page Load Metrics (888 ± 527 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint731831142814
domContentLoaded10231332
load6125748881098527
domInteractive10231332
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.27 KiB (0.05%)
  • common: 446 Bytes (0.01%)

@metamaskbot
Copy link
Collaborator

Builds ready [9d17164]
Page Load Metrics (1674 ± 689 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint713431626833
domContentLoaded106924157
load59330916741435689
domInteractive106924157
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.27 KiB (0.05%)
  • common: 134 Bytes (0.00%)

</ConfirmInfoRow>
</Box>
);
};
Copy link
Contributor

Choose a reason for hiding this comment

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

should the values be right aligned?

CleanShot 2024-06-07 at 19 46 54@2x

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @digiwand : after certain with confirm row wraps, thus this is how it will look for wider values

Copy link

@bschorchit bschorchit Jun 7, 2024

Choose a reason for hiding this comment

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

Derek had made some improvements on how we display long values within simulations here: #24036

Is this something we could re-use? Ideally, we have the same pattern in both places

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep that can be done, but I would prefer to address that in separate PR.

</Box>
</ConfirmInfoRow>
</Box>
);
Copy link
Contributor

Choose a reason for hiding this comment

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

The pill component does not appear to be aligned with the label

CleanShot 2024-06-07 at 19 49 29@2x

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Confirm info row are center aligned and its hard to change for this specifically

>
<ConfirmInfoRow
label={t('simulationDetailsTitle')}
tooltip={t('simulationDetailsTitleTooltip')}
Copy link
Contributor

Choose a reason for hiding this comment

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

CleanShot 2024-06-07 at 19 52 59@2x

  1. looks like figma users. "i" icon instead of "?" here
  2. I think we could add padding between the label and text below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Again these are limitations with ConfirmInfoRow. We need to see if its ok to generically change this for all usages.

jpuri and others added 6 commits June 7, 2024 17:38
…it-simulation/permit-simulation.tsx

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
…k/metamask-extension into permit_signature_simulation_info
@metamaskbot
Copy link
Collaborator

Builds ready [966267e]
Page Load Metrics (135 ± 172 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6913086178
domContentLoaded9211131
load421692135357172
domInteractive9211131
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 5.11 KiB (0.08%)
  • common: 97 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [966267e]
Page Load Metrics (135 ± 172 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6913086178
domContentLoaded9211131
load421692135357172
domInteractive9211131
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 5.11 KiB (0.08%)
  • common: 97 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [df189d4]
Page Load Metrics (50 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint65958184
domContentLoaded9251242
load40715074
domInteractive9251242
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 5.11 KiB (0.07%)
  • common: 97 Bytes (0.00%)

@jpuri jpuri merged commit 57b9c82 into develop Jun 12, 2024
74 checks passed
@jpuri jpuri deleted the permit_signature_simulation_info branch June 12, 2024 12:07
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jun 12, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
confirmation-redesign release-12.1.0 Issue or pull request that will be included in release 12.1.0 team-confirmations Push issues to confirmations team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Redesign Signature Permit: create simulation section
9 participants