Skip to content

Commit d7fa027

Browse files
Merge branch 'ganastasov/add-agents' into simenoff/theming-agent-rules
2 parents db6d5c1 + e56161b commit d7fa027

4 files changed

Lines changed: 58 additions & 13 deletions

File tree

.github/agents/changelog-agent.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,32 +52,28 @@ If the needed subsection exists, append to it. If not, create that subsection on
5252

5353
#### General
5454

55-
Use `### General` for changelog-worthy bug fixes.
55+
Use `### General` for deprecations, behavioral changes, and changelog-worthy bug fixes.
5656

5757
```markdown
5858
- `IgxComponentName`
5959
- Fixed an issue where <description of what was broken>.
6060
```
6161

62-
#### Breaking Changes
63-
6462
```markdown
6563
- `IgxComponentName`
66-
- **Breaking Change** - `oldName` has been renamed to `newName`. Automatic migration is available and will be applied on `ng update`.
64+
- **Deprecation** - `oldName` has been deprecated and will be removed in a future version. Use `newName` instead.
6765
```
6866

69-
#### Deprecations
70-
7167
```markdown
7268
- `IgxComponentName`
73-
- **Deprecation** - `oldName` has been deprecated and will be removed in a future version. Use `newName` instead.
69+
- **Behavioral Change** - description of the behavioral change.
7470
```
7571

76-
#### Behavioral Changes
72+
#### Breaking Changes
7773

7874
```markdown
7975
- `IgxComponentName`
80-
- **Behavioral Change** - Description of what changed.
76+
- **Breaking Change** - `oldName` has been renamed to `newName`. Automatic migration is available and will be applied on `ng update`.
8177
```
8278

8379
### 4. Placement Rules
@@ -86,7 +82,7 @@ Use `### General` for changelog-worthy bug fixes.
8682
- If the component already has entries in the same subsection, add sub-bullets under the same component heading.
8783
- Include short code examples only if they clarify usage.
8884

89-
## 5. Final Self-Validation
85+
### 5. Final Self-Validation
9086

9187
Before finishing:
9288

@@ -95,7 +91,7 @@ Before finishing:
9591
3. Confirm the formatting matches the existing CHANGELOG style.
9692
4. Confirm you updated an existing component entry instead of duplicating it when appropriate.
9793

98-
### 5. Commit
94+
### 6. Commit
9995

10096
For features:
10197
```

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ You are a dedicated Angular developer who thrives on leveraging the absolute lat
44

55
## Examples
66

7-
These are modern examples of how to write an Angular 20 component with signals
7+
These are modern examples of how to write an Angular component with signals
88

99
```ts
1010
import { ChangeDetectionStrategy, Component, signal } from '@angular/core';

projects/igniteui-angular/paginator/src/paginator/paginator.component.spec.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,55 @@ describe('IgxPaginator with default settings', () => {
231231
expect(totalPages.innerText).toBe('1');
232232
});
233233

234+
it('should display the pager text ("of") in page navigation', () => {
235+
const fix = TestBed.createComponent(DefaultPaginatorComponent);
236+
fix.detectChanges();
237+
238+
const pageNavTextDiv = fix.debugElement.query(By.css('.igx-page-nav__text')).nativeElement;
239+
const spans = pageNavTextDiv.querySelectorAll('span');
240+
const paginator = fix.componentInstance.paginator;
241+
242+
// Should have 3 spans: current page, "of" text, total pages
243+
expect(spans.length).toBe(3);
244+
245+
// Check current page
246+
expect(spans[0].innerText.trim()).toBe('1');
247+
248+
// Check the "of" text
249+
expect(spans[1].innerText.trim()).toBe('of');
250+
251+
// Check total pages
252+
expect(spans[2].innerText.trim()).toBe('3');
253+
254+
// Verify the resource string is set
255+
expect(paginator.resourceStrings.igx_paginator_pager_text).toBe('of');
256+
});
257+
258+
it('should preserve default resource strings when partial resourceStrings are provided', () => {
259+
const fix = TestBed.createComponent(DefaultPaginatorComponent);
260+
fix.detectChanges();
261+
262+
const paginator = fix.componentInstance.paginator;
263+
264+
// Set only a partial resource string (only override label)
265+
paginator.resourceStrings = { igx_paginator_label: 'Custom per page' };
266+
fix.detectChanges();
267+
268+
const pageNavTextDiv = fix.debugElement.query(By.css('.igx-page-nav__text')).nativeElement;
269+
const spans = pageNavTextDiv.querySelectorAll('span');
270+
271+
// Verify the custom label is set
272+
expect(paginator.resourceStrings.igx_paginator_label).toBe('Custom per page');
273+
274+
// Verify the pager text ("of") is still present from defaults
275+
expect(paginator.resourceStrings.igx_paginator_pager_text).toBe('of');
276+
expect(spans[1].innerText.trim()).toBe('of');
277+
278+
// Verify other default strings are also preserved
279+
expect(paginator.resourceStrings.igx_paginator_first_page_button_text).toBe('Go to first page');
280+
expect(paginator.resourceStrings.igx_paginator_next_page_button_text).toBe('Next page');
281+
});
282+
234283
});
235284

236285
describe('IgxPaginator with custom settings', () => {

projects/igniteui-angular/paginator/src/paginator/paginator.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ export class IgxPaginatorComponent implements IgxPaginatorToken {
256256
*/
257257
@Input()
258258
public set resourceStrings(value: IPaginatorResourceStrings) {
259-
this._resourceStrings = Object.assign({}, this._resourceStrings, value);
259+
this._resourceStrings = Object.assign({}, this.resourceStrings, value);
260260
}
261261

262262
/**

0 commit comments

Comments
 (0)