Skip to content

Commit

Permalink
Site Editor: Remove has-fixed-toolbar class
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 6, 2024
1 parent 247369b commit 4dd71d3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 28 deletions.
12 changes: 0 additions & 12 deletions packages/block-library/src/navigation/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,6 @@ $color-control-label-height: 20px;
}
}

.has-fixed-toolbar .wp-block-navigation__responsive-container.is-menu-open {
@include break-medium() {
top: $admin-bar-height + $header-height + $block-toolbar-height + $border-width;
}
}

.is-mobile-preview .wp-block-navigation__responsive-container.is-menu-open,
.is-tablet-preview .wp-block-navigation__responsive-container.is-menu-open {
top: $admin-bar-height + $header-height + $block-toolbar-height + $border-width;
Expand All @@ -479,12 +473,6 @@ $color-control-label-height: 20px;
}
}

.has-fixed-toolbar .wp-block-navigation__responsive-container.is-menu-open {
@include break-medium() {
top: $header-height + $block-toolbar-height + $border-width;
}
}

.is-mobile-preview .wp-block-navigation__responsive-container.is-menu-open,
.is-tablet-preview .wp-block-navigation__responsive-container.is-menu-open {
top: $header-height + $block-toolbar-height + $border-width;
Expand Down
6 changes: 0 additions & 6 deletions packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export default function Layout() {
const toggleRef = useRef();
const {
isDistractionFree,
hasFixedToolbar,
hasBlockSelected,
canvasMode,
previousShortcut,
Expand All @@ -94,10 +93,6 @@ export default function Layout() {
nextShortcut: getAllShortcutKeyCombinations(
'core/editor/next-region'
),
hasFixedToolbar: select( preferencesStore ).get(
'core',
'fixedToolbar'
),
isDistractionFree: select( preferencesStore ).get(
'core',
'distractionFree'
Expand Down Expand Up @@ -166,7 +161,6 @@ export default function Layout() {
'is-distraction-free':
isDistractionFree && canvasMode === 'edit',
'is-full-canvas': canvasMode === 'edit',
'has-fixed-toolbar': hasFixedToolbar,
'is-block-toolbar-visible': hasBlockSelected,
}
) }
Expand Down
7 changes: 2 additions & 5 deletions packages/editor/src/components/post-title/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ import usePostTitle from './use-post-title';
import PostTypeSupportCheck from '../post-type-support-check';

function PostTitle( _, forwardedRef ) {
const { placeholder, hasFixedToolbar } = useSelect( ( select ) => {
const { placeholder } = useSelect( ( select ) => {
const { getSettings } = select( blockEditorStore );
const { titlePlaceholder, hasFixedToolbar: _hasFixedToolbar } =
getSettings();
const { titlePlaceholder } = getSettings();

return {
placeholder: titlePlaceholder,
hasFixedToolbar: _hasFixedToolbar,
};
}, [] );

Expand Down Expand Up @@ -186,7 +184,6 @@ function PostTitle( _, forwardedRef ) {
// This same block is used in both the visual and the code editor.
const className = clsx( DEFAULT_CLASSNAMES, {
'is-selected': isSelected,
'has-fixed-toolbar': hasFixedToolbar,
} );

return (
Expand Down
7 changes: 2 additions & 5 deletions packages/editor/src/components/post-title/post-title-raw.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ import usePostTitle from './use-post-title';
* @return {Component} The rendered component.
*/
function PostTitleRaw( _, forwardedRef ) {
const { placeholder, hasFixedToolbar } = useSelect( ( select ) => {
const { placeholder } = useSelect( ( select ) => {
const { getSettings } = select( blockEditorStore );
const { titlePlaceholder, hasFixedToolbar: _hasFixedToolbar } =
getSettings();
const { titlePlaceholder } = getSettings();

return {
placeholder: titlePlaceholder,
hasFixedToolbar: _hasFixedToolbar,
};
}, [] );

Expand All @@ -61,7 +59,6 @@ function PostTitleRaw( _, forwardedRef ) {
// This same block is used in both the visual and the code editor.
const className = clsx( DEFAULT_CLASSNAMES, {
'is-selected': isSelected,
'has-fixed-toolbar': hasFixedToolbar,
'is-raw-text': true,
} );

Expand Down

0 comments on commit 4dd71d3

Please sign in to comment.