Skip to content

DataGrid: add script for data-grid architecture diagram#32922

Merged
dmirgaev merged 12 commits intoDevExpress:26_1from
dmirgaev:26_1__data_grid_architecture
Mar 19, 2026
Merged

DataGrid: add script for data-grid architecture diagram#32922
dmirgaev merged 12 commits intoDevExpress:26_1from
dmirgaev:26_1__data_grid_architecture

Conversation

@dmirgaev
Copy link
Contributor

No description provided.

@dmirgaev dmirgaev self-assigned this Mar 16, 2026
Copilot AI review requested due to automatic review settings March 16, 2026 10:09
Copy link
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 introduces documentation-generation scripts for visualizing DataGrid / grid_core architecture, producing JSON + interactive HTML (Cytoscape-based) diagrams from source code analysis under js/__internal/grids/**.

Changes:

  • Added a new grid_core architecture generator (AST parsing + dependency/inheritance resolution + HTML/JSON output).
  • Added a new data_grid architecture generator that consumes the grid_core JSON and builds a combined DataGrid-focused visualization (modules, extenders, pipelines, cross-deps).
  • Updated grid_core visualization styling and edge toggling to align more closely with DataGrid diagram conventions.

Reviewed changes

Copilot reviewed 10 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/types.ts Defines the data model used by the grid_core parser/resolver/output.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/parser.ts Discovers grid_core TS files and extracts modules/classes/runtime deps via TypeScript AST.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/resolver.ts Resolves aliases, inheritance chains, runtime dependencies, and standalone nodes.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/graph-builder.ts Builds Cytoscape node/edge elements; updated node/edge classing for new styling.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/html-template.ts Updates the interactive HTML template (styling + new edge-type toggles).
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/constants.ts Fixes path resolution for grid_core root and artifacts output directory.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/cli.ts Adds simple CLI flag parsing for grid_core generator output selection.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/generate-architecture-doc.ts Adds the grid_core generator entrypoint (JSON/HTML emission + console summary).
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/constants.ts Defines data_grid roots, import patterns, feature-area mapping, and output directory.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/types.ts Defines data_grid parser/resolver/output data structures.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/parser.ts Parses data_grid registerModule calls, inline overrides/extenders, and module order.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/resolver.ts Classifies modules + builds pipelines/inheritance/cross-deps; includes gc fallback parsing.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/graph-builder.ts Builds Cytoscape elements for DataGrid view (modules, targets, defines/extender/order edges).
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/html-template.ts Generates the interactive DataGrid HTML visualization (layout, filters, info panel).
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/generate.ts Adds the data_grid generator entrypoint (loads gc JSON prerequisite, writes JSON/HTML).

Copilot AI review requested due to automatic review settings March 17, 2026 13:27
Copy link
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 adds a new DataGrid architecture documentation generator (JSON + interactive HTML) and refactors the existing grid_core generator to reuse shared parsing, inheritance, graph, and output utilities under __docs__/scripts/shared.

Changes:

  • Introduces a new data_grid docs generator (parser + resolver + graph builder + HTML template + CLI entrypoint).
  • Extracts shared infrastructure for AST parsing, file discovery, inheritance-chain building, graph context, and output writing.
  • Reorganizes the existing grid_core HTML template and generator to use the shared utilities, removing the old monolithic html-template.ts.

Reviewed changes

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

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/docs/scripts/shared/types.ts Adds shared type definitions for heritage/base-class metadata and inheritance chains.
packages/devextreme/js/__internal/grids/docs/scripts/shared/output-writer.ts Centralizes JSON/HTML output writing and CLI flag handling.
packages/devextreme/js/__internal/grids/docs/scripts/shared/inheritance.ts Adds a reusable inheritance-chain builder with cycle/depth handling hooks.
packages/devextreme/js/__internal/grids/docs/scripts/shared/html-helpers.ts Extracts shared CSS and interactive JS used by multiple diagram templates.
packages/devextreme/js/__internal/grids/docs/scripts/shared/graph-context.ts Introduces a shared graph-building context for Cytoscape element creation/deduping.
packages/devextreme/js/__internal/grids/docs/scripts/shared/file-discovery.ts Extracts reusable TS source discovery + relative path normalization.
packages/devextreme/js/__internal/grids/docs/scripts/shared/cli.ts Exports CliArgs and improves unknown-arg messaging.
packages/devextreme/js/__internal/grids/docs/scripts/shared/ast-helpers.ts Adds shared TypeScript AST helpers (imports, export detection, mixin parsing, heritage parsing).
packages/devextreme/js/__internal/grids/docs/scripts/html-template.ts Removes the previous single HTML template file (migrated into per-generator templates + shared helpers).
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/types.ts Reuses shared types and aligns inheritance entry shape (className, chain).
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/resolver.ts Refactors resolver logic to use shared inheritance + mixin utilities and improves some lookups.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/parser.ts Refactors parser to use shared AST helpers and shared relative-path/discovery helpers.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/html-template.ts Adds the new grid_core HTML template using shared CSS/JS helpers.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/graph-builder.ts Refactors graph building to use shared graph context and new edge classes.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/generate.ts Updates the grid_core generator entrypoint to use shared discovery/output writing.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/constants.ts Fixes root/output paths and keeps grid_core-specific discovery exclusions.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/types.ts Defines data_grid parser + resolved architecture output types.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/resolver.ts Implements module classification, extender pipelines, inheritance chains, and cross-dependency analysis.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/parser.ts Adds a data_grid-specific parser for registerModule usage, extenders, and module order.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/html-template.ts Adds the DataGrid interactive HTML visualization template (modules, targets, pipelines).
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/graph-builder.ts Builds Cytoscape elements for the DataGrid diagram using shared graph context.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/generate.ts Adds the data_grid generator entrypoint and integrates grid_core JSON as an input.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/constants.ts Adds data_grid-specific roots, excluded directories, feature-area mapping, and other constants.

Copilot AI review requested due to automatic review settings March 18, 2026 07:46
Copy link
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 adds a new documentation generator for the data_grid architecture diagram and refactors the existing grid_core diagram generator to share common utilities (AST parsing helpers, file discovery, inheritance chain building, HTML/CSS/JS template helpers, and output writing).

Changes:

  • Introduces a new data_grid architecture doc generator (parser + resolver + graph builder + HTML template + CLI entry).
  • Refactors grid_core architecture generator to reuse shared helpers and improve inheritance/runtime-dep resolution.
  • Adds shared infrastructure for AST parsing, file discovery, inheritance-chain building, HTML helpers, and output writing.

Reviewed changes

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

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/docs/scripts/shared/types.ts Adds shared type definitions for heritage/base-class metadata and inheritance chain entries.
packages/devextreme/js/__internal/grids/docs/scripts/shared/output-writer.ts Centralizes JSON/HTML output writing based on CLI flags.
packages/devextreme/js/__internal/grids/docs/scripts/shared/inheritance.ts Adds shared core algorithm for building inheritance chains with hooks.
packages/devextreme/js/__internal/grids/docs/scripts/shared/html-helpers.ts Extracts shared CSS and interactive JS helpers for the HTML templates.
packages/devextreme/js/__internal/grids/docs/scripts/shared/graph-context.ts Adds a shared graph-building context (elements + de-dupe sets + node helper).
packages/devextreme/js/__internal/grids/docs/scripts/shared/file-discovery.ts Adds shared recursive source discovery and normalized relative path helper.
packages/devextreme/js/__internal/grids/docs/scripts/shared/cli.ts Exports CLI arg types and improves unknown-arg errors.
packages/devextreme/js/__internal/grids/docs/scripts/shared/ast-helpers.ts Adds shared TS AST helpers for imports, heritage parsing, and export detection.
packages/devextreme/js/__internal/grids/docs/scripts/html-template.ts Removes the old top-level HTML template (replaced by per-generator templates).
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/types.ts Refactors grid_core types to reuse shared base/heritage/inheritance types.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/resolver.ts Refactors resolver to use shared inheritance logic and improves lookups/deduping.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/parser.ts Refactors parser to use shared AST/file-discovery helpers.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/html-template.ts Adds a refactored grid_core HTML template using shared CSS/JS helpers.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/graph-builder.ts Refactors graph building to reuse shared graph context and new edge classes.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/generate.ts Refactors entry script to use shared discovery and output writer and improves errors.
packages/devextreme/js/__internal/grids/docs/scripts/grid_core/constants.ts Fixes root/output directory resolution for the grid_core generator.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/types.ts Introduces data_grid architecture model types.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/resolver.ts Implements module classification, pipelines, inheritance chains, and cross-deps for data_grid.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/parser.ts Adds a TS AST parser for data_grid registerModule calls and local definitions.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/html-template.ts Adds the interactive HTML template for the DataGrid architecture diagram.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/graph-builder.ts Builds Cytoscape nodes/edges for data_grid modules, targets, and pipelines.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/generate.ts Adds the CLI entry script to generate JSON/HTML artifacts for data_grid.
packages/devextreme/js/__internal/grids/docs/scripts/data_grid/constants.ts Adds constants for roots, exclusions, feature-area mapping, and module-order parsing.
Comments suppressed due to low confidence (1)

packages/devextreme/js/__internal/grids/docs/scripts/grid_core/resolver.ts:486

  • Type literal in resolveModuleClassRefs is missing a separator after className: string, which should cause a TypeScript parse error. Add a trailing ; (or ,) after the className property in that inline type.

@dmirgaev dmirgaev merged commit d9d41ce into DevExpress:26_1 Mar 19, 2026
127 of 128 checks passed
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