Skip to content

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

Open
dmirgaev wants to merge 10 commits intoDevExpress:26_1from
dmirgaev:26_1__data_grid_architecture
Open

DataGrid: add script for data-grid architecture diagram#32922
dmirgaev wants to merge 10 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.

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