Skip to content

Commit 30b28be

Browse files
dcalhounfluiddot
authored andcommitted
feat: Limit permanent warning dismissal to affirmative actions (#292)
* feat: Limit permanent warning dismissal to affirmative actions Permanently dismissing a warning while selecting the "cancel" option is confusing as generally cancelling a dialog does not persist selections. * feat: Rephrase download optimized version cancel option This option is not so much a cancellation, but either a deferment of a highly-recommended action or an acceptance of actively choosing to not heed direct advice for solving an system issue. Rephrasing the option to align with this better communicates the choice and makes the permanent dismissal option more understandable.
1 parent e6b266d commit 30b28be

4 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎src/components/ai-clear-history-reminder.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ function AIClearHistoryReminder( {
6868
cancelId: CANCEL_BUTTON_INDEX,
6969
} );
7070

71-
if ( checkboxChecked ) {
72-
localStorage.setItem( 'dontShowClearMessagesWarning', 'true' );
73-
}
74-
7571
if ( response === CLEAR_CONVERSATION_BUTTON_INDEX ) {
72+
if ( checkboxChecked ) {
73+
localStorage.setItem( 'dontShowClearMessagesWarning', 'true' );
74+
}
75+
7676
clearInput();
7777
}
7878
}, [ clearInput ] );

‎src/components/ai-input.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ export const AIInput = ( {
9797
cancelId: CANCEL_BUTTON_INDEX,
9898
} );
9999

100-
if ( checkboxChecked ) {
101-
localStorage.setItem( 'dontShowClearMessagesWarning', 'true' );
102-
}
103-
104100
if ( response === CLEAR_CONVERSATION_BUTTON_INDEX ) {
101+
if ( checkboxChecked ) {
102+
localStorage.setItem( 'dontShowClearMessagesWarning', 'true' );
103+
}
104+
105105
clearInput();
106106
}
107107
};

‎src/components/content-tab-snapshots.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ function SnapshotRow( {
101101
checkboxChecked: false,
102102
} );
103103

104-
if ( checkboxChecked ) {
105-
localStorage.setItem( 'dontShowUpdateWarning', 'true' );
106-
}
107-
108104
if ( response === UPDATE_BUTTON_INDEX ) {
105+
if ( checkboxChecked ) {
106+
localStorage.setItem( 'dontShowUpdateWarning', 'true' );
107+
}
108+
109109
updateDemoSite( snapshot, selectedSite );
110110
}
111111
} else {

‎src/renderer.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ getIpcApi()
9797
'Downloading the optimized version of Studio will provide better performance.'
9898
),
9999
checkboxLabel: __( "Don't show this warning again" ),
100-
buttons: [ __( 'Download' ), __( 'Cancel' ) ],
100+
buttons: [ __( 'Download' ), __( 'Not now' ) ],
101101
cancelId: 1,
102102
} );
103103

0 commit comments

Comments
 (0)