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

Preserve footer template bar in zoom out #67135

Merged
merged 1 commit into from
Nov 20, 2024
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
12 changes: 1 addition & 11 deletions packages/editor/src/components/editor-interface/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import { InterfaceSkeleton, ComplementaryArea } from '@wordpress/interface';
import { useSelect } from '@wordpress/data';
import { __, _x } from '@wordpress/i18n';
import { store as preferencesStore } from '@wordpress/preferences';
import {
store as blockEditorStore,
BlockBreadcrumb,
BlockToolbar,
} from '@wordpress/block-editor';
import { BlockBreadcrumb, BlockToolbar } from '@wordpress/block-editor';
import { useViewportMatch } from '@wordpress/compose';
import { useState, useCallback } from '@wordpress/element';

Expand All @@ -31,8 +27,6 @@ import TextEditor from '../text-editor';
import VisualEditor from '../visual-editor';
import EditorContentSlotFill from './content-slot-fill';

import { unlock } from '../../lock-unlock';

const interfaceLabels = {
/* translators: accessibility text for the editor top bar landmark region. */
header: __( 'Editor top bar' ),
Expand Down Expand Up @@ -69,13 +63,11 @@ export default function EditorInterface( {
isPreviewMode,
showBlockBreadcrumbs,
documentLabel,
isZoomOut,
} = useSelect( ( select ) => {
const { get } = select( preferencesStore );
const { getEditorSettings, getPostTypeLabel } = select( editorStore );
const editorSettings = getEditorSettings();
const postTypeLabel = getPostTypeLabel();
const { isZoomOut: _isZoomOut } = unlock( select( blockEditorStore ) );

return {
mode: select( editorStore ).getEditorMode(),
Expand All @@ -88,7 +80,6 @@ export default function EditorInterface( {
documentLabel:
// translators: Default label for the Document in the Block Breadcrumb.
postTypeLabel || _x( 'Document', 'noun, breadcrumb' ),
isZoomOut: _isZoomOut(),
};
}, [] );
const isLargeViewport = useViewportMatch( 'medium' );
Expand Down Expand Up @@ -197,7 +188,6 @@ export default function EditorInterface( {
isLargeViewport &&
showBlockBreadcrumbs &&
isRichEditingEnabled &&
! isZoomOut &&
mode === 'visual' && (
<BlockBreadcrumb rootLabelText={ documentLabel } />
)
Expand Down
Loading