diff --git a/packages/editor/src/components/collab-sidebar/index.js b/packages/editor/src/components/collab-sidebar/index.js index c53ee9e7e919c6..dfece6c6f73190 100644 --- a/packages/editor/src/components/collab-sidebar/index.js +++ b/packages/editor/src/components/collab-sidebar/index.js @@ -29,8 +29,6 @@ import AddCommentToolbarButton from './comment-button-toolbar'; import { useGlobalStylesContext } from '../global-styles-provider'; import { getCommentIdsFromBlocks } from './utils'; -const isBlockCommentExperimentEnabled = - window?.__experimentalEnableBlockComment; const modifyBlockCommentAttributes = ( settings ) => { if ( ! settings.attributes.blockCommentId ) { settings.attributes = { @@ -329,8 +327,7 @@ export default function CollabSidebar() { } ); } - // Check if the experimental flag is enabled. - if ( ! isBlockCommentExperimentEnabled || postStatus === 'publish' ) { + if ( postStatus === 'publish' ) { return null; // or maybe return some message indicating no threads are available. } diff --git a/packages/editor/src/components/header/index.js b/packages/editor/src/components/header/index.js index 3adc5842d20b86..d0af73e7dcb0ca 100644 --- a/packages/editor/src/components/header/index.js +++ b/packages/editor/src/components/header/index.js @@ -32,6 +32,9 @@ import { } from '../../store/constants'; import { unlock } from '../../lock-unlock'; +const isBlockCommentExperimentEnabled = + window?.__experimentalEnableBlockComment; + const toolbarVariations = { distractionFreeDisabled: { y: '-50px' }, distractionFreeHover: { y: 0 }, @@ -195,7 +198,10 @@ function Header( { } /> ) } - + + { isBlockCommentExperimentEnabled ? ( + + ) : undefined } { customSaveButton }