From 877e520f78b8624b5f887b421979ef753a4d3c9e Mon Sep 17 00:00:00 2001 From: David Ichim Date: Fri, 29 Nov 2024 20:19:37 +0200 Subject: [PATCH 01/12] fix(report-navigation): remove unnecessary context navigation header fallback --- .../variations/ReportNavigation.jsx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/manage/Blocks/ContextNavigation/variations/ReportNavigation.jsx b/src/components/manage/Blocks/ContextNavigation/variations/ReportNavigation.jsx index bbb8bab1..e985324f 100644 --- a/src/components/manage/Blocks/ContextNavigation/variations/ReportNavigation.jsx +++ b/src/components/manage/Blocks/ContextNavigation/variations/ReportNavigation.jsx @@ -4,19 +4,11 @@ import { Link as RouterLink } from 'react-router-dom'; import cx from 'classnames'; import { compose } from 'redux'; import { withRouter } from 'react-router'; -import { defineMessages, useIntl } from 'react-intl'; import { flattenToAppURL } from '@plone/volto/helpers'; import { UniversalLink, MaybeWrap } from '@plone/volto/components'; import { withContentNavigation } from '@plone/volto/components/theme/Navigation/withContentNavigation'; -const messages = defineMessages({ - navigation: { - id: 'Navigation', - defaultMessage: 'Navigation', - }, -}); - /** * Handles click on summary links and closes parent details elements * @param {Event} e - Click event @@ -103,7 +95,6 @@ function renderNode(node, parentLevel) { export function ReportNavigation(props) { const { navigation = {} } = props; const { items = [] } = navigation; - const intl = useIntl(); return items.length ? ( From f4d7f56ae4e0dbdc04425cc86cfbafb9d527dd85 Mon Sep 17 00:00:00 2001 From: David Ichim Date: Fri, 29 Nov 2024 21:10:02 +0200 Subject: [PATCH 02/12] fix(report-navigation): use report-navigation class instead of smart-toc - Also avoid adding title if we don't have any title set, on edit has_custom_name still retains empty header div when removing the text from the title field --- .../Blocks/ContextNavigation/variations/ReportNavigation.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/manage/Blocks/ContextNavigation/variations/ReportNavigation.jsx b/src/components/manage/Blocks/ContextNavigation/variations/ReportNavigation.jsx index e985324f..54f61957 100644 --- a/src/components/manage/Blocks/ContextNavigation/variations/ReportNavigation.jsx +++ b/src/components/manage/Blocks/ContextNavigation/variations/ReportNavigation.jsx @@ -97,8 +97,8 @@ export function ReportNavigation(props) { const { items = [] } = navigation; return items.length ? ( -