From c51a449f6614a3f6360744932672e81a12929a7a Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Mon, 18 May 2020 22:00:56 -0700 Subject: [PATCH] Allow the user to dismiss the modal I am not convinced this is an entirely good idea, as why bother with a blocking modal at all if a user can dismiss. The main hope is that less technical users will simply respect the modal and wait until completion before moving on. The risk is that users will catch on and disregard the warning, allowing for potential footguns. However, reviewers appear hostile to a blocking modal which cannot be readily dismissed. --- src/components/Toolbar.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Toolbar.tsx b/src/components/Toolbar.tsx index aa4a75194..f46fdc126 100644 --- a/src/components/Toolbar.tsx +++ b/src/components/Toolbar.tsx @@ -315,7 +315,7 @@ export class Toolbar extends React.Component { return null; } return ( - + ); @@ -435,4 +435,13 @@ export class Toolbar extends React.Component { await Promise.all([sleep(1000), this.props.refresh()]); this._suspend(false); }; + + /** + * Callback invoked upon clicking on the feedback modal. + * + * @param event - event object + */ + private _onFeedbackModalClick = (): void => { + this._suspend(false); + }; }