Skip to content

GridCommands: implement column and summary commands#33520

Open
anna-shakhova wants to merge 3 commits intoDevExpress:26_1from
anna-shakhova:26_1__commands_columns
Open

GridCommands: implement column and summary commands#33520
anna-shakhova wants to merge 3 commits intoDevExpress:26_1from
anna-shakhova:26_1__commands_columns

Conversation

@anna-shakhova
Copy link
Copy Markdown
Contributor

No description provided.

@anna-shakhova anna-shakhova self-assigned this May 7, 2026
Copilot AI review requested due to automatic review settings May 7, 2026 13:46
@anna-shakhova anna-shakhova requested a review from a team as a code owner May 7, 2026 13:46
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 expands the grid AI assistant command surface by adding column-manipulation commands at the grid-core level and summary-configuration commands for DataGrid, along with Jest coverage for the new behaviors.

Changes:

  • Added GridCore AI assistant commands to show/hide, reorder, pin/unpin, and resize columns (+ Jest tests).
  • Added DataGrid AI assistant commands to configure/clear summary (+ Jest tests) and introduced a shared Column intersection type for DataGrid commands.
  • Extended InternalGridOptions typing to include the summary option.

Reviewed changes

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

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/grid_core/m_types.ts Adds summary to the internal option typing so option('summary', …) is type-safe.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/filtering.ts Removes explanatory comments (no functional change).
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/columns.ts Introduces column visibility/reorder/pinning/resize commands.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/tests/columns.test.ts Adds Jest coverage for the new column commands.
packages/devextreme/js/__internal/grids/data_grid/ai_assistant/commands/types.ts Adds shared DataGrid command Column type alias.
packages/devextreme/js/__internal/grids/data_grid/ai_assistant/commands/summary.ts Introduces summary and clearSummary commands.
packages/devextreme/js/__internal/grids/data_grid/ai_assistant/commands/grouping.ts Refactors to reuse the shared Column type.
packages/devextreme/js/__internal/grids/data_grid/ai_assistant/commands/tests/summary.test.ts Adds Jest coverage for summary commands.

Comment on lines +71 to +75
const columnsPinningCommandSchema = z.object({
dataField: z.string(),
fixed: z.boolean(),
fixedPosition: z.enum(['left', 'right']).optional(),
}).strict();
Comment on lines +8 to +12
const SUMMARY_TYPES = ['sum', 'min', 'max', 'avg', 'count'] as const satisfies readonly SummaryType[];

const summaryItemSchema = z.object({
column: z.string(),
summaryType: z.enum(SUMMARY_TYPES),
Copilot AI review requested due to automatic review settings May 7, 2026 15:02
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 11 out of 12 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported


export const columnsPinningCommand = defineGridCommand({
name: 'columnsPinning',
description: 'Pin a column to the left or right edge, or unpin it. fixedPosition is required when fixed=true and ignored when fixed=false.',
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.

2 participants