Skip to content

Commit

Permalink
Update all ConfirmDialogs in the codebase to be size=medium (#62532)
Browse files Browse the repository at this point in the history
* Update all `ConfirmDialog`s in the codebase to be size=medium

* Don't update deprecated dialog

----

Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: nerrad <nerrad@git.wordpress.org>
Co-authored-by: annezazu <annezazu@git.wordpress.org>
  • Loading branch information
4 people authored and ellatrix committed Jun 18, 2024
1 parent 6659eae commit b5c4f62
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ function ConfirmDeleteDialog( {
confirmButtonText={ __( 'Delete' ) }
onCancel={ handleCancelUninstall }
onConfirm={ handleConfirmUninstall }
size="medium"
>
{ font &&
sprintf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ function ScreenRevisions() {
onCancel={ () =>
setIsLoadingRevisionWithUnsavedChanges( false )
}
size="medium"
>
{ __(
'Are you sure you want to apply this revision? Any unsaved changes will be lost.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export default function ShadowsEditPanel() {
setIsConfirmDialogVisible( false );
} }
confirmButtonText={ __( 'Delete' ) }
size="medium"
>
{ sprintf(
// translators: %s: name of the shadow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default function DeleteConfirmDialog( { onClose, onConfirm } ) {
} }
onCancel={ onClose }
confirmButtonText={ __( 'Delete' ) }
size="medium"
>
{ __( 'Are you sure you want to delete this Navigation Menu?' ) }
</ConfirmDialog>
Expand Down
1 change: 1 addition & 0 deletions packages/editor/src/components/post-trash/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default function PostTrash() {
onConfirm={ handleConfirm }
onCancel={ () => setShowConfirmDialog( false ) }
confirmButtonText={ __( 'Move to trash' ) }
size="medium"
>
{ __(
'Are you sure you want to move this post to the trash?'
Expand Down
1 change: 1 addition & 0 deletions packages/editor/src/components/post-visibility/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export default function PostVisibility( { onClose } ) {
onConfirm={ confirmPrivate }
onCancel={ handleDialogCancel }
confirmButtonText={ __( 'Publish' ) }
size="medium"
>
{ __( 'Would you like to privately publish this post now?' ) }
</ConfirmDialog>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default function TemplateValidationNotice() {
synchronizeTemplate();
} }
onCancel={ () => setShowConfirmDialog( false ) }
size="medium"
>
{ __(
'Resetting the template may result in loss of content, do you want to continue?'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default function EditTemplateBlocksNotification( { contentRef } ) {
} );
} }
onCancel={ () => setIsDialogOpen( false ) }
size="medium"
>
{ __(
'You’ve tried to select a block that is part of a template, which may be used on other posts and pages. Would you like to edit the template?'
Expand Down

0 comments on commit b5c4f62

Please sign in to comment.