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

Reject popup confirmations on close #12643

Merged
merged 13 commits into from
Nov 15, 2021
Merged

Reject popup confirmations on close #12643

merged 13 commits into from
Nov 15, 2021

Conversation

ritave
Copy link
Contributor

@ritave ritave commented Nov 10, 2021

Fixes: #10302

@github-actions
Copy link
Contributor

github-actions bot commented Nov 10, 2021

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.

@ritave
Copy link
Contributor Author

ritave commented Nov 10, 2021

I have read the CLA Document and I hereby sign the CLA

@ritave ritave force-pushed the ritave/close-confirm branch 2 times, most recently from 2b52c51 to ce0f540 Compare November 10, 2021 17:52
@metamaskbot
Copy link
Collaborator

Builds ready [2f275ef]
Page Load Metrics (665 ± 17 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6267716633416
domContentLoaded6287726643517
load6287726653517
domInteractive6287726643517

highlights:

storybook

@rekmarks rekmarks requested a review from Gudahtt November 10, 2021 19:33
@rekmarks
Copy link
Member

@Gudahtt if all pending confirmations are rejected on notification popup close, how should we handle metrics? The ApprovalController probably needs a controller messenger event for this purpose, given the current implementation.

@Gudahtt
Copy link
Member

Gudahtt commented Nov 10, 2021

Good point.

Right now our "on reject" metrics are in the UI. We can move them into the tx-state-manager to preserve them with this approach. And similarly for the "message manager"-style classes, we can have them dispatch metrics on reject as well. The state manager for the message seems like a better place than the UI to dispatch such a metric anyway.

As for the confirmations managed by the approval controller, I am not sure why we'd want to dispatch metrics directly in that controller. It doesn't know what these approvals are for, it doesn't have the context. The one controller using that right now is the permissions controller, so to take that as an example, we could dispatch the rejection metric event in rejectPermissionsRequest. That's where we have all of the context about what is being rejected.

@ritave ritave force-pushed the ritave/close-confirm branch from 2f275ef to cedd25f Compare November 11, 2021 11:35
@metamaskbot
Copy link
Collaborator

Builds ready [cedd25f]
Page Load Metrics (685 ± 34 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint5148436817134
domContentLoaded5018466827335
load5138476857134
domInteractive5018466827335

highlights:

storybook

@ritave ritave changed the title [WIP] Reject popup confirmations on close Reject popup confirmations on close Nov 11, 2021
@ritave ritave marked this pull request as ready for review November 11, 2021 16:23
@ritave ritave requested a review from a team as a code owner November 11, 2021 16:23
@ritave ritave force-pushed the ritave/close-confirm branch from 2986657 to f564ddb Compare November 11, 2021 17:30
@metamaskbot
Copy link
Collaborator

Builds ready [f564ddb]
Page Load Metrics (768 ± 37 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint283922416209100
domContentLoaded6939867677838
load6969867687837
domInteractive6939867677838

highlights:

storybook

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

This mostly looks good! One more set of changes left, for the remaining message managers.

@ritave ritave self-assigned this Nov 15, 2021
@metamaskbot
Copy link
Collaborator

Builds ready [ecfc773]
Page Load Metrics (771 ± 37 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24380040017584
domContentLoaded6999837707637
load7019837717637
domInteractive6999837707637

highlights:

storybook

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@metamaskbot
Copy link
Collaborator

Builds ready [0434fdc]
Page Load Metrics (840 ± 36 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint301932520250120
domContentLoaded7289748397536
load7319748407436
domInteractive7289748397536

highlights:

storybook

@ritave ritave merged commit a323a5f into develop Nov 15, 2021
@ritave ritave deleted the ritave/close-confirm branch November 15, 2021 16:13
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reject all pending confirmations when notification window closed
5 participants