-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Collection children: A slim navigation of collection children + higher take above target #20641
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 children: A slim navigation of collection children + higher take above target #20641
Conversation
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 optimizes tree expansion behavior by refactoring the target child loading logic. The changes reduce initial page size for document collections in menus and improve the efficiency of child loading by avoiding unnecessary reloads.
- Changed initial page size for document collections from 2 to 1 item
- Moved target-already-loaded check from expansion manager to children manager's
loadChildren()method - Changed default takeBefore value to use the target pagination take size instead of hardcoded 5
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| document-tree-item.context.ts | Reduces setTargetTakeSize from (2,2) to (1,1) for collections in menu mode |
| tree-item-expansion.manager.ts | Removes target-already-loaded check, delegating this responsibility to children manager |
| tree-item-children.manager.ts | Adds target-already-loaded check at start of loadChildren() and changes default takeBefore fallback from hardcoded 5 to use getTakeSize() |
src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-children.manager.ts
Show resolved
Hide resolved
src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-children.manager.ts
Show resolved
Hide resolved
…r take above target (#20641) * enforce update of children when collection * only load one above and below collection children * take 50 above a target for default experience * revert reset target * remove old impl
When navigating to another item of a Collection via the tree (or the Collection), we only display 1 item above and 1 below.
And when deep linking, we extended items above from 5 to 50.