Skip to content

Commit

Permalink
Update: Use offsite navigation editor on the navigation inspector sid…
Browse files Browse the repository at this point in the history
…ebar. (#46440)
  • Loading branch information
jorgefilipecosta authored Dec 16, 2022
1 parent 76aa4bb commit 9258e2d
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*/
import {
__experimentalListView as ListView,
__experimentalOffCanvasEditor as OffCanvasEditor,
store as blockEditorStore,
} from '@wordpress/block-editor';
import { useEffect } from '@wordpress/element';
Expand Down Expand Up @@ -48,5 +49,14 @@ export default function NavigationMenu( { innerBlocks, id } ) {
}
} );
}, [ updateBlockListSettings, innerBlocks ] );

if ( window?.__experimentalEnableOffCanvasNavigationEditor ) {
return (
<OffCanvasEditor
blocks={ innerBlocks }
selectBlockInCanvas={ false }
/>
);
}
return <ListView id={ id } />;
}

1 comment on commit 9258e2d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3713910050
📝 Reported issues:

Please sign in to comment.