-
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
fix: remove scroll-to-bottom requirement in redesigned transaction confirmations #27910
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. |
Quality Gate passedIssues Measures |
Builds ready [7f55b70]
Page Load Metrics (1780 ± 96 ms)
Bundle size diffs
|
setIsScrollToBottomCompleted(true); | ||
return; | ||
} | ||
|
||
setIsScrollToBottomCompleted(!isScrollable || hasScrolledToBottom); | ||
}, [isScrollable, hasScrolledToBottom]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this hook to have isTransactionRedesign
dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch, done.
@@ -49,6 +51,13 @@ const ScrollToBottom = ({ children }: ContentProps) => { | |||
offsetPxFromBottom: 0, | |||
}); | |||
|
|||
const isTransactionRedesign = REDESIGN_USER_TRANSACTION_TYPES.includes( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a dumb question, this should definitely check if current confirmation in REDESIGN_USER_TRANSACTION_TYPES
but also if user opted-in for redesigned transactions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed ScrollToBottom
is used only for redesigned confirmations. I will double-check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That make sense if that's the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we probably want to use REDESIGN_DEV_TRANSACTION_TYPES
instead, which is a superset of REDESIGN_USER_TRANSACTION_TYPES
and includes any types not yet visible to the user but already in active development
42027be
to
b344e29
Compare
Builds ready [e53536f]
Page Load Metrics (1912 ± 189 ms)
Bundle size diffs
|
Builds ready [35c228a]
Page Load Metrics (1867 ± 61 ms)
Bundle size diffs
|
bdf56de
1cd0727
to
bdf56de
Compare
Builds ready [c24e021]
Page Load Metrics (2009 ± 51 ms)
Bundle size diffs
|
Builds ready [b7155f2]
Page Load Metrics (1735 ± 34 ms)
Bundle size diffs
|
Builds ready [2fdb1dd]
Page Load Metrics (2090 ± 63 ms)
Bundle size diffs
|
Description
This PR addresses the removal of the scroll-to-bottom requirement in the redesigned transaction confirmation screens. It eliminates the need for users to scroll to the bottom in order to enable the confirm button, streamlining the confirmation process. The scroll-to-bottom arrow is also removed, ensuring a smoother user experience without unnecessary interaction barriers.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/3495
Manual testing steps
Screenshots/Recordings
deploy.webm
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist