Skip to content

feat(igr-ts): update igr-ts templates#1598

Merged
damyanpetev merged 7 commits intomasterfrom
hhristov/update-igr-templates
Apr 2, 2026
Merged

feat(igr-ts): update igr-ts templates#1598
damyanpetev merged 7 commits intomasterfrom
hhristov/update-igr-templates

Conversation

@Hristo313
Copy link
Copy Markdown
Contributor

@Hristo313 Hristo313 commented Apr 2, 2026

  • Analyze PR review comments
  • Fix navigation-header/index.tsx: Use useLocation to derive active item dynamically on route changes
  • Fix package.json build script: Change tsc to tsc -b for project references support
  • Fix package.json devDependencies: Remove redundant @typescript-eslint/eslint-plugin and @typescript-eslint/parser (already covered by typescript-eslint meta-package)
  • Fix __dot__gitignore: Deduplicate repeated entries (node_modules, .DS_Store, *-debug.log* patterns)
    Closes Update the igr-ts template #1552

@coveralls
Copy link
Copy Markdown

coveralls commented Apr 2, 2026

Coverage Status

coverage: 86.103%. remained the same
when pulling 62ba2f9 on hhristov/update-igr-templates
into bb111b5 on master.

@Hristo313 Hristo313 marked this pull request as ready for review April 2, 2026 11:39
@Hristo313 Hristo313 requested review from Copilot and damyanpetev April 2, 2026 11:39
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

Updates the Ignite UI for React TypeScript (igr-ts) CLI templates to align with newer tooling defaults (Vite/Vitest/TypeScript/ESLint), refresh public assets, and tweak sample components for improved runtime behavior.

Changes:

  • Restructures TypeScript configuration into referenced tsconfig.app.json / tsconfig.node.json with updated compiler options.
  • Updates template toolchain configuration (Vitest browser provider, ESLint flat config) and dependency versions.
  • Adjusts sample/template components (navigation header active state, chart legend wiring) and refreshes favicon/icon assets.

Reviewed changes

Copilot reviewed 16 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/cli/templates/react/igr-ts/projects/top-nav/files/src/components/navigation-header/index.tsx Refactors active nav item handling using memoized initial route matching.
packages/cli/templates/react/igr-ts/projects/_base/files/vite.config.ts Updates Vitest browser config to use @vitest/browser-playwright provider helper.
packages/cli/templates/react/igr-ts/projects/_base/files/tsconfig.node.json Adds node-specific TS config for Vite config type-checking.
packages/cli/templates/react/igr-ts/projects/_base/files/tsconfig.json Switches to project references (tsconfig.app + tsconfig.node).
packages/cli/templates/react/igr-ts/projects/_base/files/tsconfig.app.json Adds app TS config with updated target/libs and stricter linting flags.
packages/cli/templates/react/igr-ts/projects/_base/files/src/main.tsx Updates React entrypoint imports/usage (StrictMode, createRoot).
packages/cli/templates/react/igr-ts/projects/_base/files/public/icons.svg Adds SVG symbol sprite for social/documentation icons.
packages/cli/templates/react/igr-ts/projects/_base/files/public/favicon.svg Adds new SVG favicon asset.
packages/cli/templates/react/igr-ts/projects/_base/files/public/favicon.ico Existing favicon asset remains present in template.
packages/cli/templates/react/igr-ts/projects/_base/files/package.json Updates dependencies/devDependencies and reorganizes scripts section.
packages/cli/templates/react/igr-ts/projects/_base/files/index.html Updates favicon link and modernizes meta viewport/charset.
packages/cli/templates/react/igr-ts/projects/_base/files/eslint.config.mjs Removes previous flat config implementation.
packages/cli/templates/react/igr-ts/projects/_base/files/eslint.config.js Adds new ESLint flat config using typescript-eslint + globals.
packages/cli/templates/react/igr-ts/projects/_base/files/__dot__gitignore Expands ignore patterns (logs/dist/editor files).
packages/cli/templates/react/igr-ts/projects/_base_with_home/files/index.html Mirrors index.html head updates for the “with home” base template.
packages/cli/templates/react/igr-ts/pie-chart/default/files/src/app/path/filePrefix.tsx Initializes chart data directly and wires legend via refs after mount.
packages/cli/templates/react/igr-ts/financial-chart/default/files/src/app/path/filePrefix.tsx Simplifies chart data initialization by removing useEffect setter.
packages/cli/templates/react/igr-ts/doughnut-chart/default/files/src/app/path/filePrefix.tsx Initializes chart data directly and assigns legend to series after mount.
packages/cli/templates/react/igr-ts/category-chart/default/files/src/app/path/filePrefix.tsx Simplifies chart data initialization by removing useEffect setter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Hristo313
Copy link
Copy Markdown
Contributor Author

@copilot Fix the comments

… duplicate eslint pkgs, dedup gitignore

Agent-Logs-Url: https://github.com/IgniteUI/igniteui-cli/sessions/7137d060-2cae-41c3-8cc9-6e5648084a6f

Co-authored-by: Hristo313 <57346540+Hristo313@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

@copilot Fix the comments

Fixed all four review comments in commit d99cc9c:

  1. navigation-header/index.tsx: Replaced useState + window.location.pathname with useLocation from react-router-dom. The active item is now derived reactively from the router's location, so it stays in sync on back/forward navigation and redirects.

  2. package.json build script: Changed tsctsc -b to properly invoke TypeScript project build mode, which is required when tsconfig.json uses references with an empty files array.

  3. package.json devDependencies: Removed @typescript-eslint/eslint-plugin and @typescript-eslint/parser since the typescript-eslint meta-package already re-exports these. This eliminates the version mismatch and duplicate installs.

  4. .gitignore: Deduplicated all repeated entries (node_modules, .DS_Store, npm-debug.log*, yarn-debug.log*, yarn-error.log*) and consolidated into a single clean file.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.google-analytics.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node packages/cli/bin/execute.js new --help (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node packages/cli/bin/execute.js config --help de_modules/.bin/tsx (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node packages/cli/bin/execute.js generate --help de_modules/.bin/tsx (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@damyanpetev damyanpetev merged commit adf3ed8 into master Apr 2, 2026
3 checks passed
@damyanpetev damyanpetev deleted the hhristov/update-igr-templates branch April 2, 2026 14:32
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.

Update the igr-ts template

6 participants