Skip to content
Prev Previous commit
Next Next commit
resolve trunk conflict
  • Loading branch information
rishishah-multidots committed Dec 3, 2024
commit 335db94509894fc7bbc799f251b794f258d02aac
24 changes: 17 additions & 7 deletions packages/editor/src/components/collab-sidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { useSelect, useDispatch, resolveSelect } from '@wordpress/data';
import {
useSelect,
useDispatch,
resolveSelect,
subscribe,
} from '@wordpress/data';
import { useMemo } from '@wordpress/element';
import { comment as commentIcon } from '@wordpress/icons';
import { addFilter } from '@wordpress/hooks';
Expand Down Expand Up @@ -45,7 +50,10 @@ addFilter(
modifyBlockCommentAttributes
);

function CollabSidebarContent( {} ) {
function CollabSidebarContent( {
styles,
comments,
} ) {
const { createNotice } = useDispatch( noticesStore );
const { saveEntityRecord, deleteEntityRecord } = useDispatch( coreStore );
const { getEntityRecord } = resolveSelect( coreStore );
Expand Down Expand Up @@ -185,8 +193,10 @@ function CollabSidebarContent( {} ) {
};

return (
<div className="editor-collab-sidebar-panel">
<AddComment onSubmit={ addNewComment } />
<div className="editor-collab-sidebar-panel" style={ styles }>
<AddComment
onSubmit={ addNewComment }
/>
<Comments
threads={ comments }
onEditComment={ onEditComment }
Expand Down Expand Up @@ -308,7 +318,9 @@ export default function CollabSidebar() {
title={ __( 'Comments' ) }
icon={ commentIcon }
>
<CollabSidebarContent />
<CollabSidebarContent
comments={ resultComments }
/>
</PluginSidebar>
<PluginSidebar
isPinnable={ false }
Expand All @@ -319,8 +331,6 @@ export default function CollabSidebar() {
>
<CollabSidebarContent
comments={ resultComments }
showCommentBoard={ showCommentBoard }
setShowCommentBoard={ setShowCommentBoard }
styles={ {
backgroundColor,
} }
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.