Skip to content

Grids - DataController: Extract row type knowledge to extenders - #35031

Open
Alyar666 wants to merge 2 commits into
DevExpress:mainfrom
Alyar666:grid_data_extract_row_type_knowledge_to_extenders_26_2
Open

Grids - DataController: Extract row type knowledge to extenders#35031
Alyar666 wants to merge 2 commits into
DevExpress:mainfrom
Alyar666:grid_data_extract_row_type_knowledge_to_extenders_26_2

Conversation

@Alyar666

@Alyar666 Alyar666 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 3, 2026 09:25
@Alyar666
Alyar666 requested a review from a team as a code owner September 3, 2026 09:25
@Alyar666 Alyar666 self-assigned this Sep 3, 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.

🟢 Approval recommended

The refactor cleanly moves row-type-specific logic into extenders with updated/added Jest tests covering the new behavior paths.

Pull request overview

This PR refactors row-change/diffing logic in the Grid DataController so that row-type-specific behavior (group rows, group footers, edit form rows) is handled by the relevant module extenders (grouping/summary/editing) rather than centralized in shared utilities.

Changes:

  • Moved group-row column-diff logic into the DataGrid grouping extender and its utils (getGroupColumnIndices).
  • Introduced adjustInsertRowIndex in the base DataController, with grouping extending the index adjustment to account for group rows.
  • Added/updated Jest coverage to validate row repaint vs partial cell updates for grouping, summary group footers, and form edit rows.
File summaries
File Description
packages/devextreme/js/__internal/grids/grid_core/editing/extenders/tests/editing_data_controller.row_changes.test.ts Adds coverage ensuring form edit rows repaint fully (no column diff).
packages/devextreme/js/__internal/grids/grid_core/data_controller/utils/row_changes.ts Removes group-specific helpers and replaces getDataRowIndex with generic countRowsBefore.
packages/devextreme/js/__internal/grids/grid_core/data_controller/utils/tests/row_changes.test.ts Updates unit tests for the new countRowsBefore behavior and removes tests for deleted helpers.
packages/devextreme/js/__internal/grids/grid_core/data_controller/data_controller.ts Adds adjustInsertRowIndex and simplifies core column diffing, delegating special cases to extenders.
packages/devextreme/js/__internal/grids/grid_core/tests/mock/helpers/row_changes.ts Extends test helper to pass gridOptions and isLiveUpdate through refresh changes.
packages/devextreme/js/__internal/grids/data_grid/summary/extenders/summary_data_controller.ts Overrides column diffing to force full repaint for DataGrid group footer rows.
packages/devextreme/js/__internal/grids/data_grid/summary/extenders/tests/summary_data_controller.row_changes.test.ts Updates expectations to assert full-row repaint semantics for group footers.
packages/devextreme/js/__internal/grids/data_grid/grouping/utils.ts Adds getGroupColumnIndices utility for group-row partial updates (skipping expand cell).
packages/devextreme/js/__internal/grids/data_grid/grouping/extenders/grouping_data_controller.ts Implements grouping-specific insert index adjustment and group-row column diffing.
packages/devextreme/js/__internal/grids/data_grid/grouping/extenders/tests/grouping_data_controller.row_changes.test.ts Adds coverage for group-row partial updates vs full repaint when not rendered.
packages/devextreme/js/__internal/grids/data_grid/grouping/extenders/tests/grouping_data_controller.data_row_index.test.ts Adds coverage for grouping-aware insert index mapping.
packages/devextreme/js/__internal/grids/data_grid/grouping/tests/utils.test.ts Adds unit tests for getGroupColumnIndices.
Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 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 September 3, 2026 14:26

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.

🟢 Approval recommended

The refactor cleanly relocates row-type-specific behavior into appropriate extenders and is backed by targeted Jest tests covering the new/changed repaint and indexing behavior.

Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@Alyar666
Alyar666 added this pull request to the merge queue Sep 4, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 4, 2026
@Alyar666
Alyar666 added this pull request to the merge queue Sep 4, 2026
@Alyar666
Alyar666 removed this pull request from the merge queue due to a manual request Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants