Skip to content

Add grid theming overview sample#1158

Open
tishko0 wants to merge 1 commit intovnextfrom
ttonev/grid-theming
Open

Add grid theming overview sample#1158
tishko0 wants to merge 1 commit intovnextfrom
ttonev/grid-theming

Conversation

@tishko0
Copy link
Contributor

@tishko0 tishko0 commented Feb 16, 2026

No description provided.

Copy link

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 sample demonstrating grid theming with runtime theme switching capabilities. The sample showcases how to use lazy-loaded CSS themes for Ignite UI Web Components Grid, allowing users to switch between 8 different themes (Bootstrap, Material, Fluent, and Indigo in both light and dark variants) at runtime.

Changes:

  • New grid theming sample with runtime theme switching functionality
  • Webpack configuration customized to support lazy CSS loading for themes
  • TypeScript declaration file for lazy style loader types

Reviewed changes

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

Show a summary per file
File Description
webpack.config.js Standard webpack config with custom CSS exclusion rule for lazy theme loading
tslint.json Standard TSLint configuration matching other samples
tsconfig.json TypeScript configuration with strictPropertyInitialization disabled
src/lazy-styles.d.ts Type declarations for lazy-loaded CSS modules
src/index.ts Main sample implementation with theme switching logic
src/index.css Custom styles for theme selector and dark mode support
src/NwindData.json Sample data for grid (standard Northwind dataset)
sandbox.config.json CodeSandbox configuration
package.json Dependencies including webcomponents polyfills
index.html HTML template with theme selector and grid markup
ReadMe.md Documentation with setup instructions
.prettierrc Code formatting configuration

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

this._bind();

themes[this.currentTheme].css.use();

Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initial theme should be applied based on the initial value of the select element. However, if the initial theme is a dark theme, the container won't have the 'container--dark' class applied on page load. Only theme switches triggered by the change event will apply the dark class. Consider checking if the initial theme is dark and applying the class accordingly in the constructor.

Suggested change
if (themes[this.currentTheme].dark) {
container.classList.add('container--dark');
} else {
container.classList.remove('container--dark');
}

Copilot uses AI. Check for mistakes.

## Branches

> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-angular-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-angular-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ReadMe.md references 'igniteui-angular-examples' repository in the branches section, but this appears to be a Web Components repository. The links should reference 'igniteui-wc-examples' instead.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants