diff --git a/packages/volto/news/6492.bugfix b/packages/volto/news/6492.bugfix new file mode 100644 index 0000000000..22349d1990 --- /dev/null +++ b/packages/volto/news/6492.bugfix @@ -0,0 +1 @@ +You can now render the order side panel only when the 'Order' tab is active. Previously, the panel would render unnecessarily even when not active.@Abhishek-17h \ No newline at end of file diff --git a/packages/volto/src/components/manage/Blocks/Block/BlocksForm.jsx b/packages/volto/src/components/manage/Blocks/Block/BlocksForm.jsx index a8fd1e7c05..8e8487eaf1 100644 --- a/packages/volto/src/components/manage/Blocks/Block/BlocksForm.jsx +++ b/packages/volto/src/components/manage/Blocks/Block/BlocksForm.jsx @@ -276,6 +276,7 @@ const BlocksForm = (props) => { <> {isMainForm && isClient && + document.getElementById('sidebar-order') && createPortal(
{ editable, showBlockChooser: selectedBlock === childId, detached: isContainer, - // Properties to pass to the BlocksForm to match the View ones content: properties, history, location, @@ -373,5 +373,4 @@ const BlocksForm = (props) => { ); }; - export default BlocksForm; diff --git a/packages/volto/src/components/manage/Sidebar/Sidebar.jsx b/packages/volto/src/components/manage/Sidebar/Sidebar.jsx index 9e2943b7af..776a9ebb3a 100644 --- a/packages/volto/src/components/manage/Sidebar/Sidebar.jsx +++ b/packages/volto/src/components/manage/Sidebar/Sidebar.jsx @@ -186,19 +186,20 @@ const Sidebar = (props) => { }, !!orderTab && { menuItem: intl.formatMessage(messages.order), - pane: ( - - - - ), + pane: + tab === 2 ? ( + + + + ) : null, }, !!settingsTab && { menuItem: intl.formatMessage(messages.settings), diff --git a/packages/volto/src/components/manage/Sidebar/__snapshots__/Sidebar.test.jsx.snap b/packages/volto/src/components/manage/Sidebar/__snapshots__/Sidebar.test.jsx.snap index 429e9a9d30..f7d1fd2fd9 100644 --- a/packages/volto/src/components/manage/Sidebar/__snapshots__/Sidebar.test.jsx.snap +++ b/packages/volto/src/components/manage/Sidebar/__snapshots__/Sidebar.test.jsx.snap @@ -87,29 +87,6 @@ Array [ xmlns="" />
- ,