fix(cli): add grid components types selection for project creation#1730
fix(cli): add grid components types selection for project creation#1730georgianastasov wants to merge 15 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds additional Ignite UI for React (igr-ts) grid component templates so project creation can offer Tree Grid, Hierarchical Grid, and Pivot Grid options (in addition to the existing Grid), and adjusts routing behavior in the React side-nav project templates.
Changes:
- Added new
tree-grid,hierarchical-grid, andpivot-gridcomponent template families (template metadata + starter files + Vitest tests). - Updated the existing
grid/basictemplate styling and markup to match the newer page layout. - Normalized navigation paths in React side-nav project templates to ensure navigation/active-state checks use absolute paths.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/templates/react/igr-ts/tree-grid/index.ts | Registers the Tree Grid component group entry for igr-ts templates. |
| packages/cli/templates/react/igr-ts/tree-grid/basic/index.ts | Adds Tree Grid “basic” template metadata (id/name/widget/packages). |
| packages/cli/templates/react/igr-ts/tree-grid/basic/files/src/app/path/style.module.css | Tree Grid basic template page styling. |
| packages/cli/templates/react/igr-ts/tree-grid/basic/files/src/app/path/data.tsx | Sample hierarchical employee dataset for Tree Grid. |
| packages/cli/templates/react/igr-ts/tree-grid/basic/files/src/app/path/filePrefix.tsx | Tree Grid basic example component implementation. |
| packages/cli/templates/react/igr-ts/tree-grid/basic/files/src/app/path/filePrefix.test.tsx | Basic smoke test for the Tree Grid component template. |
| packages/cli/templates/react/igr-ts/pivot-grid/index.ts | Registers the Pivot Grid component group entry for igr-ts templates. |
| packages/cli/templates/react/igr-ts/pivot-grid/basic/index.ts | Adds Pivot Grid “basic” template metadata (id/name/widget/packages). |
| packages/cli/templates/react/igr-ts/pivot-grid/basic/files/src/app/path/style.module.css | Pivot Grid basic template page styling. |
| packages/cli/templates/react/igr-ts/pivot-grid/basic/files/src/app/path/data.tsx | Sample dataset for Pivot Grid. |
| packages/cli/templates/react/igr-ts/pivot-grid/basic/files/src/app/path/filePrefix.tsx | Pivot Grid basic example component implementation. |
| packages/cli/templates/react/igr-ts/pivot-grid/basic/files/src/app/path/filePrefix.test.tsx | Basic smoke test for the Pivot Grid component template. |
| packages/cli/templates/react/igr-ts/hierarchical-grid/index.ts | Registers the Hierarchical Grid component group entry for igr-ts templates. |
| packages/cli/templates/react/igr-ts/hierarchical-grid/basic/index.ts | Adds Hierarchical Grid “basic” template metadata (id/name/widget/packages). |
| packages/cli/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/path/style.module.css | Hierarchical Grid basic template page styling. |
| packages/cli/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/path/data.tsx | Sample hierarchical artist/album/song dataset for Hierarchical Grid. |
| packages/cli/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/path/filePrefix.tsx | Hierarchical Grid basic example component implementation. |
| packages/cli/templates/react/igr-ts/hierarchical-grid/basic/files/src/app/path/filePrefix.test.tsx | Basic smoke test for the Hierarchical Grid component template. |
| packages/cli/templates/react/igr-ts/projects/side-nav/files/src/app/app.tsx | Normalizes route navigation/active checks to absolute paths. |
| packages/cli/templates/react/igr-ts/projects/side-nav-mini/files/src/app/app.tsx | Normalizes route navigation/active checks to absolute paths. |
| packages/cli/templates/react/igr-ts/projects/side-nav-mini-auth/files/src/app/app.tsx | Normalizes route navigation/active checks to absolute paths. |
| packages/cli/templates/react/igr-ts/projects/side-nav-auth/files/src/app/app.tsx | Normalizes route navigation/active checks to absolute paths. |
| packages/cli/templates/react/igr-ts/grid/basic/files/src/app/path/style.module.css | Updates Grid basic styling to the newer page layout. |
| packages/cli/templates/react/igr-ts/grid/basic/files/src/app/path/filePrefix.tsx | Updates Grid basic markup/copy to match the newer page layout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ithub.com/IgniteUI/igniteui-cli into ganastasov/add-grids-components-selection
| import { IgniteUIForAngularTemplate } from "../../../IgniteUIForAngularTemplate"; | ||
| import * as path from "path"; | ||
|
|
||
| const SHARED_DATA_ROOT = path.join(__dirname, "../../../../cli/shared-data"); |
There was a problem hiding this comment.
@igniteui/angular-templates is published as a standalone package (and igniteui-cli depends on it). It can be used without igniteui-cli trough angular cli (ng). This relative path only resolves inside the repo. Once installed, the compiled index.js sits at node_modules/@igniteui/angular-templates/igx-ts/grid/default/, and ../../../../cli/shared-data points at node_modules/@igniteui/cli/shared-data — which may not exist if the cli is not installed. Result: the grid data.ts won't be copied (and probably error will be thrown as file will be missing) and generated Angular grid apps will be missing their data file.
Description
This PR adds support for selecting additional grid component templates during project creation.
Previously, users could only choose the standard Grid option. With these changes, users can now choose between:
The update covers the grid template selection flow and adds/updates the required templates so these options are available when creating projects.
Related Issue
Closes #1583
Type of Change
Affected Packages
igniteui-cli(packages/cli)@igniteui/cli-core(packages/core)@igniteui/angular-templates(packages/igx-templates)@igniteui/angular-schematics(packages/ng-schematics)@igniteui/mcp-server(packages/igniteui-mcp)Checklist
npm run test)npm run build)npm run lint)Additional Context
This change ensures users are no longer limited to only the Data Grid option when creating projects that require grid components.