From a7bfcf83d24b38d86cfa4855fa49caa6d37922c9 Mon Sep 17 00:00:00 2001
From: mhsdesign <85400359+mhsdesign@users.noreply.github.com>
Date: Wed, 8 Jan 2025 17:45:26 +0100
Subject: [PATCH] TASK: Simplify initial workspace list rendering for the live
case
---
.../Features/Workspace/Components/WorkspaceTable.fusion | 1 -
.../Workspace/Components/WorkspaceTreeNode.fusion | 9 ++++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/Neos.Workspace.Ui/Resources/Private/Fusion/Features/Workspace/Components/WorkspaceTable.fusion b/Neos.Workspace.Ui/Resources/Private/Fusion/Features/Workspace/Components/WorkspaceTable.fusion
index 8149a1fe82..44c7bf6fff 100644
--- a/Neos.Workspace.Ui/Resources/Private/Fusion/Features/Workspace/Components/WorkspaceTable.fusion
+++ b/Neos.Workspace.Ui/Resources/Private/Fusion/Features/Workspace/Components/WorkspaceTable.fusion
@@ -45,7 +45,6 @@ prototype(Neos.Workspace.Ui:Component.WorkspaceTable) < prototype(Neos.Fusion:Co
diff --git a/Neos.Workspace.Ui/Resources/Private/Fusion/Features/Workspace/Components/WorkspaceTreeNode.fusion b/Neos.Workspace.Ui/Resources/Private/Fusion/Features/Workspace/Components/WorkspaceTreeNode.fusion
index da573e4013..076cb303e5 100644
--- a/Neos.Workspace.Ui/Resources/Private/Fusion/Features/Workspace/Components/WorkspaceTreeNode.fusion
+++ b/Neos.Workspace.Ui/Resources/Private/Fusion/Features/Workspace/Components/WorkspaceTreeNode.fusion
@@ -2,23 +2,22 @@
# Renders a single workspace list item and its subworkspaces
#
prototype(Neos.Workspace.Ui:Component.WorkspaceTreeNode) < prototype(Neos.Fusion:Component) {
- /// Neos\Workspace\Ui\ViewModel\WorkspaceListItem
+ /// Neos\Workspace\Ui\ViewModel\WorkspaceListItem|null
workspaceListItem = null
/// Neos\Workspace\Ui\ViewModel\WorkspaceListItems
- workspaceListItems = ${{}}
+ workspaceListItems = null
/// int
level = 0
@private {
- workspaceName = ${props.workspaceListItem ? props.workspaceListItem.name : 'live'}
- baseWorkspaceListItems = ${Array.filter(props.workspaceListItems, (workspaceListItem) => workspaceListItem.baseWorkspaceName == private.workspaceName)}
+ baseWorkspaceListItems = ${Array.filter(props.workspaceListItems, (workspaceListItem) => workspaceListItem.baseWorkspaceName == (props.workspaceListItem.name || 'live'))}
}
renderer = afx`