Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove double edit button in LinkUI #47454

Merged
merged 1 commit into from
Jan 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions packages/edit-site/src/components/block-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import classnames from 'classnames';
* WordPress dependencies
*/
import { useSelect, useDispatch } from '@wordpress/data';
import { useCallback, useMemo, useRef } from '@wordpress/element';
import { useMemo, useRef } from '@wordpress/element';
import { useEntityBlockEditor, store as coreStore } from '@wordpress/core-data';
import {
BlockList,
__experimentalLinkControl,
BlockInspector,
BlockTools,
__unstableUseClipboardHandler as useClipboardHandler,
Expand All @@ -32,7 +31,6 @@ import { ReusableBlocksMenuItems } from '@wordpress/reusable-blocks';
*/
import inserterMediaCategories from './inserter-media-categories';
import TemplatePartConverter from '../template-part-converter';
import NavigateToLink from '../navigate-to-link';
import { SidebarInspectorFill } from '../sidebar-edit-mode';
import { store as editSiteStore } from '../../store';
import BackButton from './back-button';
Expand All @@ -50,7 +48,7 @@ const LAYOUT = {
};

export default function BlockEditor() {
const { setPage, setIsInserterOpened } = useDispatch( editSiteStore );
const { setIsInserterOpened } = useDispatch( editSiteStore );
const { storedSettings, templateType, canvasMode } = useSelect(
( select ) => {
const { getSettings, getEditedPostType, __unstableGetCanvasMode } =
Expand Down Expand Up @@ -163,17 +161,6 @@ export default function BlockEditor() {
useSubRegistry={ false }
>
<TemplatePartConverter />
<__experimentalLinkControl.ViewerFill>
{ useCallback(
( fillProps ) => (
<NavigateToLink
{ ...fillProps }
onActivePageChange={ setPage }
/>
),
[]
) }
</__experimentalLinkControl.ViewerFill>
<SidebarInspectorFill>
<BlockInspector />
</SidebarInspectorFill>
Expand Down