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

fix: Signature Redesign Disabled confirm button with missing ScrollToBottom button with 16px or less scroll buffer #24489

Conversation

digiwand
Copy link
Contributor

@digiwand digiwand commented May 10, 2024

Description

  • Removes 16px buffer
  • Allow optional scroll buffer in useScrollRequired hook

Related issues

Fixes: #24485

Manual testing steps

  1. Create sign request from OpenSea login
  2. Observe scroll behavior

Screenshots/Recordings

Before

Screen.Recording.2024-05-10.at.12.30.06.mov

After

CleanShot.2024-05-14.at.06.21.08.mp4

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.

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.

@metamaskbot
Copy link
Collaborator

Builds ready [2a284d0]
Page Load Metrics (1218 ± 612 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint71142962110
domContentLoaded96619157
load58299812181274612
domInteractive96619157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 30 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

export const useScrollRequired = (dependencies = []) => {
export const useScrollRequired = (
dependencies = [],
{ offsetPxFromBottom = 16 } = {},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Leaning towards defaulting to 0. We can handle this in a separate PR

@digiwand digiwand changed the title Fix confirm redesign disabled confirm with 16px or less scroll buffer fix: Signature Redesign Disabled confirm button with missing ScrollToBottom button with 16px or less scroll buffer May 11, 2024
@digiwand digiwand added the team-confirmations Push issues to confirmations team label May 13, 2024
@digiwand digiwand marked this pull request as ready for review May 14, 2024 05:15
@digiwand digiwand requested review from a team as code owners May 14, 2024 05:15
@metamaskbot
Copy link
Collaborator

Builds ready [879f8ef]
Page Load Metrics (787 ± 602 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7111887157
domContentLoaded9311353
load5732347871253602
domInteractive9311353
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 5 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [879f8ef]
Page Load Metrics (787 ± 602 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7111887157
domContentLoaded9311353
load5732347871253602
domInteractive9311353
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 5 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [eec6c25]
Page Load Metrics (778 ± 594 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint64149902512
domContentLoaded95418136
load5231897781238594
domInteractive95418136
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 5 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 67.48%. Comparing base (cfcbd1e) to head (eec6c25).
Report is 3 commits behind head on develop.

Files Patch % Lines
ui/hooks/useScrollRequired.js 80.00% 1 Missing ⚠️
...ents/confirm/scroll-to-bottom/scroll-to-bottom.tsx 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #24489   +/-   ##
========================================
  Coverage    67.48%   67.48%           
========================================
  Files         1288     1288           
  Lines        50153    50158    +5     
  Branches     13023    13025    +2     
========================================
+ Hits         33842    33846    +4     
- Misses       16311    16312    +1     

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

@digiwand digiwand merged commit 0e775fd into develop May 14, 2024
75 checks passed
@digiwand digiwand deleted the fix-confirm-redesign-disabled-confirm-with-16px-or-less-scroll-buffer branch May 14, 2024 13:50
@github-actions github-actions bot locked and limited conversation to collaborators May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.0.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signatures redesign - confirm button is disabled even if full content is visible and no scroll arrow is shown
5 participants