Skip to content

Scheduler: refactor core files (TS) - Part 1#33826

Open
bit-byte0 wants to merge 5 commits into
DevExpress:26_1from
bit-byte0:refactor/scheduler-core-ts-part-1
Open

Scheduler: refactor core files (TS) - Part 1#33826
bit-byte0 wants to merge 5 commits into
DevExpress:26_1from
bit-byte0:refactor/scheduler-core-ts-part-1

Conversation

@bit-byte0
Copy link
Copy Markdown
Contributor

What

rename m_classes.ts and m_loading.ts to enable strict TS/ESLint rules, add proper types to loading module

How

replace Deferred with native Promise, type all params/returns, fix call sites with .get(0) and .catch(noop), update ~14 import paths

@bit-byte0 bit-byte0 self-assigned this Jun 3, 2026
@bit-byte0 bit-byte0 requested a review from a team as a code owner June 3, 2026 16:30
Copilot AI review requested due to automatic review settings June 3, 2026 16:30
@bit-byte0 bit-byte0 added the 26_1 label Jun 3, 2026
Copy link
Copy Markdown
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 refactors DevExtreme Scheduler internal core modules to support stricter TS/ESLint rules by renaming m_classes.tsclasses.ts and m_loading.tsloading.ts, converting the loading helper from Deferred to native Promise, and updating import paths and call sites accordingly.

Changes:

  • Introduced new __internal/scheduler/classes.ts and updated Scheduler/Workspace/Appointment modules to import CSS class constants from it.
  • Replaced __internal/scheduler/m_loading.ts with __internal/scheduler/loading.ts using native Promises and stronger types, and updated consumers/tests.
  • Updated a few call sites to pass DOM elements (.get(0)) and to attach rejection handlers (.catch(noop)) where needed.

Reviewed changes

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

Show a summary per file
File Description
packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/loading.tests.js Updates test import path and adjusts async expectations for the Promise-based loading helper.
packages/devextreme/js/__internal/scheduler/workspaces/m_work_space.ts Switches class-constant imports to ../classes.
packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_indicator.ts Switches HEADER_CURRENT_TIME_CELL_CLASS import to ../classes.
packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_grouped_strategy_vertical.ts Switches grouped-strategy class imports to ../classes.
packages/devextreme/js/__internal/scheduler/workspaces/m_work_space_grouped_strategy_horizontal.ts Switches grouped-strategy class imports to ../classes.
packages/devextreme/js/__internal/scheduler/workspaces/m_timeline.ts Switches timeline workspace class imports to ../classes.
packages/devextreme/js/__internal/scheduler/workspaces/m_agenda.ts Switches agenda workspace class imports to ../classes.
packages/devextreme/js/__internal/scheduler/r1/utils/base.ts Switches VERTICAL_GROUP_COUNT_CLASSES import to ../../classes.
packages/devextreme/js/__internal/scheduler/m_scheduler.ts Updates loading helper import and adjusts showLoading options to pass DOM elements.
packages/devextreme/js/__internal/scheduler/m_loading.ts Removes legacy Deferred-based loading helper implementation.
packages/devextreme/js/__internal/scheduler/loading.ts Adds Promise-based, typed loading helper replacing m_loading.ts.
packages/devextreme/js/__internal/scheduler/classes.ts Adds renamed/exported Scheduler class-name constants (replacement for m_classes.ts).
packages/devextreme/js/__internal/scheduler/appointments/m_appointment_layout.ts Switches appointment layout class imports to ../classes.
packages/devextreme/js/__internal/scheduler/appointments/m_appointment_collection.ts Switches appointment collection class imports to ../classes and adjusts import ordering.
packages/devextreme/js/__internal/scheduler/appointments/appointment/m_appointment.ts Switches appointment class imports to ../../classes.
packages/devextreme/js/__internal/scheduler/appointments/appointment/agenda_appointment.ts Switches agenda appointment class imports to ../../classes.
packages/devextreme/js/__internal/scheduler/appointment_popup/popup.ts Updates loading helper import, adjusts container to DOM element, and handles Promise rejections.

Comment thread packages/devextreme/js/__internal/scheduler/m_scheduler.ts Outdated
Comment thread packages/devextreme/js/__internal/scheduler/loading.ts
Copilot AI review requested due to automatic review settings June 4, 2026 09:12
Copy link
Copy Markdown
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

Copilot reviewed 17 out of 18 changed files in this pull request and generated 1 comment.

Comment thread packages/devextreme/js/__internal/scheduler/m_scheduler.ts Outdated
Comment thread packages/devextreme/js/__internal/scheduler/m_scheduler.ts Outdated
Comment thread packages/devextreme/js/__internal/scheduler/loading.ts
sjbur
sjbur previously approved these changes Jun 4, 2026
Copilot AI review requested due to automatic review settings June 4, 2026 16:44
@bit-byte0 bit-byte0 dismissed stale reviews from sjbur and aleksei-semikozov via 4a74bc6 June 4, 2026 16:44
Copy link
Copy Markdown
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

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

Comment thread packages/devextreme/js/__internal/scheduler/m_scheduler.ts
Comment thread packages/devextreme/js/__internal/scheduler/loading.ts
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