Skip to content

Commit

Permalink
made changes as per github feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rishishah-multidots committed Aug 29, 2024
2 parents 4104869 + 9de8c69 commit b8b0292
Show file tree
Hide file tree
Showing 10 changed files with 1,331 additions and 1,872 deletions.
4 changes: 2 additions & 2 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ function gutenberg_initialize_experiments_settings() {

add_settings_field(
'gutenberg-block-comment',
__( 'Enable multi-user commenting on blocks', 'gutenberg' ),
__( 'Comments', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Comments', 'gutenberg' ),
'label' => __( 'Enable multi-user commenting on blocks', 'gutenberg' ),
'id' => 'gutenberg-block-comment',
)
);
Expand Down
8 changes: 4 additions & 4 deletions packages/block-editor/src/components/block-toolbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ export function PrivateBlockToolbar( {
!! getBlockAttributes( clientId )?.metadata?.bindings
);

// eslint-disable-next-line @wordpress/data-no-store-string-literals
const commentID = select( 'core/block-editor' ).getBlock(
selectedBlockClientId
)?.attributes?.blockCommentId;
const commentID =
// eslint-disable-next-line @wordpress/data-no-store-string-literals
select( 'core/block-editor' ).getBlock( selectedBlockClientId )
?.attributes?.blockCommentId || null;

return {
blockClientId: selectedBlockClientId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { MenuItem } from '@wordpress/components';
import { collabComment } from '@wordpress/icons';
import { useDispatch } from '@wordpress/data';

export default function BlockCommentMenuItem( { clientId, onClose } ) {

export default function BlockCommentMenuItem( { onClose } ) {
// eslint-disable-next-line @wordpress/data-no-store-string-literals
const { openGeneralSidebar } = useDispatch( 'core/edit-post' );

const openCollabBoard = () => {
onClose();
openGeneralSidebar("edit-post/collab-sidebar");
}
openGeneralSidebar( 'edit-post/collab-sidebar' );
};

return (
<MenuItem
Expand All @@ -22,6 +22,6 @@ export default function BlockCommentMenuItem( { clientId, onClose } ) {
aria-haspopup="dialog"
>
{ __( 'Add Comment' ) }
</MenuItem>
</MenuItem>
);
}

This file was deleted.

Loading

0 comments on commit b8b0292

Please sign in to comment.