From ebc0ddfe89edb23a538f779aa577b9d32dec0aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Mu=CC=88ller?= Date: Wed, 6 Mar 2024 19:41:46 +0100 Subject: [PATCH 01/11] TASK: Remove "internal" node properties Provides a helper to access hidden status as well as renaming `_hiddenInIndex` to `hiddenInMenu`. Fixes: #4208 --- .../AbstractMenuItemsImplementation.php | 22 +++++++++---------- .../Classes/Fusion/Helper/NodeHelper.php | 1 + .../References/NeosFusionReference.rst | 12 +++++----- Neos.Neos/NodeTypes/Mixin/Document.yaml | 2 +- .../Behavior/Features/Fusion/Menu.feature | 4 ++-- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php index 23f8055dc8a..18c0ded20f3 100644 --- a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php @@ -24,7 +24,7 @@ * Base class for Menu and DimensionsMenu * * Main Options: - * - renderHiddenInIndex: if TRUE, hidden-in-index nodes will be shown in the menu. FALSE by default. + * - renderHiddenInMenu: if TRUE, hidden-in-index nodes will be shown in the menu. FALSE by default. */ abstract class AbstractMenuItemsImplementation extends AbstractFusionObject { @@ -46,11 +46,11 @@ abstract class AbstractMenuItemsImplementation extends AbstractFusionObject protected $currentNode; /** - * Internal cache for the renderHiddenInIndex property. + * Internal cache for the renderHiddenInMenu property. * * @var boolean */ - protected $renderHiddenInIndex; + protected $renderHiddenInMenu; /** * Internal cache for the calculateItemStates property. @@ -76,17 +76,17 @@ public function isCalculateItemStatesEnabled(): bool } /** - * Should nodes that have "hiddenInIndex" set still be visible in this menu. + * Should nodes that have "hiddenInMenu" set still be visible in this menu. * * @return boolean */ - public function getRenderHiddenInIndex() + public function getRenderHiddenInMenu() { - if ($this->renderHiddenInIndex === null) { - $this->renderHiddenInIndex = (bool)$this->fusionValue('renderHiddenInIndex'); + if ($this->renderHiddenInMenu === null) { + $this->renderHiddenInMenu = (bool)($this->fusionValue('renderHiddenInMenu') ?? $this->fusionValue('renderHiddenInIndex')); } - return $this->renderHiddenInIndex; + return $this->renderHiddenInMenu; } /** @@ -139,7 +139,7 @@ abstract protected function buildItems(): array; /** * Return TRUE/FALSE if the node is currently hidden or not in the menu; - * taking the "renderHiddenInIndex" configuration of the Menu Fusion object into account. + * taking the "renderHiddenInMenu" configuration of the Menu Fusion object into account. * * This method needs to be called inside buildItems() in the subclasses. * @@ -148,14 +148,14 @@ abstract protected function buildItems(): array; */ protected function isNodeHidden(Node $node) { - if ($this->getRenderHiddenInIndex() === true) { + if ($this->getRenderHiddenInMenu() === true) { // Please show hiddenInIndex nodes // -> node is *never* hidden! return false; } // Node is hidden depending on the _hiddenInIndex property - return $node->getProperty('_hiddenInIndex'); + return $node->getProperty('hiddenInMenu'); } protected function buildUri(Node $node): string diff --git a/Neos.Neos/Classes/Fusion/Helper/NodeHelper.php b/Neos.Neos/Classes/Fusion/Helper/NodeHelper.php index 28de5534bb7..8bbdd02f71b 100644 --- a/Neos.Neos/Classes/Fusion/Helper/NodeHelper.php +++ b/Neos.Neos/Classes/Fusion/Helper/NodeHelper.php @@ -21,6 +21,7 @@ use Neos\ContentRepository\Core\Projection\ContentGraph\Filter\FindAncestorNodesFilter; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepository\Core\Projection\ContentGraph\NodePath; +use Neos\ContentRepository\Core\Projection\NodeHiddenState\NodeHiddenStateFinder; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Eel\ProtectedContextAwareInterface; use Neos\Flow\Annotations as Flow; diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index 113099e9115..1e7967244ac 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -927,7 +927,7 @@ The following properties are passed over to :ref:`Neos_Neos__MenuItems` internal :maximumLevels: (integer) Restrict the maximum depth of items in the menu (relative to ``entryLevel``) :startingPoint: (optional, Node) The node where the menu hierarchy starts. If not specified explicitly the startingPoint is calculated from (``node`` and ``entryLevel``), defaults to ``null`` :filter: (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` -:renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` +:renderHiddenInMenu: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false``. :itemCollection: (optional, array of Nodes) Explicitly set the Node items for the menu (taking precedence over ``startingPoints`` and ``entryLevel`` and ``lastLevel``). The children for each ``Node`` will be fetched taking the ``maximumLevels`` property into account. @@ -957,7 +957,7 @@ The following properties are passed over to :ref:`Neos_Neos__BreadcrumbMenuItems :node: (Node) The current node to render the menu for. Defaults to ``documentNode`` from the fusion context :maximumLevels: (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` -:renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. +:renderHiddenInMenu: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` Example:: @@ -986,7 +986,7 @@ The following fusion properties are passed over to :ref:`Neos_Neos__DimensionsMe :dimension: (optional, string): name of the dimension which this menu should be based on. Example: "language". :presets: (optional, array): If set, the presets rendered will be taken from this list of preset identifiers :includeAllPresets: (boolean, default **false**) If TRUE, include all presets, not only allowed combinations -:renderHiddenInIndex: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" +:renderHiddenInMenu: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` .. note:: The ``items`` of the ``DimensionsMenu`` are internally calculated with the prototype :ref:`Neos_Neos__DimensionsMenuItems` which @@ -1017,7 +1017,7 @@ Create a list of menu-items items for nodes. :maximumLevels: (integer) Restrict the maximum depth of items in the menu (relative to ``entryLevel``) :startingPoint: (optional, Node) The node where the menu hierarchy starts. If not specified explicitly the startingPoint is calculated from (``node`` and ``entryLevel``), defaults to ``null`` :filter: (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` -:renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` +:renderHiddenInMenu: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false``. :itemCollection: (optional, array of Nodes) Explicitly set the Node items for the menu (taking precedence over ``startingPoints`` and ``entryLevel`` and ``lastLevel``). The children for each ``Node`` will be fetched taking the ``maximumLevels`` property into account. @@ -1084,7 +1084,7 @@ Create a list of of menu-items for the breadcrumb (ancestor documents). :node: (Node) The current node to render the menu for. Defaults to ``documentNode`` from the fusion context :maximumLevels: (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` -:renderHiddenInIndex: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. +:renderHiddenInMenu: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` Example:: @@ -1107,7 +1107,7 @@ If no node variant exists for the preset combination, a ``NULL`` node will be in :dimension: (optional, string): name of the dimension which this menu should be based on. Example: "language". :presets: (optional, array): If set, the presets rendered will be taken from this list of preset identifiers :includeAllPresets: (boolean, default **false**) If TRUE, include all presets, not only allowed combinations -:renderHiddenInIndex: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" +:renderHiddenInMenu: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` Each ``item`` has the following properties: diff --git a/Neos.Neos/NodeTypes/Mixin/Document.yaml b/Neos.Neos/NodeTypes/Mixin/Document.yaml index 6fdfbaf2eda..c3277bf4344 100644 --- a/Neos.Neos/NodeTypes/Mixin/Document.yaml +++ b/Neos.Neos/NodeTypes/Mixin/Document.yaml @@ -59,7 +59,7 @@ _hidden: ui: reloadPageIfChanged: true - _hiddenInIndex: + hiddenInMenu: type: boolean ui: label: i18n diff --git a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature index d137b1b77ec..73cbcbec51c 100644 --- a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature +++ b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature @@ -15,7 +15,7 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes type: string uriPathSegment: type: string - _hiddenInIndex: + hiddenInIndex: type: bool 'Neos.Neos:Site': superTypes: @@ -63,7 +63,7 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes | a1b1b | a1b1 | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1b1b", "title": "Node a1b1b"} | a1b1b | | a1b2 | a1b | Neos.Neos:Test.DocumentType2 | {"uriPathSegment": "a1b2", "title": "Node a1b2"} | a1b2 | | a1b3 | a1b | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1b3", "title": "Node a1b3"} | a1b3 | - | a1c | a1 | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1c", "title": "Node a1c", "_hiddenInIndex": true} | a1c | + | a1c | a1 | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1c", "title": "Node a1c", "hiddenInIndex": true} | a1c | | a1c1 | a1c | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1c1", "title": "Node a1c1"} | a1c1 | And A site exists for node name "a" and domain "http://localhost" And the sites configuration is: From f9808e26b623638d0ace49957260793a4f7c2034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Mu=CC=88ller?= Date: Thu, 7 Mar 2024 09:36:58 +0100 Subject: [PATCH 02/11] Behat fix for menu rendering with hiddenInMenu --- Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature index 73cbcbec51c..541e1c5444f 100644 --- a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature +++ b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature @@ -15,7 +15,7 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes type: string uriPathSegment: type: string - hiddenInIndex: + hiddenInMenu: type: bool 'Neos.Neos:Site': superTypes: @@ -63,7 +63,7 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes | a1b1b | a1b1 | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1b1b", "title": "Node a1b1b"} | a1b1b | | a1b2 | a1b | Neos.Neos:Test.DocumentType2 | {"uriPathSegment": "a1b2", "title": "Node a1b2"} | a1b2 | | a1b3 | a1b | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1b3", "title": "Node a1b3"} | a1b3 | - | a1c | a1 | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1c", "title": "Node a1c", "hiddenInIndex": true} | a1c | + | a1c | a1 | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1c", "title": "Node a1c", "hiddenInMenu": true} | a1c | | a1c1 | a1c | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1c1", "title": "Node a1c1"} | a1c1 | And A site exists for node name "a" and domain "http://localhost" And the sites configuration is: @@ -352,12 +352,12 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes """ - Scenario: MenuItems (renderHiddenInIndex) + Scenario: MenuItems (renderHiddenInMenu) When I execute the following Fusion code: """fusion test = Neos.Neos:Test.Menu { items = Neos.Neos:MenuItems { - renderHiddenInIndex = true + renderHiddenInMenu = true } } """ From 565bff10986f6df249e5f80daea99806b2ac8590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Mu=CC=88ller?= Date: Mon, 11 Mar 2024 12:49:15 +0100 Subject: [PATCH 03/11] Adjust legacy migration and labels to hiddenInMenu --- .../Classes/NodeDataToEventsProcessor.php | 2 +- .../Classes/FlowQueryOperations/FilterOperation.php | 2 +- .../Classes/Fusion/AbstractMenuItemsImplementation.php | 4 ++-- .../Private/Translations/ar/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/cs/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/da/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/de/NodeTypes/Document.xlf | 2 +- .../Private/Translations/el/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/en/NodeTypes/Document.xlf | 2 +- .../Private/Translations/es/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/fi/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/fr/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/hu/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/id_ID/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/it/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/ja/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/km/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/lv/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/nl/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/no/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/pl/NodeTypes/Document.xlf | 6 +++--- .../Private/Translations/pt/NodeTypes/Document.xlf | 2 +- .../Private/Translations/pt_BR/NodeTypes/Document.xlf | 4 ++-- .../Private/Translations/ru/NodeTypes/Document.xlf | 4 ++-- .../Private/Translations/sr/NodeTypes/Document.xlf | 4 ++-- .../Private/Translations/sv/NodeTypes/Document.xlf | 4 ++-- .../Private/Translations/tl_PH/NodeTypes/Document.xlf | 4 ++-- .../Private/Translations/tr/NodeTypes/Document.xlf | 4 ++-- .../Private/Translations/uk/NodeTypes/Document.xlf | 4 ++-- .../Private/Translations/vi/NodeTypes/Document.xlf | 4 ++-- .../Private/Translations/zh/NodeTypes/Document.xlf | 4 ++-- .../Private/Translations/zh_TW/NodeTypes/Document.xlf | 4 ++-- Neos.Neos/Tests/Behavior/Features/Fusion/FlowQuery.feature | 4 ++-- 33 files changed, 77 insertions(+), 77 deletions(-) diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php index a621f5309e2..cfe8e1a8dea 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php @@ -378,7 +378,7 @@ public function extractPropertyValuesAndReferences(array $nodeDataRow, NodeType // hiddenInIndex is stored as separate column in the nodedata table, but we need it as (internal) property if ($nodeDataRow['hiddeninindex']) { - $properties['_hiddenInIndex'] = true; + $properties['hiddenInMenu'] = true; } if ($nodeType->isOfType(NodeTypeName::fromString('Neos.TimeableNodeVisibility:Timeable'))) { diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FilterOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FilterOperation.php index 97d586a8e92..ea12e20c0b1 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FilterOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/FilterOperation.php @@ -122,7 +122,7 @@ protected function getPropertyPath($element, $propertyPath) if ($propertyPath === '_identifier') { // TODO: deprecated (Neos <9 case) return $element->nodeAggregateId->value; - } elseif ($propertyPath[0] === '_' && $propertyPath !== '_hiddenInIndex') { + } elseif ($propertyPath[0] === '_') { return ObjectAccess::getPropertyPath($element, substr($propertyPath, 1)); } else { return $element->getProperty($propertyPath); diff --git a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php index 18c0ded20f3..a30e63316f0 100644 --- a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php @@ -149,12 +149,12 @@ abstract protected function buildItems(): array; protected function isNodeHidden(Node $node) { if ($this->getRenderHiddenInMenu() === true) { - // Please show hiddenInIndex nodes + // Please show hiddenInMenu nodes // -> node is *never* hidden! return false; } - // Node is hidden depending on the _hiddenInIndex property + // Node is hidden depending on the hiddenInMenu property return $node->getProperty('hiddenInMenu'); } diff --git a/Neos.Neos/Resources/Private/Translations/ar/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/ar/NodeTypes/Document.xlf index 74a8a479afe..d7c188cdda8 100644 --- a/Neos.Neos/Resources/Private/Translations/ar/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/ar/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment جزء من مسار URL - - Hide in menus - إخفاء في القوائم + + Hide in menus + إخفاء في القوائم diff --git a/Neos.Neos/Resources/Private/Translations/cs/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/cs/NodeTypes/Document.xlf index 4c0c4b4d23e..0bd687cc256 100644 --- a/Neos.Neos/Resources/Private/Translations/cs/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/cs/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Segment cesty adresy URL - - Hide in menus - Skrýt v menu + + Hide in menus + Skrýt v menu diff --git a/Neos.Neos/Resources/Private/Translations/da/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/da/NodeTypes/Document.xlf index 88eb66041b2..8269a2f251b 100644 --- a/Neos.Neos/Resources/Private/Translations/da/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/da/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL adressesegment - - Hide in menus - Skjul i menuer + + Hide in menus + Skjul i menuer diff --git a/Neos.Neos/Resources/Private/Translations/de/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/de/NodeTypes/Document.xlf index 33f56f2d736..39d815b8867 100644 --- a/Neos.Neos/Resources/Private/Translations/de/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/de/NodeTypes/Document.xlf @@ -11,7 +11,7 @@ URL path segment URL Pfadsegment - + Hide in menus In Menüs verbergen diff --git a/Neos.Neos/Resources/Private/Translations/el/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/el/NodeTypes/Document.xlf index f84c70cb9e9..aab2340d833 100644 --- a/Neos.Neos/Resources/Private/Translations/el/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/el/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL path segment - - Hide in menus - Κρυφό στα μενού + + Hide in menus + Κρυφό στα μενού diff --git a/Neos.Neos/Resources/Private/Translations/en/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/en/NodeTypes/Document.xlf index 00d11fc2e6e..8469025151e 100644 --- a/Neos.Neos/Resources/Private/Translations/en/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/en/NodeTypes/Document.xlf @@ -11,7 +11,7 @@ URL path segment - + Hide in menus diff --git a/Neos.Neos/Resources/Private/Translations/es/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/es/NodeTypes/Document.xlf index 6e5c98088c3..6dc1a90da53 100644 --- a/Neos.Neos/Resources/Private/Translations/es/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/es/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Segmento de ruta de URL - - Hide in menus - Ocultar en los menús + + Hide in menus + Ocultar en los menús diff --git a/Neos.Neos/Resources/Private/Translations/fi/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/fi/NodeTypes/Document.xlf index 37391b8c509..a90b3c282c6 100644 --- a/Neos.Neos/Resources/Private/Translations/fi/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/fi/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL-polun osa - - Hide in menus - Piilota valikoissa + + Hide in menus + Piilota valikoissa diff --git a/Neos.Neos/Resources/Private/Translations/fr/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/fr/NodeTypes/Document.xlf index 1b983a0be8d..fca65146bd8 100644 --- a/Neos.Neos/Resources/Private/Translations/fr/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/fr/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Segment d'URL - - Hide in menus - Cacher dans les menus + + Hide in menus + Cacher dans les menus diff --git a/Neos.Neos/Resources/Private/Translations/hu/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/hu/NodeTypes/Document.xlf index 5b45270dfd8..da3b51d122f 100644 --- a/Neos.Neos/Resources/Private/Translations/hu/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/hu/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL szegmens - - Hide in menus - Elrejtés a menüben + + Hide in menus + Elrejtés a menüben diff --git a/Neos.Neos/Resources/Private/Translations/id_ID/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/id_ID/NodeTypes/Document.xlf index 339798d9413..e87286032d2 100644 --- a/Neos.Neos/Resources/Private/Translations/id_ID/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/id_ID/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Segmen path URL - - Hide in menus - Sembunyikan di Menu + + Hide in menus + Sembunyikan di Menu diff --git a/Neos.Neos/Resources/Private/Translations/it/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/it/NodeTypes/Document.xlf index 4887f24b0f0..9908e9b9731 100644 --- a/Neos.Neos/Resources/Private/Translations/it/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/it/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Segmento di percorso URL - - Hide in menus - Nascondi nei menu + + Hide in menus + Nascondi nei menu diff --git a/Neos.Neos/Resources/Private/Translations/ja/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/ja/NodeTypes/Document.xlf index cb9aaef87e7..64e6babf5c3 100644 --- a/Neos.Neos/Resources/Private/Translations/ja/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/ja/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL パスセグメント - - Hide in menus - メニュー非表示 + + Hide in menus + メニュー非表示 diff --git a/Neos.Neos/Resources/Private/Translations/km/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/km/NodeTypes/Document.xlf index cbf91093ce3..caf5a07c412 100644 --- a/Neos.Neos/Resources/Private/Translations/km/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/km/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment បំណែកផ្លូវនៃតំណ - - Hide in menus - មិនបង្ហាុញក្នុងមីនុយ + + Hide in menus + មិនបង្ហាុញក្នុងមីនុយ diff --git a/Neos.Neos/Resources/Private/Translations/lv/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/lv/NodeTypes/Document.xlf index 1633085c3fa..bc4d85b6e30 100644 --- a/Neos.Neos/Resources/Private/Translations/lv/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/lv/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL segments - - Hide in menus - Paslēpt izvēlnē + + Hide in menus + Paslēpt izvēlnē diff --git a/Neos.Neos/Resources/Private/Translations/nl/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/nl/NodeTypes/Document.xlf index 6be62d17124..ef3a840a539 100644 --- a/Neos.Neos/Resources/Private/Translations/nl/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/nl/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL pad segment - - Hide in menus - Verberg in menu's + + Hide in menus + Verberg in menu's diff --git a/Neos.Neos/Resources/Private/Translations/no/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/no/NodeTypes/Document.xlf index 8205579ac5c..b61861affb8 100644 --- a/Neos.Neos/Resources/Private/Translations/no/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/no/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL-banesegment - - Hide in menus - Skjul i menyer + + Hide in menus + Skjul i menyer diff --git a/Neos.Neos/Resources/Private/Translations/pl/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/pl/NodeTypes/Document.xlf index fc17daa0889..9739b067486 100644 --- a/Neos.Neos/Resources/Private/Translations/pl/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/pl/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Segment ścieżki URL - - Hide in menus - Ukryj w menu + + Hide in menus + Ukryj w menu diff --git a/Neos.Neos/Resources/Private/Translations/pt/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/pt/NodeTypes/Document.xlf index 310986d4a13..c69b2e09a2f 100644 --- a/Neos.Neos/Resources/Private/Translations/pt/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/pt/NodeTypes/Document.xlf @@ -14,7 +14,7 @@ URL path segment Segmento de caminho de URL - + Hide in menus Ocultar em menus diff --git a/Neos.Neos/Resources/Private/Translations/pt_BR/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/pt_BR/NodeTypes/Document.xlf index af3854dfa6f..51de93f4a7d 100644 --- a/Neos.Neos/Resources/Private/Translations/pt_BR/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/pt_BR/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Segmento de URL - + Hide in menus - Esconder em menus + Esconder em menus diff --git a/Neos.Neos/Resources/Private/Translations/ru/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/ru/NodeTypes/Document.xlf index d8e771abbe4..70ca1a9bbf5 100644 --- a/Neos.Neos/Resources/Private/Translations/ru/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/ru/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Сегмент пути URL-адреса - + Hide in menus - Скрыть в меню + Скрыть в меню diff --git a/Neos.Neos/Resources/Private/Translations/sr/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/sr/NodeTypes/Document.xlf index 4561f58bf69..b61c828dfc0 100644 --- a/Neos.Neos/Resources/Private/Translations/sr/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/sr/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Сегмент URL путање - + Hide in menus - Сакривено у менију + Сакривено у менију diff --git a/Neos.Neos/Resources/Private/Translations/sv/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/sv/NodeTypes/Document.xlf index 8c710d59a77..e5d4c4476fd 100644 --- a/Neos.Neos/Resources/Private/Translations/sv/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/sv/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL-sökvägssegment - + Hide in menus - Dölj i menyer + Dölj i menyer diff --git a/Neos.Neos/Resources/Private/Translations/tl_PH/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/tl_PH/NodeTypes/Document.xlf index 3b426ba0275..7dda1678a82 100644 --- a/Neos.Neos/Resources/Private/Translations/tl_PH/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/tl_PH/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL path segment - + Hide in menus - Hide in menus + Hide in menus diff --git a/Neos.Neos/Resources/Private/Translations/tr/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/tr/NodeTypes/Document.xlf index 10be0efa791..677ff9ab331 100644 --- a/Neos.Neos/Resources/Private/Translations/tr/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/tr/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL yolu segmenti - + Hide in menus - Menülerde gizle + Menülerde gizle diff --git a/Neos.Neos/Resources/Private/Translations/uk/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/uk/NodeTypes/Document.xlf index a2918f802ac..d1c6cd0c742 100644 --- a/Neos.Neos/Resources/Private/Translations/uk/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/uk/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Сегмент адреси URL - + Hide in menus - Сховати до меню + Сховати до меню diff --git a/Neos.Neos/Resources/Private/Translations/vi/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/vi/NodeTypes/Document.xlf index 4700ec83d27..3781cc18f57 100644 --- a/Neos.Neos/Resources/Private/Translations/vi/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/vi/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment Phân đoạn đường dẫn URL - + Hide in menus - Ẩn trong menu + Ẩn trong menu diff --git a/Neos.Neos/Resources/Private/Translations/zh/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/zh/NodeTypes/Document.xlf index debc5db04b4..8b8b80080d1 100644 --- a/Neos.Neos/Resources/Private/Translations/zh/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/zh/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment URL 路径段 - + Hide in menus - 在菜单中隐藏 + 在菜单中隐藏 diff --git a/Neos.Neos/Resources/Private/Translations/zh_TW/NodeTypes/Document.xlf b/Neos.Neos/Resources/Private/Translations/zh_TW/NodeTypes/Document.xlf index 42ff61d4db0..4189a772f39 100644 --- a/Neos.Neos/Resources/Private/Translations/zh_TW/NodeTypes/Document.xlf +++ b/Neos.Neos/Resources/Private/Translations/zh_TW/NodeTypes/Document.xlf @@ -14,9 +14,9 @@ URL path segment 網址路徑 - + Hide in menus - 於選單中隱藏 + 於選單中隱藏 diff --git a/Neos.Neos/Tests/Behavior/Features/Fusion/FlowQuery.feature b/Neos.Neos/Tests/Behavior/Features/Fusion/FlowQuery.feature index b7073940274..f21aa288f68 100644 --- a/Neos.Neos/Tests/Behavior/Features/Fusion/FlowQuery.feature +++ b/Neos.Neos/Tests/Behavior/Features/Fusion/FlowQuery.feature @@ -15,7 +15,7 @@ Feature: Tests for the "Neos.ContentRepository" Flow Query methods. type: string uriPathSegment: type: string - _hiddenInIndex: + hiddenInMenu: type: bool 'Neos.Neos:Site': superTypes: @@ -71,7 +71,7 @@ Feature: Tests for the "Neos.ContentRepository" Flow Query methods. | a1b1b | a1b1 | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1b1b", "title": "Node a1b1b"} | a1b1b | | a1b2 | a1b | Neos.Neos:Test.DocumentType2 | {"uriPathSegment": "a1b2", "title": "Node a1b2"} | a1b2 | | a1b3 | a1b | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1b3", "title": "Node a1b3"} | a1b3 | - | a1c | a1 | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1c", "title": "Node a1c", "_hiddenInIndex": true} | a1c | + | a1c | a1 | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1c", "title": "Node a1c", "hiddenInMenu": true} | a1c | | a1c1 | a1c | Neos.Neos:Test.DocumentType1 | {"uriPathSegment": "a1c1", "title": "Node a1c1"} | a1c1 | And A site exists for node name "a" and domain "http://localhost" And the sites configuration is: From 0c47965a78f00937dc51c18bb53f44eb4ead3007 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Thu, 9 May 2024 09:44:10 +0200 Subject: [PATCH 04/11] TASK: Adjust comment in legacy migration --- .../Classes/NodeDataToEventsProcessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php index cfe8e1a8dea..224a3d2ecf8 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Classes/NodeDataToEventsProcessor.php @@ -376,7 +376,7 @@ public function extractPropertyValuesAndReferences(array $nodeDataRow, NodeType } } - // hiddenInIndex is stored as separate column in the nodedata table, but we need it as (internal) property + // hiddenInIndex is stored as separate column in the nodedata table, but we need it as property if ($nodeDataRow['hiddeninindex']) { $properties['hiddenInMenu'] = true; } From c9a3d1abbdee16a048b503529bc67a722a207653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Mu=CC=88ller?= Date: Thu, 9 May 2024 11:47:52 +0200 Subject: [PATCH 05/11] Adjust documentation --- Neos.Neos/Documentation/References/NeosFusionReference.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index 1e7967244ac..ecaa0e08f6f 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -1107,7 +1107,7 @@ If no node variant exists for the preset combination, a ``NULL`` node will be in :dimension: (optional, string): name of the dimension which this menu should be based on. Example: "language". :presets: (optional, array): If set, the presets rendered will be taken from this list of preset identifiers :includeAllPresets: (boolean, default **false**) If TRUE, include all presets, not only allowed combinations -:renderHiddenInMenu: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" +:renderHiddenInMenu: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-menu" :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` Each ``item`` has the following properties: From 8f6c36f51c257eff15fc882ec4d5938b5aff5f7b Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 10 May 2024 10:25:01 +0200 Subject: [PATCH 06/11] TASK: Adjust fusion inline documentation to `hiddenInMenu` --- .../Classes/Fusion/AbstractMenuItemsImplementation.php | 2 +- .../Documentation/References/NeosFusionReference.rst | 8 ++++---- .../Private/Fusion/Prototypes/BreadcrumbMenu.fusion | 2 +- .../Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion | 2 +- Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion | 2 +- .../Resources/Private/Fusion/Prototypes/MenuItems.fusion | 2 +- Neos.Neos/Resources/Private/Styles/_Tree.scss | 1 + 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php index a30e63316f0..c984480b5a8 100644 --- a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php @@ -24,7 +24,7 @@ * Base class for Menu and DimensionsMenu * * Main Options: - * - renderHiddenInMenu: if TRUE, hidden-in-index nodes will be shown in the menu. FALSE by default. + * - renderHiddenInMenu: if TRUE, nodes with the property ``hiddenInMenu`` will be shown in the menu. FALSE by default. */ abstract class AbstractMenuItemsImplementation extends AbstractFusionObject { diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index ecaa0e08f6f..99db1ded359 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -927,7 +927,7 @@ The following properties are passed over to :ref:`Neos_Neos__MenuItems` internal :maximumLevels: (integer) Restrict the maximum depth of items in the menu (relative to ``entryLevel``) :startingPoint: (optional, Node) The node where the menu hierarchy starts. If not specified explicitly the startingPoint is calculated from (``node`` and ``entryLevel``), defaults to ``null`` :filter: (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` -:renderHiddenInMenu: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` +:renderHiddenInMenu: (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered, defaults to ``false`` :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false``. :itemCollection: (optional, array of Nodes) Explicitly set the Node items for the menu (taking precedence over ``startingPoints`` and ``entryLevel`` and ``lastLevel``). The children for each ``Node`` will be fetched taking the ``maximumLevels`` property into account. @@ -957,7 +957,7 @@ The following properties are passed over to :ref:`Neos_Neos__BreadcrumbMenuItems :node: (Node) The current node to render the menu for. Defaults to ``documentNode`` from the fusion context :maximumLevels: (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` -:renderHiddenInMenu: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. +:renderHiddenInMenu: (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered (the current documentNode is always included), defaults to ``false``. :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` Example:: @@ -1017,7 +1017,7 @@ Create a list of menu-items items for nodes. :maximumLevels: (integer) Restrict the maximum depth of items in the menu (relative to ``entryLevel``) :startingPoint: (optional, Node) The node where the menu hierarchy starts. If not specified explicitly the startingPoint is calculated from (``node`` and ``entryLevel``), defaults to ``null`` :filter: (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` -:renderHiddenInMenu: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` +:renderHiddenInMenu: (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered, defaults to ``false`` :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false``. :itemCollection: (optional, array of Nodes) Explicitly set the Node items for the menu (taking precedence over ``startingPoints`` and ``entryLevel`` and ``lastLevel``). The children for each ``Node`` will be fetched taking the ``maximumLevels`` property into account. @@ -1084,7 +1084,7 @@ Create a list of of menu-items for the breadcrumb (ancestor documents). :node: (Node) The current node to render the menu for. Defaults to ``documentNode`` from the fusion context :maximumLevels: (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` -:renderHiddenInMenu: (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. +:renderHiddenInMenu: (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered (the current documentNode is always included), defaults to ``false``. :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` Example:: diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion index 0da25707ac1..efcc7fec79f 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion @@ -11,7 +11,7 @@ prototype(Neos.Neos:BreadcrumbMenu) < prototype(Neos.Fusion:Component) { # (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` maximumLevels = 0 - # (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. + # (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered (the current documentNode is always included), defaults to ``false``. renderHiddenInIndex = true # (boolean) activate the *expensive* calculation of item states defaults to ``false`` diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion index 8b128ba4eb8..6c5cc2dc182 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion @@ -6,7 +6,7 @@ prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Fusion:Component) { # (integer) Restrict the maximum depth of items in the menu, defaults to ``0`` maximumLevels = 0 - # (boolean) Whether nodes with ``hiddenInIndex`` should be rendered (the current documentNode is always included), defaults to ``false``. + # (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered (the current documentNode is always included), defaults to ``false``. renderHiddenInIndex = true # (boolean) activate the *expensive* calculation of item states defaults to ``false`` diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion index c435eb45e3c..1f896a826dc 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion @@ -22,7 +22,7 @@ prototype(Neos.Neos:Menu) < prototype(Neos.Fusion:Component) { # (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` filter = 'Neos.Neos:Document' - # (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` + # (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered, defaults to ``false`` renderHiddenInIndex = false # (boolean) activate the *expensive* calculation of item states defaults to ``false``. diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion index edf6bc37c60..b8b5202ca57 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion @@ -19,7 +19,7 @@ prototype(Neos.Neos:MenuItems) { # (string) Filter items by node type (e.g. ``'!My.Site:News,Neos.Neos:Document'``), defaults to ``'Neos.Neos:Document'``. The filter is only used for fetching subItems and is ignored for determining the ``startingPoint`` filter = 'Neos.Neos:Document' - # (boolean) Whether nodes with ``hiddenInIndex`` should be rendered, defaults to ``false`` + # (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered, defaults to ``false`` renderHiddenInIndex = false # (boolean) activate the *expensive* calculation of item states defaults to ``false``. diff --git a/Neos.Neos/Resources/Private/Styles/_Tree.scss b/Neos.Neos/Resources/Private/Styles/_Tree.scss index bdf01001691..ee25d121a8b 100644 --- a/Neos.Neos/Resources/Private/Styles/_Tree.scss +++ b/Neos.Neos/Resources/Private/Styles/_Tree.scss @@ -54,6 +54,7 @@ ul.neos-tree-container { } } + /* todo legacy, should now be named hiddenInMenu */ &.neos-hiddenInIndex { span + span { opacity: 0.5; From 019b29ed055d023c51fdc3c994da5b5cb75b45a0 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 10 May 2024 10:27:24 +0200 Subject: [PATCH 07/11] TASK: Adjust fusion dimension menu documentation to `hiddenInMenu` --- Neos.Neos/Documentation/References/NeosFusionReference.rst | 2 +- .../Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion | 2 +- .../Private/Fusion/Prototypes/DimensionsMenuItems.fusion | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Neos.Neos/Documentation/References/NeosFusionReference.rst b/Neos.Neos/Documentation/References/NeosFusionReference.rst index 99db1ded359..bc26a54be82 100644 --- a/Neos.Neos/Documentation/References/NeosFusionReference.rst +++ b/Neos.Neos/Documentation/References/NeosFusionReference.rst @@ -986,7 +986,7 @@ The following fusion properties are passed over to :ref:`Neos_Neos__DimensionsMe :dimension: (optional, string): name of the dimension which this menu should be based on. Example: "language". :presets: (optional, array): If set, the presets rendered will be taken from this list of preset identifiers :includeAllPresets: (boolean, default **false**) If TRUE, include all presets, not only allowed combinations -:renderHiddenInMenu: (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" +:renderHiddenInMenu: (boolean, default **true**) Whether nodes with the property ``hiddenInMenu`` should be rendered :calculateItemStates: (boolean) activate the *expensive* calculation of item states defaults to ``false`` .. note:: The ``items`` of the ``DimensionsMenu`` are internally calculated with the prototype :ref:`Neos_Neos__DimensionsMenuItems` which diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion index d5a75fb9ff6..bb61cdd769f 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion @@ -6,7 +6,7 @@ prototype(Neos.Neos:DimensionsMenu) < prototype(Neos.Fusion:Component) { # html attributes for the rendered list attributes = Neos.Fusion:DataStructure - # (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" + # (boolean, default **true**) Whether nodes with the property ``hiddenInMenu`` should be rendered renderHiddenInIndex = true # (optional, string): name of the dimension which this menu should be based on. Example: "language". diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion index 55629907ada..bc7c3822055 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion @@ -4,7 +4,7 @@ prototype(Neos.Neos:DimensionsMenuItems) { # (Node) The current node. Defaults to ``node`` from the fusion context node = ${documentNode} - # (boolean, default **true**) If TRUE, render nodes which are marked as "hidded-in-index" + # (boolean, default **true**) Whether nodes with the property ``hiddenInMenu`` should be rendered renderHiddenInIndex = true # (optional, string): name of the dimension which this menu should be based on. Example: "language". From ab7a4d79dd4a1ef31f9ab6bad9cda00700fc33c4 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 10 May 2024 10:29:00 +0200 Subject: [PATCH 08/11] TASK: Adjust fusion default value declaration to use `renderHiddenInIndex` --- .../Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion | 2 +- .../Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion | 4 ++-- .../Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion | 2 +- .../Private/Fusion/Prototypes/DimensionsMenuItems.fusion | 2 +- Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion | 2 +- .../Resources/Private/Fusion/Prototypes/MenuItems.fusion | 2 +- Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion index efcc7fec79f..fea328190b8 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion @@ -12,7 +12,7 @@ prototype(Neos.Neos:BreadcrumbMenu) < prototype(Neos.Fusion:Component) { maximumLevels = 0 # (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered (the current documentNode is always included), defaults to ``false``. - renderHiddenInIndex = true + renderHiddenInMenu = true # (boolean) activate the *expensive* calculation of item states defaults to ``false`` calculateItemStates = false diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion index 6c5cc2dc182..646f2f04938 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion @@ -7,7 +7,7 @@ prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Fusion:Component) { maximumLevels = 0 # (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered (the current documentNode is always included), defaults to ``false``. - renderHiddenInIndex = true + renderHiddenInMenu = true # (boolean) activate the *expensive* calculation of item states defaults to ``false`` calculateItemStates = false @@ -24,7 +24,7 @@ prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Fusion:Component) { currentItem = Neos.Neos:MenuItems { node = ${props.node} calculateItemStates = ${props.calculateItemStates} - renderHiddenInIndex = true + renderHiddenInMenu = true maximumLevels = ${props.maximumLevels} itemCollection = ${[documentNode]} } diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion index bb61cdd769f..e8150f3a315 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion @@ -7,7 +7,7 @@ prototype(Neos.Neos:DimensionsMenu) < prototype(Neos.Fusion:Component) { attributes = Neos.Fusion:DataStructure # (boolean, default **true**) Whether nodes with the property ``hiddenInMenu`` should be rendered - renderHiddenInIndex = true + renderHiddenInMenu = true # (optional, string): name of the dimension which this menu should be based on. Example: "language". dimension = null diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion index bc7c3822055..d45f3d09083 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenuItems.fusion @@ -5,7 +5,7 @@ prototype(Neos.Neos:DimensionsMenuItems) { node = ${documentNode} # (boolean, default **true**) Whether nodes with the property ``hiddenInMenu`` should be rendered - renderHiddenInIndex = true + renderHiddenInMenu = true # (optional, string): name of the dimension which this menu should be based on. Example: "language". dimension = null diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion index 1f896a826dc..cecb93848db 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion @@ -23,7 +23,7 @@ prototype(Neos.Neos:Menu) < prototype(Neos.Fusion:Component) { filter = 'Neos.Neos:Document' # (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered, defaults to ``false`` - renderHiddenInIndex = false + renderHiddenInMenu = false # (boolean) activate the *expensive* calculation of item states defaults to ``false``. calculateItemStates = false diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion index b8b5202ca57..c11b9762844 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/MenuItems.fusion @@ -20,7 +20,7 @@ prototype(Neos.Neos:MenuItems) { filter = 'Neos.Neos:Document' # (boolean) Whether nodes with the property ``hiddenInMenu`` should be rendered, defaults to ``false`` - renderHiddenInIndex = false + renderHiddenInMenu = false # (boolean) activate the *expensive* calculation of item states defaults to ``false``. calculateItemStates = false diff --git a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature index 541e1c5444f..2e4935ae410 100644 --- a/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature +++ b/Neos.Neos/Tests/Behavior/Features/Fusion/Menu.feature @@ -469,13 +469,13 @@ Feature: Tests for the "Neos.Neos:Menu" and related Fusion prototypes """ - Scenario: MenuItems (startingPoint a1c, renderHiddenInIndex) + Scenario: MenuItems (startingPoint a1c, renderHiddenInMenu) When I execute the following Fusion code: """fusion test = Neos.Neos:Test.Menu { items = Neos.Neos:MenuItems { startingPoint = ${q(node).find('#a1c').get(0)} - renderHiddenInIndex = true + renderHiddenInMenu = true } } """ From 3c1f5f5eafdf12db468294324fc1d8935472d067 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 10 May 2024 10:29:16 +0200 Subject: [PATCH 09/11] TASK: Remove obsolete constants from `AbstractMenuItemsImplementation` --- Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php index c984480b5a8..42c84415c97 100644 --- a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php @@ -28,11 +28,6 @@ */ abstract class AbstractMenuItemsImplementation extends AbstractFusionObject { - public const STATE_NORMAL = 'normal'; - public const STATE_CURRENT = 'current'; - public const STATE_ACTIVE = 'active'; - public const STATE_ABSENT = 'absent'; - /** * An internal cache for the built menu items array. * From 36a913d1a0f62ddb9e33094c98eb5a4139313437 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 10 May 2024 10:30:56 +0200 Subject: [PATCH 10/11] TASK: Adjust passed fusion properties to `renderHiddenInMenu` --- .../Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion | 2 +- .../Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion | 2 +- .../Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion | 2 +- Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion index fea328190b8..2c0be2b2649 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenu.fusion @@ -21,7 +21,7 @@ prototype(Neos.Neos:BreadcrumbMenu) < prototype(Neos.Fusion:Component) { items = Neos.Neos:BreadcrumbMenuItems { node = ${props.node} maximumLevels = ${props.maximumLevels} - renderHiddenInIndex = ${props.renderHiddenInIndex} + renderHiddenInMenu = ${props.renderHiddenInMenu} calculateItemStates = ${props.calculateItemStates} } } diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion index 646f2f04938..1fe593d93d5 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/BreadcrumbMenuItems.fusion @@ -16,7 +16,7 @@ prototype(Neos.Neos:BreadcrumbMenuItems) < prototype(Neos.Fusion:Component) { parentItems = Neos.Neos:MenuItems { node = ${props.node} calculateItemStates = ${props.calculateItemStates} - renderHiddenInIndex = ${props.renderHiddenInIndex} + renderHiddenInMenu = ${props.renderHiddenInMenu} maximumLevels = ${props.maximumLevels} itemCollection = ${Array.reverse(q(documentNode).parents('[instanceof Neos.Neos:Document]').get())} } diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion index e8150f3a315..599746ba283 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/DimensionsMenu.fusion @@ -24,7 +24,7 @@ prototype(Neos.Neos:DimensionsMenu) < prototype(Neos.Fusion:Component) { @private { items = Neos.Neos:DimensionsMenuItems { node = ${props.node} - renderHiddenInIndex = ${props.renderHiddenInIndex} + renderHiddenInMenu = ${props.renderHiddenInMenu} dimension = ${props.dimension} presets = ${props.presets} includeAllPresets = ${props.includeAllPresets} diff --git a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion index cecb93848db..4c0e00360da 100644 --- a/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion +++ b/Neos.Neos/Resources/Private/Fusion/Prototypes/Menu.fusion @@ -40,7 +40,7 @@ prototype(Neos.Neos:Menu) < prototype(Neos.Fusion:Component) { maximumLevels = ${props.maximumLevels} startingPoint = ${props.startingPoint} filter = ${props.filter} - renderHiddenInIndex = ${props.renderHiddenInIndex} + renderHiddenInMenu = ${props.renderHiddenInMenu} calculateItemStates = ${props.calculateItemStates} itemCollection = ${props.itemCollection} } From 71609dd085069dfabf75246453b21169dcfe8a5d Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 10 May 2024 10:32:48 +0200 Subject: [PATCH 11/11] TASK: Remove fallback layer for `renderHiddenInIndex` in Fusion --- .../Classes/Fusion/AbstractMenuItemsImplementation.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php index 42c84415c97..7595c4f060e 100644 --- a/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php +++ b/Neos.Neos/Classes/Fusion/AbstractMenuItemsImplementation.php @@ -72,13 +72,11 @@ public function isCalculateItemStatesEnabled(): bool /** * Should nodes that have "hiddenInMenu" set still be visible in this menu. - * - * @return boolean */ - public function getRenderHiddenInMenu() + public function getRenderHiddenInMenu(): bool { if ($this->renderHiddenInMenu === null) { - $this->renderHiddenInMenu = (bool)($this->fusionValue('renderHiddenInMenu') ?? $this->fusionValue('renderHiddenInIndex')); + $this->renderHiddenInMenu = (bool)$this->fusionValue('renderHiddenInMenu'); } return $this->renderHiddenInMenu;