Skip to content

Draggable, Sortable: fix errors and improve typing - #35481

Merged
EugeniyKiyashko merged 3 commits into
DevExpress:mainfrom
EugeniyKiyashko:typescript/draggable_sortable/typing_5275
Oct 6, 2026
Merged

EugeniyKiyashko merged 3 commits into
DevExpress:mainfrom
EugeniyKiyashko:typescript/draggable_sortable/typing_5275

Conversation

@EugeniyKiyashko

Copy link
Copy Markdown
Contributor

No description provided.

@EugeniyKiyashko EugeniyKiyashko self-assigned this Oct 5, 2026
@EugeniyKiyashko
EugeniyKiyashko marked this pull request as ready for review October 5, 2026 13:13
@EugeniyKiyashko
EugeniyKiyashko requested a review from a team as a code owner October 5, 2026 13:13
Copilot AI balanced review requested due to automatic review settings October 5, 2026 13:13

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.

Copilot review overview

🟡 Changes recommended

Event forwarding is malformed for sortable-to-draggable removals, and several callback payloads are incorrectly typed as never.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
What changed in this PR

Improves internal typing for Draggable and Sortable while preserving their drag-and-drop behavior.

Changes:

  • Adds typed event, option, geometry, and helper interfaces.
  • Replaces broad casts and dynamic calls with typed implementations.
  • Uses typed internal utility imports.
File Description
packages/​devextreme/​js/​__internal/​m_draggable.ts Adds generic properties and typed drag infrastructure.
packages/​devextreme/​js/​__internal/​m_sortable.ts Adds concrete typing across sortable operations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/devextreme/js/__internal/m_draggable.ts
Comment thread packages/devextreme/js/__internal/m_draggable.ts
Copilot AI balanced review requested due to automatic review settings October 5, 2026 20:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Comment thread packages/devextreme/js/__internal/m_draggable.ts
Comment thread packages/devextreme/js/__internal/m_draggable.ts
Comment thread packages/devextreme/js/__internal/m_draggable.ts
Comment thread packages/devextreme/js/__internal/m_draggable.ts
Comment thread packages/devextreme/js/__internal/m_sortable.ts Outdated
Comment thread packages/devextreme/js/__internal/m_sortable.ts
Copilot AI balanced review requested due to automatic review settings October 6, 2026 07:04

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.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 11:32
@EugeniyKiyashko
EugeniyKiyashko force-pushed the typescript/draggable_sortable/typing_5275 branch from 25cc758 to 8f89606 Compare October 6, 2026 11:32

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.

Copilot review overview

🔵 Needs a closer look

The extensive refactoring of core drag-and-drop paths warrants final human validation despite no confirmed defects.

Review effort: Balanced
Findings: None

export type DragEventArgs = Cancelable & {
event: DragEvent;
itemData: unknown;
itemElement: unknown;

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.

can we type it as dxElementWrapper, similar to DragStartArgs?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will improve in the next PRs

const clone = this.option('clone');
const $container = this._getContainer();
let template = this.option('dragTemplate');
const dragTemplate = this.option('dragTemplate');

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.

Suggested change
const dragTemplate = this.option('dragTemplate');
const { clone, dragTemplate } = this.option();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

will improve in the next PRs

@EugeniyKiyashko
EugeniyKiyashko added this pull request to the merge queue Oct 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 6, 2026
@EugeniyKiyashko
EugeniyKiyashko added this pull request to the merge queue Oct 6, 2026
Merged via the queue into DevExpress:main with commit 599df3d Oct 6, 2026
149 checks passed
@EugeniyKiyashko
EugeniyKiyashko deleted the typescript/draggable_sortable/typing_5275 branch October 6, 2026 19:00
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.

3 participants