Skip to content

Commit 36c1917

Browse files
authored
Skill improvements (#16983)
* Updating the pivot grid config * improve skills
1 parent 27e22dd commit 36c1917

File tree

3 files changed

+79
-32
lines changed

3 files changed

+79
-32
lines changed

skills/igniteui-angular-components/SKILL.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ You are **required** to complete ALL of the following steps before producing any
1818
**STEP 1 — Identify every component or feature involved.**
1919
Map the user's request to one or more rows in the Task → Reference File table below. A single request often spans multiple categories (e.g., a form inside a Dialog requires reading both `form-controls.md` AND `feedback.md`).
2020

21-
**STEP 2 — Read every identified reference file in full.**
22-
Call `read_file` (or equivalent) on each reference file identified in Step 1. You must do this even if you believe you already know the answer. Do not skip, skim, or partially read a reference file.
21+
**STEP 2 — Read every identified reference file in full (PARALLEL).**
22+
Call `read_file` (or equivalent) on **all** reference files identified in Step 1 **in a single parallel batch** — do NOT read them one at a time sequentially. You must do this even if you believe you already know the answer. Do not skip, skim, or partially read a reference file.
2323

24-
**STEP 3 — Check app setup.**
25-
If the component is new to the project (or you're scaffolding a new feature), also read [`references/setup.md`](./references/setup.md) to verify the correct providers and entry-point import patterns. Missing `provideAnimations()` is the most common source of runtime failures.
26-
27-
**STEP 4 — Only then produce output.**
24+
**STEP 3 — Only then produce output.**
2825
Base your code and explanation exclusively on what you read. If the reference files do not cover something, say so explicitly rather than guessing.
2926

3027
### Task → Reference File

skills/igniteui-angular-grids/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Use the Grid Selection Decision Guide below. If the grid type is not explicitly
2121
**STEP 2 — Identify every task category involved.**
2222
Map the user's request to one or more rows in the Task → Reference File table below. A single request often spans multiple categories (e.g., remote paging AND editing requires reading both `paging-remote.md` AND `editing.md`).
2323

24-
**STEP 3 — Read every identified reference file in full.**
25-
Call `read_file` (or equivalent) on each reference file identified in Step 2. You must do this even if you believe you already know the answer. Do not skip, skim, or partially read a reference file.
24+
**STEP 3 — Read every identified reference file in full (PARALLEL).**
25+
Call `read_file` (or equivalent) on **all** reference files identified in Step 2 **in a single parallel batch** — do NOT read them one at a time sequentially. You must do this even if you believe you already know the answer. Do not skip, skim, or partially read a reference file.
2626

2727
**STEP 4 — Only then produce output.**
2828
Base your code and explanation exclusively on what you read in Step 3. If the reference files do not cover something, say so explicitly rather than guessing.

skills/igniteui-angular-grids/references/types.md

Lines changed: 74 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -356,41 +356,91 @@ For **pivot table analytics** where users reshape data by dragging dimensions be
356356
> **IMPORTANT**: The Pivot Grid is fundamentally different from the other three grids. Standard grid features like cell editing, row editing, batch editing, paging, column pinning, column moving, row dragging, and standard filtering/sorting are **disabled**. All data operations are driven by the `pivotConfiguration`.
357357
358358
```typescript
359-
import { Component, ChangeDetectionStrategy, signal, viewChild } from '@angular/core';
360-
import { IgxPivotGridComponent, IGX_PIVOT_GRID_DIRECTIVES } from 'igniteui-angular/grids/pivot-grid';
359+
import { Component } from "@angular/core";
360+
import { DATA } from '../../data/pivot-data';
361+
361362
import { IPivotConfiguration, IgxPivotNumericAggregate } from 'igniteui-angular/grids/core';
363+
import { IgxPivotGridComponent } from 'igniteui-angular/grids/pivot-grid';
362364

363365
@Component({
364-
selector: 'app-sales-pivot',
365-
imports: [IGX_PIVOT_GRID_DIRECTIVES],
366-
templateUrl: './sales-pivot.component.html',
367-
changeDetection: ChangeDetectionStrategy.OnPush
366+
selector: 'app-pivot-grid-basic-sample',
367+
styleUrls: ['./pivot-grid-basic-sample.component.scss'],
368+
templateUrl: './pivot-grid-basic-sample.component.html',
369+
imports: [IgxPivotGridComponent]
368370
})
369-
export class SalesPivotComponent {
370-
pivotGridRef = viewChild.required<IgxPivotGridComponent>('pivotGrid');
371-
salesData = signal<Sale[]>([]);
372-
373-
pivotConfig: IPivotConfiguration = {
374-
columns: [{ memberName: 'Quarter', enabled: true }],
375-
rows: [{ memberName: 'Region', enabled: true }],
376-
values: [{
377-
member: 'Revenue',
378-
aggregate: { aggregator: IgxPivotNumericAggregate.sum, key: 'SUM', label: 'Sum' },
379-
enabled: true
380-
}],
381-
filters: [{ memberName: 'Year', enabled: true }]
382-
};
371+
export class PivotGridBasicSampleComponent {
372+
public data = DATA;
373+
public pivotConfigHierarchy: IPivotConfiguration = {
374+
columns: [
375+
{
376+
377+
memberName: 'Product',
378+
memberFunction: (data) => data.Product.Name,
379+
enabled: true
380+
}
381+
382+
],
383+
rows: [
384+
{
385+
memberName: 'Seller',
386+
memberFunction: (data) => data.Seller.Name,
387+
enabled: true
388+
}
389+
],
390+
values: [
391+
{
392+
member: 'NumberOfUnits',
393+
aggregate: {
394+
aggregator: IgxPivotNumericAggregate.sum,
395+
key: 'sum',
396+
label: 'Sum'
397+
},
398+
enabled: true
399+
400+
}
401+
],
402+
filters: null
403+
};
383404
}
384405
```
385406

386407
```html
387-
<igx-pivot-grid #pivotGrid
388-
[data]="salesData()"
389-
[pivotConfiguration]="pivotConfig"
390-
height="600px">
408+
<igx-pivot-grid #grid1 [data]="data" [pivotConfiguration]="pivotConfigHierarchy" height="500px">
391409
</igx-pivot-grid>
392410
```
393411

412+
```json
413+
export const DATA = [
414+
{
415+
Product: {
416+
Name: 'Clothing',
417+
UnitPrice: '12.814860936633712'
418+
},
419+
Seller: {
420+
Name: 'Stanley Brooker',
421+
City: 'Seattle'
422+
},
423+
Date: '2007-01-01T00:00:00',
424+
Value: '94.2652032683907',
425+
NumberOfUnits: '282'
426+
},
427+
{
428+
Product: {
429+
Name: 'Clothing',
430+
UnitPrice: '49.579375120615296'
431+
},
432+
Seller: {
433+
Name: 'Elisa Longbottom',
434+
City: 'Sofia'
435+
},
436+
Date: '2007-01-05T00:00:00',
437+
Value: '70.798922689072285',
438+
NumberOfUnits: '296'
439+
}
440+
...
441+
];
442+
```
443+
394444
### Pivot Data Selector
395445

396446
Provide a drag-and-drop UI for users to reshape the pivot interactively:

0 commit comments

Comments
 (0)