Skip to content

Conversation

@nielslyngsoe
Copy link
Member

@nielslyngsoe nielslyngsoe commented Oct 24, 2025

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.

@nielslyngsoe nielslyngsoe changed the title Collection children: forget already loaded items for a slim navigation of collection children. Collection children: A slim navigation of collection children + higher take above target Oct 31, 2025
@nielslyngsoe nielslyngsoe marked this pull request as ready for review October 31, 2025 09:18
Copilot AI review requested due to automatic review settings October 31, 2025 09:18
@nielslyngsoe nielslyngsoe enabled auto-merge (squash) October 31, 2025 09:18
Copy link
Contributor

Copilot AI left a 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()

@nielslyngsoe nielslyngsoe merged commit bd94522 into release/17.0 Oct 31, 2025
29 checks passed
@nielslyngsoe nielslyngsoe deleted the v17/hotfix/improve-collection-children-navigation branch October 31, 2025 09:52
nielslyngsoe added a commit that referenced this pull request Oct 31, 2025
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants