Remove the product block breadcrumbs and sidebar inspector (#37250)

* Remove the product block breadcrumbs and sidebar inspector

* Add changelog entry
This commit is contained in:
Joshua T Flowers 2023-03-16 09:12:11 -07:00 committed by GitHub
parent 9c5e9b57bf
commit 90e7c66ba6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 42 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: update
Remove the product block breadcrumbs and sidebar inspector

View File

@ -12,9 +12,6 @@ import { Product } from '@woocommerce/data';
import { useSelect, select as WPSelect } from '@wordpress/data';
import { uploadMedia } from '@wordpress/media-utils';
import {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore No types for this exist yet.
BlockBreadcrumb,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore No types for this exist yet.
BlockContextProvider,
@ -24,7 +21,6 @@ import {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore No types for this exist yet.
BlockTools,
BlockInspector,
EditorSettings,
EditorBlockListSettings,
WritingFlow,
@ -41,7 +37,6 @@ import {
/**
* Internal dependencies
*/
import { Sidebar } from '../sidebar';
import { Tabs } from '../tabs';
type BlockEditorProps = {
@ -115,10 +110,6 @@ export function BlockEditor( {
settings={ settings }
>
<Tabs onChange={ setSelectedTab } />
<BlockBreadcrumb />
<Sidebar.InspectorFill>
<BlockInspector />
</Sidebar.InspectorFill>
<div className="editor-styles-wrapper">
{ /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */ }
{ /* @ts-ignore No types for this exist yet. */ }

View File

@ -26,7 +26,6 @@ import { FullscreenMode, InterfaceSkeleton } from '@wordpress/interface';
* Internal dependencies
*/
import { Header } from '../header';
import { Sidebar } from '../sidebar';
import { BlockEditor } from '../block-editor';
import { initBlocks } from './init-blocks';
@ -48,7 +47,6 @@ export function Editor( { product, settings }: EditorProps ) {
<SlotFillProvider>
<InterfaceSkeleton
header={ <Header title={ product.name } /> }
sidebar={ <Sidebar /> }
content={
<BlockEditor
settings={ settings }

View File

@ -1 +0,0 @@
export * from './sidebar';

View File

@ -1,30 +0,0 @@
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { createElement } from '@wordpress/element';
import { createSlotFill, Panel } from '@wordpress/components';
const { Slot: InspectorSlot, Fill: InspectorFill } = createSlotFill(
'ProductBlockEditorSidebarInspector'
);
export function Sidebar() {
return (
<div
className="woocommerce-product-sidebar"
role="region"
aria-label={ __(
'Product Block Editor advanced settings.',
'woocommerce'
) }
tabIndex={ -1 }
>
<Panel header={ __( 'Inspector', 'woocommerce' ) }>
<InspectorSlot bubblesVirtually />
</Panel>
</div>
);
}
Sidebar.InspectorFill = InspectorFill;