Skip to content

Scheduler: workspace refactor — pass config object instead of workspace for groupedStrategy#33957

Merged
bit-byte0 merged 1 commit into
DevExpress:26_1from
bit-byte0:refactor/scheduler-grouped-strategy-pass-config
Jun 11, 2026
Merged

Scheduler: workspace refactor — pass config object instead of workspace for groupedStrategy#33957
bit-byte0 merged 1 commit into
DevExpress:26_1from
bit-byte0:refactor/scheduler-grouped-strategy-pass-config

Conversation

@bit-byte0

Copy link
Copy Markdown
Contributor

What:

Grouped strategies no longer depend on the entire workspace object

How:

Extracted a GroupedStrategyConfig interface with only the methods/options strategies actually use. Workspace passes a config object with bound closures instead of this. Removed all @ts-expect-error lines from both strategy files.

@bit-byte0 bit-byte0 self-assigned this Jun 11, 2026
Copilot AI review requested due to automatic review settings June 11, 2026 08:43
@bit-byte0 bit-byte0 requested a review from a team as a code owner June 11, 2026 08:43
@bit-byte0 bit-byte0 added the 26_1 label Jun 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors Scheduler grouped strategies to depend on a narrower GroupedStrategyConfig contract instead of the full workspace instance, with the goal of removing workspace coupling and eliminating @ts-expect-error usage in the strategy implementations.

Changes:

  • Introduced GroupedStrategyConfig to encapsulate only the APIs grouped strategies need.
  • Updated horizontal/vertical grouped strategies to consume config instead of workspace.
  • Updated SchedulerWorkSpace to create and pass a bound config object into the selected grouped strategy.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
packages/devextreme/js/__internal/scheduler/workspaces/work_space_grouped_strategy_vertical.ts Replaced workspace dependencies with GroupedStrategyConfig calls in the vertical strategy.
packages/devextreme/js/__internal/scheduler/workspaces/work_space_grouped_strategy_horizontal.ts Replaced workspace dependencies with GroupedStrategyConfig calls in the horizontal strategy.
packages/devextreme/js/__internal/scheduler/workspaces/work_space_grouped_strategy_config.ts Added the new GroupedStrategyConfig interface used by grouped strategies.
packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts Added createGroupedStrategyConfig() and updated grouped-strategy instantiation to pass the config object.

@bit-byte0 bit-byte0 force-pushed the refactor/scheduler-grouped-strategy-pass-config branch from 67a4611 to 2f75943 Compare June 11, 2026 08:59
Copilot AI review requested due to automatic review settings June 11, 2026 09:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts Outdated
Comment thread packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts Outdated
@bit-byte0 bit-byte0 force-pushed the refactor/scheduler-grouped-strategy-pass-config branch from 9e03880 to 31442de Compare June 11, 2026 10:10
Copilot AI review requested due to automatic review settings June 11, 2026 10:55
@bit-byte0 bit-byte0 force-pushed the refactor/scheduler-grouped-strategy-pass-config branch from 31442de to d5cc496 Compare June 11, 2026 10:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@bit-byte0 bit-byte0 merged commit 99f9b45 into DevExpress:26_1 Jun 11, 2026
122 of 124 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants