@@ -20,7 +20,7 @@ import { store as interfaceStore } from '@wordpress/interface';
2020 * Internal dependencies
2121 */
2222import PluginSidebar from '../plugin-sidebar' ;
23- import { collabHistorySidebarName , collabSidebarName } from './constants' ;
23+ import { collabSidebarName } from './constants' ;
2424import { Comments } from './comments' ;
2525import { AddComment } from './add-comment' ;
2626import { store as editorStore } from '../../store' ;
@@ -257,7 +257,7 @@ export default function CollabSidebar() {
257257
258258 const openCollabBoard = ( ) => {
259259 setShowCommentBoard ( true ) ;
260- enableComplementaryArea ( 'core' , 'edit-post/collab-sidebar' ) ;
260+ enableComplementaryArea ( 'core' , collabSidebarName ) ;
261261 } ;
262262
263263 const [ blocks ] = useEntityBlockEditor ( 'postType' , postType , {
@@ -339,26 +339,18 @@ export default function CollabSidebar() {
339339 < >
340340 < AddCommentComponent onClick = { openCollabBoard } />
341341 < PluginSidebar
342- identifier = { collabHistorySidebarName }
343- // translators: Comments sidebar title
344- title = { __ ( 'Comments' ) }
345- icon = { commentIcon }
346- >
347- < CollabSidebarContent
348- comments = { resultComments }
349- showCommentBoard = { showCommentBoard }
350- setShowCommentBoard = { setShowCommentBoard }
351- />
352- </ PluginSidebar >
353- < PluginSidebar
354- isPinnable = { false }
355- header = { false }
342+ isPinnable
356343 identifier = { collabSidebarName }
357344 className = "editor-collab-sidebar"
358345 headerClassName = "editor-collab-sidebar__header"
346+ // translators: Comments sidebar title
347+ title = { __ ( 'Comments' ) }
348+ icon = { commentIcon }
359349 >
360350 < CollabSidebarContent
361- comments = { sortedThreads }
351+ comments = {
352+ showCommentBoard ? sortedThreads : resultComments
353+ }
362354 showCommentBoard = { showCommentBoard }
363355 setShowCommentBoard = { setShowCommentBoard }
364356 styles = { {
0 commit comments