Skip to content

GridCore data: Relocate _editingController to editing data-extenders (virtual scrolling) - #34875

Merged
bit-byte0 merged 2 commits into
DevExpress:mainfrom
bit-byte0:refactor/gridcore-virtual-scrolling-split-module-26_2
Aug 25, 2026
Merged

GridCore data: Relocate _editingController to editing data-extenders (virtual scrolling)#34875
bit-byte0 merged 2 commits into
DevExpress:mainfrom
bit-byte0:refactor/gridcore-virtual-scrolling-split-module-26_2

Conversation

@bit-byte0

Copy link
Copy Markdown
Contributor

What

Extracts the virtual scrolling data-controller extender into its own file and moves the module registration and constants into separate files

How

Mirrors the summary module structure with extenders/virtual_scrolling_data_controller.ts, virtual_scrolling_module.ts and const.ts; the data extender now declares _editingController locally

@bit-byte0 bit-byte0 added the 26_2 label Aug 24, 2026
@bit-byte0 bit-byte0 self-assigned this Aug 24, 2026
@bit-byte0 bit-byte0 changed the title GridCore - VirtualScrolling - Define editingController & Split module GridCore data: Relocate _editingController to editing data-extenders (virtual scrolling) Aug 24, 2026
@bit-byte0
bit-byte0 marked this pull request as ready for review August 24, 2026 10:02
@bit-byte0
bit-byte0 requested a review from a team as a code owner August 24, 2026 10:02
Copilot AI lite review requested due to automatic review settings August 24, 2026 10:02

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 GridCore virtual scrolling internals by extracting the virtual scrolling data-controller extender into a dedicated extender file, and separating module registration and shared constants into standalone modules. This aligns the virtual scrolling structure with the “summary module” layout and updates dependent modules (TreeList/DataGrid/keyboard navigation) to use the new import paths.

Changes:

  • Extracted virtualScrollingDataControllerExtender into virtual_scrolling/extenders/virtual_scrolling_data_controller.ts and updated consumers.
  • Moved virtual scrolling module definition into virtual_scrolling_module.ts and shared constants into const.ts.
  • Adjusted TreeList/DataGrid/keyboard navigation imports to the new module/extender structure.

Reviewed changes

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

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/tree_list/m_virtual_scrolling.ts Updates TreeList virtual scrolling wiring to import the extracted data-controller extender and new module definition.
packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/virtual_scrolling_module.ts New file: defines virtualScrollingModule and registers extenders via the extracted data-controller extender.
packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/m_virtual_scrolling.ts Removes embedded data-controller extender/module; moves constants to const.ts and exports helper functions for the extracted extender.
packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/extenders/virtual_scrolling_data_controller.ts New file: contains the extracted data-controller extender logic (including _editingController initialization).
packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/const.ts New file: centralizes virtual scrolling constants previously defined in m_virtual_scrolling.ts.
packages/devextreme/js/__internal/grids/grid_core/keyboard_navigation/m_keyboard_navigation.ts Updates type import for VirtualScrollingDataControllerExtension to the new extender file.
packages/devextreme/js/__internal/grids/data_grid/module_not_extended/virtual_scrolling.ts Updates DataGrid module registration to import virtualScrollingModule from the new module file.

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

Copilot AI review requested due to automatic review settings August 24, 2026 10:34
@bit-byte0
bit-byte0 force-pushed the refactor/gridcore-virtual-scrolling-split-module-26_2 branch from ceda37c to b7a36e1 Compare August 24, 2026 10:34

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 7 out of 7 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings August 24, 2026 11:02
@bit-byte0
bit-byte0 force-pushed the refactor/gridcore-virtual-scrolling-split-module-26_2 branch from b7a36e1 to 8c7cc3e Compare August 24, 2026 11:02

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 7 out of 7 changed files in this pull request and generated 3 comments.

Suppressed comments (1)

packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/extenders/virtual_scrolling_data_controller.ts:5

  • The file introduces a large set of file-level eslint disables that were not present when this code lived in virtual_scrolling/m_virtual_scrolling.ts, which weakens lint coverage for this logic. Prefer removing these global disables and addressing any lint violations locally (or with narrowly scoped eslint-disable-next-line).
/* eslint-disable consistent-return */
/* eslint-disable @typescript-eslint/no-this-alias */
/* eslint-disable @typescript-eslint/init-declarations */
/* eslint-disable prefer-rest-params */
/* eslint-disable @stylistic/max-len */

return pageSize && pageSize < rowPageSize ? pageSize : rowPageSize;
}

public reload() {

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.

lets type methods we already typed in base

import { resizing, rowsView } from './m_virtual_scrolling';

interface VirtualScrollingModuleOptions {
scrolling: {

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.

extend public type, so we don't have to duplicate public options

import type { ModuleType } from '@ts/grids/grid_core/m_types';
import gridCoreUtils from '@ts/grids/grid_core/m_utils';
import type { RowsView } from '@ts/grids/grid_core/views/m_rows_view';
import { virtualScrollingDataControllerExtender } from '@ts/grids/grid_core/virtual_scrolling/extenders/virtual_scrolling_data_controller';

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.

nitpick: for imports like this index file at module core looks reasonable

> => class VirtualScrollingDataControllerExtender extends Base {
protected _editingController!: EditingController;

public init(): void {

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.

reorganize, please: all fields declaration -> methods

Copilot AI review requested due to automatic review settings August 24, 2026 12:21

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 8 out of 8 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 24, 2026 13:05
@bit-byte0
bit-byte0 force-pushed the refactor/gridcore-virtual-scrolling-split-module-26_2 branch from 5c4002e to b2fd575 Compare August 24, 2026 13:05

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 7 out of 7 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 24, 2026 13:19
@bit-byte0
bit-byte0 force-pushed the refactor/gridcore-virtual-scrolling-split-module-26_2 branch from b2fd575 to 66ec03e Compare August 24, 2026 13:19

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 8 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (1)

packages/devextreme/js/__internal/grids/grid_core/virtual_scrolling/extenders/virtual_scrolling_data_controller.ts:16

  • This new extender file disables a large set of ESLint/TS rules for the entire module. This is a maintainability risk because it can mask new issues in future edits (and other grid_core/*/extenders files typically avoid blanket disables and instead keep the code lint-clean or use narrow per-line suppressions). Consider removing the file-wide disables and addressing the specific lint violations (or replacing them with targeted eslint-disable-next-line for the few unavoidable legacy patterns).
/* eslint-disable consistent-return */
/* eslint-disable @typescript-eslint/no-this-alias */
/* eslint-disable @typescript-eslint/init-declarations */
/* eslint-disable prefer-rest-params */
/* eslint-disable @stylistic/max-len */
/* eslint-disable no-plusplus */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
/* eslint-disable prefer-spread */
/* eslint-disable @stylistic/no-mixed-operators */
/* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable @typescript-eslint/no-unused-expressions */
/* eslint-disable @typescript-eslint/no-shadow */
/* eslint-disable no-param-reassign */

@bit-byte0
bit-byte0 added this pull request to the merge queue Aug 25, 2026
Merged via the queue into DevExpress:main with commit 4043667 Aug 25, 2026
101 checks passed
@bit-byte0
bit-byte0 deleted the refactor/gridcore-virtual-scrolling-split-module-26_2 branch August 25, 2026 07:58
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