Skip to content

Commit

Permalink
Do not unmount the sidebar when opening the publish pane
Browse files Browse the repository at this point in the history
Closes #19840
  • Loading branch information
draganescu committed Feb 6, 2020
1 parent 8313c65 commit 59d3f61
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions packages/edit-post/src/components/layout/index.js
Expand Up @@ -128,28 +128,24 @@ function Layout() {
className={ className }
header={ <Header /> }
sidebar={
! publishSidebarOpened && (
<>
{ ! sidebarIsOpened && (
<div className="edit-post-layout__toogle-sidebar-panel">
<Button
isSecondary
className="edit-post-layout__toogle-sidebar-panel-button"
onClick={ openSidebarPanel }
aria-expanded={ false }
>
{ hasBlockSelected
? __( 'Open block settings' )
: __(
'Open document settings'
) }
</Button>
</div>
) }
<SettingsSidebar />
<Sidebar.Slot />
</>
)
<>
{ ! sidebarIsOpened && (
<div className="edit-post-layout__toogle-sidebar-panel">
<Button
isSecondary
className="edit-post-layout__toogle-sidebar-panel-button"
onClick={ openSidebarPanel }
aria-expanded={ false }
>
{ hasBlockSelected
? __( 'Open block settings' )
: __( 'Open document settings' ) }
</Button>
</div>
) }
<SettingsSidebar />
<Sidebar.Slot />
</>
}
content={
<>
Expand Down

0 comments on commit 59d3f61

Please sign in to comment.