Scheduler: refactor workspaces module (TS): part 3#33904
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors Scheduler workspace grouping strategies toward stronger TypeScript typing and adds all-day awareness to horizontal group-bounds calculations, continuing the ongoing workspaces module refactor.
Changes:
- Extends workspace group-bounds APIs to accept an optional
allDayflag and threads it through resizing logic. - Migrates horizontal/vertical grouped strategies to use a typed
workspacereference and introducesGroupBoundsOffsettyping. - Reuses shared
CellPositionDatain cell selection controller (removing a local duplicate type).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts | Adds optional allDay plumbing for group bounds and forwards it into the horizontal strategy. |
| packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_grouped_strategy_vertical.ts | Refactors vertical grouped strategy to use a typed workspace and adds return/param typings. |
| packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_grouped_strategy_horizontal.ts | Refactors horizontal grouped strategy typing, adds safer bounds computation paths, and threads allDay into coordinate->cell index mapping. |
| packages/devextreme/js/__internal/scheduler/workspaces/cells_selection_controller.ts | Replaces local GridPosition with shared CellPositionData. |
| packages/devextreme/js/__internal/scheduler/types.ts | Introduces GroupBoundsOffset interface. |
| packages/devextreme/js/__internal/scheduler/m_subscribes.ts | Passes allDay into workspace getGroupBounds for resizable area calculation. |
sjbur
commented
Jun 8, 2026
|
|
||
| if (!groupByDay) { | ||
| return { | ||
| rowIndex: cellCoordinates.rowIndex, | ||
| columnIndex: cellCoordinates.columnIndex + groupIndex * this._workSpace.getCellCount(), | ||
| // @ts-expect-error |
Contributor
Author
There was a problem hiding this comment.
Here and all new @ts-expect-error lines appeared because of strict typing. Many methods from workspace are private. In the task of replacing workspace with proxy config object those lines will be removed
aleksei-semikozov
previously approved these changes
Jun 9, 2026
Comment on lines
+1372
to
1374
| getTimePanelWidth(): number { | ||
| return this.$timePanel && getBoundingRect(this.$timePanel.get(0)).width; | ||
| } |
Comment on lines
+101
to
+103
| const extraOffset = cellWidth / 2; | ||
| const startLeft = startCell?.length ? (startCell.offset()?.left ?? 0) : undefined; | ||
| const endLeft = endCell?.length ? (endCell.offset()?.left ?? 0) : undefined; |
aleksei-semikozov
approved these changes
Jun 9, 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.