Skip to content

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

Closed
bit-byte0 wants to merge 1 commit into
DevExpress:26_1from
bit-byte0:refactor/scheduler-grouped-strategy-config
Closed

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

Conversation

@bit-byte0

Copy link
Copy Markdown
Contributor

What:

Grouped strategies now receive a typed config object instead of the entire workspace.

How:

  • New WorkspaceGroupedStrategyConfig interface with only needed callbacks
  • initGroupedStrategy() builds the config from workspace methods
  • All @ts-expect-error removed from both strategy files

@bit-byte0 bit-byte0 self-assigned this Jun 9, 2026
Copilot AI review requested due to automatic review settings June 9, 2026 17:37
@bit-byte0 bit-byte0 requested a review from a team as a code owner June 9, 2026 17:37
@bit-byte0 bit-byte0 added the 26_1 label Jun 9, 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 accept a focused, typed WorkspaceGroupedStrategyConfig object instead of the full workspace instance, aiming to reduce coupling and remove @ts-expect-error usage in grouped strategy implementations.

Changes:

  • Introduced WorkspaceGroupedStrategyConfig and updated both horizontal/vertical grouped strategy classes to use it.
  • Updated SchedulerWorkSpace.initGroupedStrategy() to construct and pass the config object.
  • Added Jest coverage validating strategy construction/behavior with the new config object.

Reviewed changes

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

Show a summary per file
File Description
packages/devextreme/js/__internal/scheduler/workspaces/work_space_grouped_strategy_vertical.ts Switched vertical grouped strategy from workspace dependency to typed config callbacks.
packages/devextreme/js/__internal/scheduler/workspaces/work_space_grouped_strategy_horizontal.ts Switched horizontal grouped strategy from workspace dependency to typed config callbacks.
packages/devextreme/js/__internal/scheduler/workspaces/types.ts Added WorkspaceGroupedStrategyConfig interface defining the grouped strategy dependency surface.
packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts Builds and passes the config object when initializing grouped strategy.
packages/devextreme/js/__internal/scheduler/tests/grouped_strategy.test.ts Added unit tests ensuring grouped strategies work with the config interface.

Comment thread packages/devextreme/js/__internal/scheduler/workspaces/types.ts
@bit-byte0 bit-byte0 force-pushed the refactor/scheduler-grouped-strategy-config branch from 0c2749c to 9c22a9b Compare June 10, 2026 08:15
@bit-byte0 bit-byte0 closed this Jun 10, 2026
@bit-byte0 bit-byte0 deleted the refactor/scheduler-grouped-strategy-config branch June 10, 2026 10:17
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.

2 participants