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: Do not require scroll-to-bottom for SIWE or Signatures with simulations before enabling Confirm footer #26887

Merged
merged 20 commits into from
Sep 6, 2024

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented Sep 4, 2024

Description

  • Refactors ScrollToBottom logic
    • Renames isScrollToBottomNeeded → isScrollToBottomCompleted while inverting logic
  • Do not require scroll to bottom if the request is a Sign-in With Ethereum request
  • Do not require scroll to bottom if the signature simulation ("Estimated Changes") is shown

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3131

Manual testing steps

Test scrollable confirmation Confirm button behavior

Screenshots/Recordings

Before

After

Permit with simulation does not need to scroll to confirm, even with Blockaid warning

Sign-in With Ethereum does not need to scroll to confirm

[Existing behavior] Other scrollable confirmations will require scrolling to the bottom to confirm

Pre-merge author checklist

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.

Copy link
Contributor

github-actions bot commented Sep 4, 2024

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.

@github-actions github-actions bot added the team-confirmations Push issues to confirmations team label Sep 4, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [dcf9a9c]
Page Load Metrics (1810 ± 60 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint20420961674495238
domContentLoaded15702045178511957
load15732102181012660
domInteractive158336168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 368 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

@digiwand digiwand marked this pull request as ready for review September 5, 2024 03:50
@digiwand digiwand requested review from a team as code owners September 5, 2024 03:50
@digiwand
Copy link
Contributor Author

digiwand commented Sep 5, 2024

There is 1 flask failing test that appears to be failing on other tests

CleanShot 2024-09-05 at 01 18 24@2x

///: BEGIN:ONLY_INCLUDE_IF(build-mmi)
mmiSubmitDisabled ||
///: END:ONLY_INCLUDE_IF
hardwareWalletRequiresConnection;
Copy link
Contributor

Choose a reason for hiding this comment

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

It will be nice to create context for scroll functionality and move these logic to it - so that the logic does not goes to components like footer.

Copy link
Contributor

Choose a reason for hiding this comment

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

that can be done in separate task

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion!

I created a new, enhancement issue to address this here: #26970

jpuri
jpuri previously approved these changes Sep 5, 2024
matthewwalsh0
matthewwalsh0 previously approved these changes Sep 5, 2024
@digiwand digiwand dismissed stale reviews from pedronfigueiredo and jpuri via b3d2f3c September 5, 2024 13:43
@digiwand digiwand changed the title feat: Update Confirm footer scroll-to-bottom requirements feat: Do not require scroll-to-bottom for SIWE or Signatures with simulations before enabling Confirm footer Sep 5, 2024
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.17%. Comparing base (e0868ba) to head (3d47a03).
Report is 11 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26887      +/-   ##
===========================================
+ Coverage    70.17%   70.17%   +0.01%     
===========================================
  Files         1425     1425              
  Lines        49646    49648       +2     
  Branches     13891    13890       -1     
===========================================
+ Hits         34835    34839       +4     
+ Misses       14811    14809       -2     

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

@metamaskbot
Copy link
Collaborator

Builds ready [b3d2f3c]
Page Load Metrics (1828 ± 122 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint23425681660505242
domContentLoaded144225531804259124
load149125661828254122
domInteractive15104452713
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 293 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

sonarcloud bot commented Sep 5, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [3d47a03]
Page Load Metrics (1845 ± 110 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint36527521782397191
domContentLoaded16322558181919795
load166827421845228110
domInteractive15127362412
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 296 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@digiwand digiwand merged commit 6deac15 into develop Sep 6, 2024
78 checks passed
@digiwand digiwand deleted the feat-update-confirm-footer-requirements branch September 6, 2024 13:04
@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 6, 2024
@gauthierpetetin gauthierpetetin added release-12.5.0 Issue or pull request that will be included in release 12.5.0 and removed release-12.6.0 Issue or pull request that will be included in release 12.6.0 labels Sep 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.5.0 Issue or pull request that will be included in release 12.5.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants