-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Collection: hide children of collection until active child #20392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection: hide children of collection until active child #20392
Conversation
… v17/feature/stop-opening-modals-in-collections
…tions # Conflicts: # src/Umbraco.Web.UI.Client/src/packages/core/tree/data/types.ts # src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/views/grid/document-grid-collection-view.element.ts
…lection/views/table/document-table-collection-view.element.ts Co-authored-by: Copilot <[email protected]>
…re/hide-expand-children-of-collection
…ction # Conflicts: # src/Umbraco.Web.UI.Client/src/packages/core/tree/components/tree-load-more-button.element.ts # src/Umbraco.Web.UI.Client/src/packages/core/tree/components/tree-load-prev-button.element.ts # src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-context-base.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the collection behavior in the document tree by hiding children of collection items until one becomes active. When a document type has a collection configured, the expand symbol is replaced with a collection shortcut icon. Users are directed to the Collection Workspace View instead of expanding tree items, and descendant items will show the unfolded tree structure to provide visual navigation context.
- Replaces expand symbols with collection shortcuts for document types with collections
- Implements URL parameter handling for
openCollectionto navigate to collection views - Adds active descendant tracking to show tree structure when collection children are active
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| document-workspace-split-view.element.ts | Adds URL parameter detection and routing to collection view |
| document-workspace-editor.element.ts | Preserves query parameters in routes and handles collection navigation |
| document-tree-item.element.ts | Replaces expand symbol with collection icon for items with collections |
| document-tree-item.context.ts | Implements collection-specific navigation and active descendant management |
| document-item-data-resolver.ts | Adds collection detection properties and methods |
| workspace-editor.element.ts | Updates route structure to include unique identifiers |
| tree.context.interface.ts | Adds active manager interface |
| tree-menu-item.element.ts | Passes menu context to tree items |
| tree-item-context.interface.ts | Adds menu state methods |
| tree-item-children.manager.ts | Implements target-based pagination control |
| tree-item-element-base.ts | Adds menu state and custom expand symbol rendering |
| tree-item-context-base.ts | Implements active descendant tracking and menu state management |
| tree/index.ts | Exports active manager functionality |
| default-tree.element.ts | Passes menu state to child components |
| default-tree.context.ts | Initializes active manager |
| tree-active-manager.ts | New manager for tracking active tree items and descendants |
| tree-active-manager.test.ts | Unit tests for active manager functionality |
| active-manager/index.ts | Exports active manager module |
| route.context.ts | Fixes active path getter method |
| content-type-design-editor.element.ts | Updates routes type definition |
...I.Client/src/packages/documents/documents/workspace/document-workspace-split-view.element.ts
Outdated
Show resolved
Hide resolved
....Web.UI.Client/src/packages/documents/documents/tree/tree-item/document-tree-item.context.ts
Outdated
Show resolved
Hide resolved
src/Umbraco.Web.UI.Client/src/packages/documents/documents/item/document-item-data-resolver.ts
Outdated
Show resolved
Hide resolved
…kspace/document-workspace-split-view.element.ts Co-authored-by: Copilot <[email protected]>
…e/tree-item/document-tree-item.context.ts Co-authored-by: Copilot <[email protected]>
…m/document-item-data-resolver.ts Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested out, I am happy with how the feature works. 🚀
Replaces the Expand-symbol with a Collection Shortcut when a Document-Type has a Collection configured.

This means the user can't expand the children of a Item with a Collection, but instead will be lead into the Collection Workspace View.
Once the user opens a descendant item of the Item with a Collection, then the tree unfolds to display its origin.

This provides a visual anchor for the user, additionally enabling navigation into substructures of a Collection.