Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Show template center ui when no block is selected on top toolbar on t…
…emplate post editor

The central template ui to go back to the post was not showing after selecting a block in the canvas. We should only be collapsing this area when we're:
- editing a template
- top toolbar mode is on
- a block is selected
- a user has clicked to collapse the area
- the viewport is large
  • Loading branch information
jeryj committed Nov 16, 2023
commit f4e8060d786259368c5079875a33f4e19ebf312b
9 changes: 6 additions & 3 deletions packages/edit-post/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ function Header( {
className={ classnames(
'selected-block-tools-wrapper',
{
'is-collapsed': isBlockToolsCollapsed,
'is-collapsed':
isEditingTemplate &&
isBlockToolsCollapsed,
}
) }
>
Expand Down Expand Up @@ -150,9 +152,10 @@ function Header( {
<div
className={ classnames( 'edit-post-header__center', {
'is-collapsed':
isEditingTemplate &&
! isBlockToolsCollapsed &&
isLargeViewport &&
isEditingTemplate,
hasFixedToolbar &&
isLargeViewport,
} ) }
>
{ isEditingTemplate && <DocumentActions /> }
Expand Down