YN-0177: add expand/collapse functionality to the left pane in all tabs#1695
Conversation
… handling in `Slicer` component
…or improved context menu handling and code organization
… and improved context menu logic in `Slicer` component
…pdate context menu in `Slicer` component
…ependencies, and context menu actions in `Slicer` component
Innders
left a comment
There was a problem hiding this comment.
The feature works but I think we could better architure the code to make it more reusable.
Expanding and collapsing all rows is not just a slicer specific action but is useful for all hierarchical tables.
Can this be built into the SimpleTable component so that all tables that use this component can have this functionality.
I think it could work the same way that it does in ProjectTreeTable context menu https://github.com/ynput/ayon-frontend/blob/8c5ca2a15245f3c88dcfe02d05d4922f53176f00/shared/src/containers/ProjectTreeTable/hooks/useCellContextMenu.ts. There are some built-in context menu items like these two and then you can add more custom ones yourself.
The context menu items are also functions. This means that to component can provide useful data to the context menu inside of the component, making it far easier for context menu items to be written outside of the component.
…ntext menu handling - Added support for `menuItems` and `onContextMenu` in `SimpleTableContext`. - Introduced context menu logic and descendant ID handling for expand/collapse actions. - Renamed `useSlicerMenuItems` to `useSimpleTableMenu` for consistency and updated related references. - Refactored `useListContextMenu` to return precomputed `menuItems` instead of handling full context logic. - Updated `Slicer` and `ListsTable` components to utilize new menu item handling and context menu actions.
…or cleaner debugging and improved readability
…collapse logic to `SimpleTableContext` - Eliminated the `useSimpleTableMenu` hook from Slicer. - Integrated alt-click handling for expand/collapse directly into `SimpleTableContext`. - Updated `Slicer` component to use the refactored context handling via `SlicerTable`.
…collapse logic to `SimpleTableContext` - Eliminated the `useSimpleTableMenu` hook from Slicer. - Integrated alt-click handling for expand/collapse directly into `SimpleTableContext`. - Updated `Slicer` component to use the refactored context handling via `SlicerTable`.
…ality-to-the-left-pane-in-all-tabs
…e` and `ProjectTreeTable` - Introduced Alt+Click handler to simplify expand/collapse actions. - Enhanced metadata handling for context menu logic with pre-computed row information. - Updated `SimpleTable` and `ProjectTreeTable` to utilize the new functionality.
…ality-to-the-left-pane-in-all-tabs
…ality-to-the-left-pane-in-all-tabs
There was a problem hiding this comment.
-
option+clickshould be a modifier on the expand icon, not the whole row. -
option+clickon the middle table folders expand icon does not work now.
How it currently works and how it should work on the simple table as well
Screen.Recording.2026-03-04.at.06.57.54.mov
…r improved row expansion handling and context consistency
Description of changes
This PR adds missing expand/collapse functionality to the left pane (Slicer) to match the behavior already available in the middle pane (e.g., in Overview or Products).
Users will now be able to expand/collapse items directly in the Slicer using:
• Context menu actions (Expand All / Collapse All)
• Key-modifier click on the expand toggle (⌥ Option key) to expand/collapse all children recursively
This brings feature parity between the Slicer and other tree-based views.
Technical details
Implemented context menu support in Slicer using useCreateContextMenu.
Added new menu builder hook useSectionMenuItems for:
Expand All
Collapse All
(Placeholder) Delete action
Integrated context menu with SimpleTable via pt.row.onContextMenu.
Added recursive expand/collapse logic in handleExpand and handleCollapse.
Prepared structure for further Slicer actions.
Additional context