Scheduler: Multilevel grouping — Update group utils#34333
Open
sjbur wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Scheduler resource grouping utilities to support hierarchical (parent/child) resources and to build group leafs based on hierarchy leaves (enabling multilevel grouping without treating hierarchy parents as selectable “bands”).
Changes:
- Added helpers in
group_utils.tsto build group nodes from either flat resource items or a hierarchy tree and to attach resources by leaf nodes. - Updated grouping logic to collect only hierarchy leaf nodes for
groupLeafswhile preserving the full hierarchy ingroupTree. - Expanded Jest tests to cover hierarchical-only grouping, hierarchical+flat combinations, and empty-datasource edge cases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/devextreme/js/__internal/scheduler/utils/resource_manager/group_utils.ts | Refactors grouping to support hierarchical resources and leaf-based attachment logic. |
| packages/devextreme/js/__internal/scheduler/utils/resource_manager/group_utils.test.ts | Adds/updates tests for hierarchical grouping behavior and mixed resource scenarios. |
Comment on lines
+103
to
+107
| const nodes = createResourceNodes(resource); | ||
|
|
||
| if (leafs.length > 0 && isVirtualRoot(leafs[0])) { | ||
| head[0].children = nodes; | ||
| leafs = collectGroupLeaves(nodes); |
Contributor
Author
There was a problem hiding this comment.
Valid. Fixed and added regression test
sjbur
marked this pull request as ready for review
July 16, 2026 13:54
aleksei-semikozov
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.