Skip to content

Commit

Permalink
Block Editor: Add notice action to revert image to original after cro…
Browse files Browse the repository at this point in the history
…pping (#67314)


Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: ntsekouras <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: annezazu <[email protected]>
  • Loading branch information
6 people authored Nov 26, 2024
1 parent 6cc6035 commit 4c30b00
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,17 @@ export default function useSaveImage( {
} );
createSuccessNotice( messages[ modifierType ], {
type: 'snackbar',
actions: [
{
label: __( 'Undo' ),
onClick: () => {
onSaveImage( {
id,
url,
} );
},
},
],
} );
} )
.catch( ( error ) => {
Expand Down

1 comment on commit 4c30b00

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in 4c30b00.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12034758868
📝 Reported issues:

Please sign in to comment.