Problem Statement
In the Content Drive portlet, right-clicking a folder in the left side-panel folder tree does nothing. On the main table, right-clicking a folder (or using its kebab menu) opens a context menu with folder actions (Edit folder, Edit permissions). Users reasonably expect the same right-click menu on the sidebar tree, but there is no equivalent wiring, so folder actions are unreachable from the tree.
Impact: Usability gap / inconsistency — folder actions are only reachable from the table, not from the sidebar tree where users spend most of their navigation time. Front-end (Angular admin UI).
Root cause / blocker
The two views are backed by different data:
| View |
Source |
Folder object |
Table (dot-folder-list-view) |
POST /api/v1/drive/search |
Full DotContentDriveFolder including permissions (+ title, sortOrder, filesMasks, defaultFileType, showOnMenu, …) |
Sidebar tree (dot-tree-folder / dot-content-drive-sidebar) |
POST /api/v1/folder/search |
FolderSearchResultView — only id, inode, path, hostName, addChildrenAllowed — no permissions, none of the full folder fields |
The shared context menu (dot-folder-list-context-menu) is driven by the store (patchContextMenu({ triggeredEvent, contentlet })) and gates its items on contentlet.permissions (EDIT → Edit folder, EDIT_PERMISSIONS → Edit permissions). The Edit folder dialog also needs the full folder fields as its payload.
So simply adding a (contextmenu) handler to the tree node is not enough — with the byPath data the menu would render empty (permission gate fails) and the edit dialog would be missing fields.
Proposed resolution options (team to decide)
- Backend: add
permissions (and the folder fields the edit dialog needs) to POST /api/v1/folder/byPath / FolderSearchResultView, giving the sidebar parity with the table.
- Frontend: on right-click, fetch the full folder + permissions before opening the menu (extra request per right-click; needs an endpoint that returns permissions for a single folder).
- Frontend: show the folder actions ungated in the sidebar and let the backend enforce permissions when the action runs (diverges from the table's permission-aware menu).
Steps to Reproduce
- Open Content Drive.
- In the left side-panel, expand the folder tree.
- Right-click any folder in the tree.
- Expected: a context menu appears with the same folder actions as the table (Edit folder, Edit permissions).
- Actual: nothing happens — no context menu.
For comparison: right-clicking a folder row in the table opens the context menu as expected.
Acceptance Criteria
dotCMS Version
Latest from main branch.
Severity
Low - Minor issue or cosmetic
Notes
Split out from the same work as the "New button — create content in the current folder" fix (Content Drive). Relevant files:
core-web/libs/portlets/dot-content-drive/ui/src/lib/dot-tree-folder/
core-web/libs/portlets/dot-content-drive/portlet/src/lib/components/dot-content-drive-sidebar/
core-web/libs/portlets/dot-content-drive/portlet/src/lib/components/dot-folder-list-context-menu/
dotCMS/.../rest/api/v1/folder/FolderResource#byPath / FolderSearchResultView
Problem Statement
In the Content Drive portlet, right-clicking a folder in the left side-panel folder tree does nothing. On the main table, right-clicking a folder (or using its kebab menu) opens a context menu with folder actions (Edit folder, Edit permissions). Users reasonably expect the same right-click menu on the sidebar tree, but there is no equivalent wiring, so folder actions are unreachable from the tree.
Impact: Usability gap / inconsistency — folder actions are only reachable from the table, not from the sidebar tree where users spend most of their navigation time. Front-end (Angular admin UI).
Root cause / blocker
The two views are backed by different data:
dot-folder-list-view)POST /api/v1/drive/searchDotContentDriveFolderincludingpermissions(+title,sortOrder,filesMasks,defaultFileType,showOnMenu, …)dot-tree-folder/dot-content-drive-sidebar)POST /api/v1/folder/searchFolderSearchResultView— onlyid,inode,path,hostName,addChildrenAllowed— no permissions, none of the full folder fieldsThe shared context menu (
dot-folder-list-context-menu) is driven by the store (patchContextMenu({ triggeredEvent, contentlet })) and gates its items oncontentlet.permissions(EDIT → Edit folder, EDIT_PERMISSIONS → Edit permissions). The Edit folder dialog also needs the full folder fields as its payload.So simply adding a
(contextmenu)handler to the tree node is not enough — with the byPath data the menu would render empty (permission gate fails) and the edit dialog would be missing fields.Proposed resolution options (team to decide)
permissions(and the folder fields the edit dialog needs) toPOST /api/v1/folder/byPath/FolderSearchResultView, giving the sidebar parity with the table.Steps to Reproduce
For comparison: right-clicking a folder row in the table opens the context menu as expected.
Acceptance Criteria
dotCMS Version
Latest from
mainbranch.Severity
Low - Minor issue or cosmetic
Notes
Split out from the same work as the "New button — create content in the current folder" fix (Content Drive). Relevant files:
core-web/libs/portlets/dot-content-drive/ui/src/lib/dot-tree-folder/core-web/libs/portlets/dot-content-drive/portlet/src/lib/components/dot-content-drive-sidebar/core-web/libs/portlets/dot-content-drive/portlet/src/lib/components/dot-folder-list-context-menu/dotCMS/.../rest/api/v1/folder/FolderResource#byPath/FolderSearchResultView