Skip to content

Commit

Permalink
TASK: Simplify initial workspace list rendering for the live case
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Jan 8, 2025
1 parent bfb52da commit a7bfcf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ prototype(Neos.Workspace.Ui:Component.WorkspaceTable) < prototype(Neos.Fusion:Co
</thead>
<tbody>
<Neos.Workspace.Ui:Component.WorkspaceTreeNode
workspaceName="live"
workspaceListItems={props.workspaceListItems}
/>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
<Neos.Workspace.Ui:Component.WorkspaceTableRow
workspaceListItem={props.workspaceListItem}
level={props.level}
@if={props.workspaceName != 'live'}
@if={props.workspaceListItem != null}
/>
<Neos.Fusion:Loop items={private.baseWorkspaceListItems} itemName="workspaceListItem">
<Neos.Workspace.Ui:Component.WorkspaceTreeNode
Expand Down

0 comments on commit a7bfcf8

Please sign in to comment.