Skip to content

Commit b0c1da4

Browse files
kdinevCopilotdamyanpetev
authored
feat(skills): add grid sizing, updating theming, PR template, agents (#17185)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
1 parent 627a7a6 commit b0c1da4

9 files changed

Lines changed: 219 additions & 12 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ Closes #
66
- [ ] Documentation
77
- [ ] Demos
88
- [ ] CI/CD
9+
- [ ] Tests
10+
- [ ] Changelog
11+
- [ ] Skills/Agents
912

1013
### Checklist:
1114
- [ ] All relevant tags have been applied to this PR

.github/agents/feature-orchestrator-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ projects/igniteui-angular/core/src/core/styles/ ← component SCSS themes
131131
1. Read the feature request.
132132
2. Search the repo to identify affected components, directives, services, and files.
133133
3. If the feature touches theming or styles, read
134-
`skills/igniteui-angular-theming/references/contributing.md` before planning the styling handoff.
134+
`.github/themes-contributing.md` before planning the styling handoff.
135135
4. Determine:
136136
- Which components are affected and where they live
137137
- Whether this replaces, renames, or deprecates any existing API

.github/agents/theming-styles-agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Your job is to implement visual fixes and style features in the in-repo SCSS sou
2323

2424
1. Read the original request, bug report, or handoff summary.
2525
2. Read the relevant SCSS, component markup, and any existing tests before editing.
26-
3. Read `skills/igniteui-angular-theming/references/contributing.md` in full before modifying any `_*-theme.scss` or `_*-component.scss` file, wiring a component into the theme system, or changing style tests.
26+
3. Read `.github/themes-contributing.md` in full before modifying any `_*-theme.scss` or `_*-component.scss` file, wiring a component into the theme system, or changing style tests.
2727
4. Decide whether the change belongs in a component theme file, a structural component file, shared style infrastructure, or a minimal supporting markup hook.
2828
5. Implement the required theming and style changes without expanding into unrelated production logic.
2929
6. Run the relevant style validation before finishing.
@@ -32,7 +32,7 @@ Your job is to implement visual fixes and style features in the in-repo SCSS sou
3232

3333
## Required Reference
3434

35-
Contributing to the in-repo SCSS source is covered in `skills/igniteui-angular-theming/references/contributing.md`.
35+
Contributing to the in-repo SCSS source is covered in `.github/themes-contributing.md`.
3636

3737
Read that file when:
3838
- modifying or creating `_*-theme.scss` files

skills/igniteui-angular-theming/references/contributing.md renamed to .github/themes-contributing.md

File renamed without changes.

skills/igniteui-angular-components/references/charts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ chartComponent.itemsSource = dataArray;
5656
```
5757

5858
### Chart Type Selection
59-
- **Category Chart**: `chartType` property (Area, Bar, Column, Line, etc.)
59+
- **Category Chart**: `chartType` property (Auto, Area, Column, Line, Point, etc.)
6060
- **Financial Chart**: `chartType` property (Line, Candlestick, OHLC Bar)
61-
- **Data Chart**: Configure explicit series (IgxAreaSeriesComponent, IgxBarSeriesComponent, etc.)
61+
- **Data Chart**: Configure explicit series (IgxAreaSeriesComponent, IgxBarSeriesComponent, IgxBarSeries, etc.)
6262
- **Pie Chart**: No chartType needed; inherent pie structure
6363

6464
### Required Properties
6565

6666
**IgxCategoryChartComponent** (simplest API; auto-detects numeric & string columns):
6767
- `dataSource` — Data array (required)
68-
- `chartType` — Chart type (Area, Bar, Column, Line, etc.)
68+
- `chartType` — Chart type (Auto, Area, Column, Line, Point, etc.)
6969
- Component auto-detects: first string column → X-axis labels, numeric columns → Y-axis data
7070

7171
**IgxDataChartComponent** (advanced; requires explicit configuration):
@@ -233,7 +233,7 @@ chartComponent.itemsSource = dataArray;
233233
```typescript
234234
// Required
235235
dataSource: any[]; // Data array (auto-detects numeric fields)
236-
chartType: ChartType; // Area, Bar, Column, Line, Waterfall, etc.
236+
chartType: CategoryChartType; // Auto, Area, Column, Line, Point, etc.
237237

238238
// Common optional inputs
239239
xAxisTitle: string; // X-axis label

skills/igniteui-angular-grids/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Base your code and explanation exclusively on what you read in Step 3. If the re
3838
| Cell editing, row editing, batch editing, transactions, validation, summaries | [`references/editing.md`](./references/editing.md) |
3939
| Paging, remote data, server-side ops, noop strategies, virtual scroll, multi-grid coordination | [`references/paging-remote.md`](./references/paging-remote.md) |
4040
| State persistence, Tree Grid / Hierarchical Grid / Pivot Grid data operations | [`references/state.md`](./references/state.md) |
41+
| Grid sizing (width, height, column sizing, null/px/% modes, cell spacing CSS variables) | [`references/sizing.md`](./references/sizing.md) |
4142

4243
> **When in doubt, read more rather than fewer reference files.** The cost of an unnecessary file read is negligible; the cost of hallucinated API usage is a broken application.
4344
@@ -82,6 +83,7 @@ After choosing the grid type, **you must still complete Steps 2–4 from the man
8283
Replace `igniteui-angular` with `@infragistics/igniteui-angular` for the licensed package — entry-point paths are identical.
8384

8485
> **AGENT INSTRUCTION — Documentation URL Pattern**: For grid-specific topics (sorting, filtering, editing, paging, etc.), docs URLs follow this naming pattern per grid type:
86+
> - Grid Lite: `.../components/grid-lite/{topic}`
8587
> - Flat Grid: `.../components/grid/{topic}`
8688
> - Tree Grid: `.../components/treegrid/{topic}`
8789
> - Hierarchical Grid: `.../components/hierarchicalgrid/{topic}`

skills/igniteui-angular-grids/references/data-operations.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class CompanyGridComponent {
111111
<igx-hierarchical-grid #hGrid
112112
[data]="companies()"
113113
primaryKey="id"
114-
height="600px">
114+
height="800px">
115115
<igx-column field="name" [sortable]="true"></igx-column>
116116
<igx-row-island key="orders" primaryKey="orderId">
117117
<igx-column field="orderId" [sortable]="true"></igx-column>
@@ -139,7 +139,8 @@ Enable sorting on individual columns and optionally bind the sorting state:
139139
<igx-grid #grid
140140
[data]="data()"
141141
[(sortingExpressions)]="sortExprs"
142-
[sortingOptions]="{ mode: 'single' }">
142+
[sortingOptions]="{ mode: 'single' }"
143+
height="500px">
143144
<igx-column field="name" [sortable]="true"></igx-column>
144145
<igx-column field="date" dataType="date" [sortable]="true"></igx-column>
145146
<igx-column field="amount" dataType="number" [sortable]="true"></igx-column>
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# Grid Sizing — Width, Height, Column Sizing & Spacing
2+
3+
> **Part of the [`igniteui-angular-grids`](../SKILL.md) skill hub.**
4+
> For grid setup, column config, sorting, filtering, selection — see [`structure.md`](./structure.md).
5+
> For virtualization and performance — see [`features.md`](./features.md).
6+
7+
## Contents
8+
9+
- [Overview](#overview)
10+
- [Grid Width](#grid-width)
11+
- [Grid Height](#grid-height)
12+
- [Column Sizing](#column-sizing)
13+
- [Grid Cell Spacing Control](#grid-cell-spacing-control)
14+
- [Key Rules](#key-rules)
15+
16+
## Overview
17+
18+
The grid uses **border-box sizing** — border and padding are included in the width/height calculations. Do **not** override `box-sizing` on the grid element; doing so will break size calculations.
19+
20+
The grid supports both component inputs (`width`/`height`) and regular CSS/layout sizing from the host or wrapping container (including flex/grid layouts). Use the inputs when you need explicit fixed or percentage grid sizing.
21+
22+
## Grid Width
23+
24+
> **Docs:** [Grid Sizing — Width](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/sizing#width)
25+
26+
**Default:** `100%` — the grid fills available width of the parent/window.
27+
28+
### Pixel Width
29+
30+
```html
31+
<igx-grid width="1200px" ...></igx-grid>
32+
```
33+
34+
- Grid is fixed at the specified size and does not react to browser/DOM resizing.
35+
- A horizontal scrollbar appears inside the grid when the combined column widths exceed the grid `width`.
36+
- If a parent element is narrower than the grid and has `overflow: auto | scroll`, the parent scrolls — the grid itself remains at its specified width.
37+
38+
### Percentage Width
39+
40+
```html
41+
<igx-grid width="100%" ...></igx-grid>
42+
```
43+
44+
- Grid sizes relative to its parent element (or the browser window if there is no parent with explicit width).
45+
- Resizes responsively when the browser or parent is resized.
46+
- Setting `width` above `100%` (e.g. `150%`) makes the grid wider than the parent; the parent renders a scrollbar only if it has `overflow: auto | scroll`.
47+
48+
## Grid Height
49+
50+
> **Docs:** [Grid Sizing — Height](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/sizing#height)
51+
52+
**Default:** `100%` — see the Percentage Height section for how this behaves depending on the DOM structure.
53+
54+
### `null` Height
55+
56+
```html
57+
<igx-grid [height]="null" ...></igx-grid>
58+
```
59+
60+
- All rows are rendered — **row virtualization is disabled**.
61+
- Grid height expands to show every row with no vertical scrollbar inside the grid.
62+
- If rows overflow the viewport, the browser renders a native scrollbar.
63+
- A parent element with `overflow: auto | scroll` will scroll while the grid itself remains unshrunk.
64+
- **Warning:** large data sets with `null` height can significantly impact browser performance due to no virtualization.
65+
66+
### Pixel Height
67+
68+
```html
69+
<igx-grid height="500px" ...></igx-grid>
70+
```
71+
72+
- Grid is fixed at the specified height.
73+
- A vertical scrollbar appears when rows exceed the visible area.
74+
- If the grid is taller than a parent with `overflow: auto | scroll`, the parent scrolls.
75+
76+
### Percentage Height
77+
78+
```html
79+
<igx-grid height="100%" ...></igx-grid>
80+
```
81+
82+
- Grid sizes relative to the **parent element's height**.
83+
- **Parent has explicit height** (px or %): grid sizes to that percentage of the parent's height.
84+
- **Parent has NO explicit height**: the browser cannot resolve a percentage, so the grid falls back to rendering a maximum of **10 rows** with a vertical scrollbar if there are more rows, or fits all rows if there are fewer.
85+
- To fill the entire browser window: set both `body` and the parent container `height: 100%`, then use `height="100%"` on the grid.
86+
87+
```css
88+
/* Full-window grid */
89+
html, body, .grid-container {
90+
height: 100%;
91+
}
92+
```
93+
94+
```html
95+
<div class="grid-container">
96+
<igx-grid height="100%" ...></igx-grid>
97+
</div>
98+
```
99+
100+
## Column Sizing
101+
102+
> **Docs:** [Grid Sizing — Column Sizing](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/sizing#column-sizing)
103+
104+
### Default (no `width` set — auto-sized)
105+
106+
- Auto-sized columns share the available grid width equally.
107+
- Minimum column width is **`136px`**; if the equal share is less than `136px`, all auto-sized columns default to `136px` and the grid renders a horizontal scrollbar.
108+
- Feature columns (row selector checkbox, etc.) consume space that reduces what is available for auto-sized columns.
109+
110+
```html
111+
<!-- No width on these columns — they auto-fill available space -->
112+
<igx-column field="name" header="Name"></igx-column>
113+
<igx-column field="email" header="Email"></igx-column>
114+
```
115+
116+
### Pixel Width
117+
118+
```html
119+
<igx-column field="name" width="200px"></igx-column>
120+
```
121+
122+
- Column is fixed at the specified width regardless of grid size.
123+
- If the combined column widths are less than the grid width, empty space appears on the right — this is expected.
124+
- If the combined column widths exceed the grid width, a horizontal scrollbar is rendered.
125+
126+
### `auto` Width
127+
128+
```html
129+
<igx-column field="description" width="auto"></igx-column>
130+
```
131+
132+
- Column sizes to fit the longest visible cell value.
133+
- May leave empty space if most values are short but one is very long.
134+
135+
### Percentage Width
136+
137+
```html
138+
<igx-column field="name" width="20%"></igx-column>
139+
```
140+
141+
- Column width is calculated as a percentage of the grid width.
142+
- Responsive — resizes when the grid resizes.
143+
- Combined percentages less than `100%` leave an empty area; greater than `100%` triggers a horizontal scrollbar.
144+
145+
## Grid Cell Spacing Control
146+
147+
> **Docs:** [Grid Sizing — Cell Spacing](https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/sizing#grid-cell-spacing-control)
148+
149+
The grid automatically adapts internal cell spacing based on the `size` (display density) setting. Fine-grained control is available through CSS custom properties.
150+
151+
### Global Spacing (all grids in the app)
152+
153+
```css
154+
igx-grid {
155+
--ig-spacing: 0.8; /* multiplier — reduces all grid spacing by 20% */
156+
}
157+
```
158+
159+
### Instance-Specific Spacing
160+
161+
```css
162+
.my-compact-grid {
163+
--ig-spacing: 0.6;
164+
}
165+
```
166+
167+
### Directional Spacing (horizontal vs vertical independently)
168+
169+
```css
170+
.my-grid {
171+
--ig-spacing-inline: 0.5; /* horizontal padding */
172+
--ig-spacing-block: 1.0; /* vertical padding */
173+
}
174+
```
175+
176+
### Density-Level Spacing
177+
178+
```css
179+
.my-grid {
180+
--ig-spacing-small: 0.5; /* compact density */
181+
--ig-spacing-medium: 1.0; /* medium density */
182+
--ig-spacing-large: 1.3; /* comfortable density */
183+
}
184+
```
185+
186+
### Header vs Body Cell Spacing
187+
188+
```css
189+
.my-grid igx-grid-header {
190+
--ig-spacing: 0.7;
191+
}
192+
193+
.my-grid igx-grid-cell {
194+
--ig-spacing: 0.9;
195+
}
196+
```
197+
198+
## Key Rules
199+
200+
- Grid sizing can come from CSS/layout context (host/container sizing) or from `[width]`/`[height]` inputs.
201+
- **Never** override `box-sizing` on the grid — it uses border-box and relies on this.
202+
- Use `null` for height only when the data set is small; row virtualization is disabled and large data will hurt performance.
203+
- When using percentage height, the parent **must** have an explicit height for the percentage to resolve correctly. Without it, the grid falls back to 10 visible rows.
204+
- A mix of fixed-width and auto-sized columns is valid — auto-sized columns fill the remaining space after fixed-width columns are laid out.

skills/igniteui-angular-theming/SKILL.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,6 @@ Raw hex values are acceptable **only** in these contexts:
414414

415415
Everything else must use `var(--ig-<family>-<shade>)` tokens.
416416

417-
## Contributing to Component Themes
418-
> **Contributing to the in-repo SCSS source (component theme files, structural SCSS, base functions, and the component registry) is covered in [`references/contributing.md`](./references/contributing.md).** Read that file when modifying or creating `_*-theme.scss` or `_*-component.scss` files, wiring a new component into the theme system, or writing style tests.
419-
420417
## Common Patterns
421418

422419
> **Light/dark theme switching, scoped themes, and licensed package configuration are in [`references/common-patterns.md`](./references/common-patterns.md).** Read that file for ready-to-use Sass patterns.

0 commit comments

Comments
 (0)