-
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
Prevent automatic rejection of confirmations #13194
Prevent automatic rejection of confirmations #13194
Conversation
b5a30c2
to
654b174
Compare
|
431047f
to
0701bc5
Compare
Confirmations are now only automatically rejected if a user explicitly closes the notification window. If we close the window programmatically because there are no notifications left to show, nothing gets rejected. This partially avoids a race condition where a confirmation gets rejected automatically without the user having seen the confirmation first. This could happen if the confirmation was processed just as the notification window was being closed. It's still possible for a confirmation that the user has never seen to get rejected as a result of the user closing the window. But at least now it's no longer possible for a confirmation to get rejected in this manner after the user resolves the last confirmation in the queue.
0701bc5
to
83fe26d
Compare
Builds ready [83fe26d]Page Load Metrics (1186 ± 48 ms)
highlights:storybook
|
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.
Looks good overall!
All windows were being detected as explicit window closures, essentially just as they were previously, because this variable was cleared too soon.
After the window is automatically closed, a confirmation may have been queued up while the window was closing. If so, the popup is now re- opened.
When testing this with the I've updated this branch to automatically re-trigger the UI in this circumstance as well. The PR description has been updated accordingly:
|
Builds ready [3198d31]Page Load Metrics (1121 ± 52 ms)
highlights:storybook
|
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.
LGTM!
Confirmations are now only automatically rejected if a user explicitly closes the notification window. If we close the window programmatically because there are no notifications left to show, nothing gets rejected.
This partially avoids a race condition where a confirmation gets rejected automatically without the user having seen the confirmation first. This could happen if the confirmation was processed just as the notification window was being closed.
It's still possible for a confirmation that the user has never seen to get rejected as a result of the user closing the window. But at least now it's no longer possible for a confirmation to get rejected in this manner after the user resolves the last confirmation in the queue.
If there is a queued confirmation when the popup is automatically closed, the popup is triggered again so that the user is presented with it.