Skip to content

Commit

Permalink
Site and Widgets Editor: Fix complementary area not opening (#28732)
Browse files Browse the repository at this point in the history
  • Loading branch information
Copons authored Feb 4, 2021
1 parent 2f282f2 commit bccb188
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function Editor() {
isFullscreenActive: isFeatureActive( 'fullscreenMode' ),
sidebarIsOpened: !! select(
interfaceStore
).getActiveComplementaryArea( editSiteStore ),
).getActiveComplementaryArea( editSiteStore.name ),
settings: getSettings(),
templateType: postType,
page: getPage(),
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-widgets/src/components/layout/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function Interface( { blockEditorSettings } ) {
const { hasSidebarEnabled, isInserterOpened } = useSelect( ( select ) => ( {
hasSidebarEnabled: !! select(
interfaceStore
).getActiveComplementaryArea( editWidgetsStore ),
).getActiveComplementaryArea( editWidgetsStore.name ),
isInserterOpened: !! select( editWidgetsStore ).isInserterOpened(),
} ) );
const editorStylesRef = useEditorStyles( blockEditorSettings.styles );
Expand Down
4 changes: 2 additions & 2 deletions packages/edit-widgets/src/components/sidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function ComplementaryAreaTab( { identifier, label, isActive } ) {
return (
<Button
onClick={ () =>
enableComplementaryArea( editWidgetsStore, identifier )
enableComplementaryArea( editWidgetsStore.name, identifier )
}
className={ classnames( 'edit-widgets-sidebar__panel-tab', {
'is-active': isActive,
Expand Down Expand Up @@ -74,7 +74,7 @@ export default function Sidebar() {

const selectedBlock = getSelectedBlock();

let activeArea = getActiveComplementaryArea( editWidgetsStore );
let activeArea = getActiveComplementaryArea( editWidgetsStore.name );
if ( ! activeArea ) {
if ( selectedBlock ) {
activeArea = BLOCK_INSPECTOR_IDENTIFIER;
Expand Down

0 comments on commit bccb188

Please sign in to comment.