diff --git a/package-lock.json b/package-lock.json index 5caafa21f4015..75263e49ca18a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16252,7 +16252,6 @@ "@wordpress/html-entities": "file:packages/html-entities", "@wordpress/i18n": "file:packages/i18n", "@wordpress/icons": "file:packages/icons", - "@wordpress/interface": "file:packages/interface", "@wordpress/is-shallow-equal": "file:packages/is-shallow-equal", "@wordpress/keycodes": "file:packages/keycodes", "@wordpress/notices": "file:packages/notices", diff --git a/packages/block-library/package.json b/packages/block-library/package.json index 57f50b3d2bd1f..721af01c6f953 100644 --- a/packages/block-library/package.json +++ b/packages/block-library/package.json @@ -52,7 +52,6 @@ "@wordpress/html-entities": "file:../html-entities", "@wordpress/i18n": "file:../i18n", "@wordpress/icons": "file:../icons", - "@wordpress/interface": "file:../interface", "@wordpress/is-shallow-equal": "file:../is-shallow-equal", "@wordpress/keycodes": "file:../keycodes", "@wordpress/notices": "file:../notices", diff --git a/packages/block-library/src/gallery/edit.js b/packages/block-library/src/gallery/edit.js index 492275995ca26..434ac572cb9c5 100644 --- a/packages/block-library/src/gallery/edit.js +++ b/packages/block-library/src/gallery/edit.js @@ -53,11 +53,6 @@ import useShortCodeTransform from './use-short-code-transform'; import useGetNewImages from './use-get-new-images'; import useGetMedia from './use-get-media'; -/** - * Internal dependencies - */ -import useMobileWarning from './use-mobile-warning'; - const MAX_COLUMNS = 8; const linkOptions = [ { value: LINK_DESTINATION_ATTACHMENT, label: __( 'Attachment Page' ) }, @@ -149,8 +144,6 @@ function GalleryEdit( props ) { const newImages = useGetNewImages( images, imageData ); - useMobileWarning( newImages ); - useEffect( () => { newImages?.forEach( ( newImage ) => { updateBlockAttributes( newImage.clientId, { diff --git a/packages/block-library/src/gallery/use-mobile-warning.js b/packages/block-library/src/gallery/use-mobile-warning.js deleted file mode 100644 index 95d0f4c86432f..0000000000000 --- a/packages/block-library/src/gallery/use-mobile-warning.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * WordPress dependencies - */ -import { __ } from '@wordpress/i18n'; -import { useDispatch, useSelect } from '@wordpress/data'; -import { store as interfaceStore } from '@wordpress/interface'; -import { store as noticesStore } from '@wordpress/notices'; - -export default function useMobileWarning( newImages ) { - const { createWarningNotice } = useDispatch( noticesStore ); - const { toggleFeature } = useDispatch( interfaceStore ); - const isMobileWarningActive = useSelect( ( select ) => { - const { isFeatureActive } = select( interfaceStore ); - return isFeatureActive( 'core/edit-post', 'mobileGalleryWarning' ); - }, [] ); - - if ( ! isMobileWarningActive || ! newImages ) { - return; - } - - createWarningNotice( - __( - 'If you want to edit the gallery you just added in the mobile app, to avoid losing any data please make sure you use version 18.2 of the app or above.' - ), - { type: 'snackbar', explicitDismiss: true } - ); - toggleFeature( 'core/edit-post', 'mobileGalleryWarning' ); -} diff --git a/packages/edit-post/src/index.js b/packages/edit-post/src/index.js index 21a24505d3e9b..e59607223c34a 100644 --- a/packages/edit-post/src/index.js +++ b/packages/edit-post/src/index.js @@ -109,7 +109,6 @@ export function initializeEditor( dispatch( interfaceStore ).setFeatureDefaults( 'core/edit-post', { fixedToolbar: false, welcomeGuide: true, - mobileGalleryWarning: true, fullscreenMode: true, showIconLabels: false, themeStyles: true,