Skip to content

Commit de60460

Browse files
authored
Merge branch '20.1.x' into iminchev/fix-16943-20.1.x
2 parents f556e4e + 8b730b0 commit de60460

File tree

8 files changed

+143
-13
lines changed

8 files changed

+143
-13
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Trigger Licensed Release
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
release:
8+
types: [created]
9+
workflow_dispatch:
10+
inputs:
11+
release_tag:
12+
description: 'Release tag to dispatch (e.g. 21.1.1)'
13+
required: true
14+
type: string
15+
16+
jobs:
17+
dispatch-to-private-repo:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Get app token
22+
id: app-token
23+
uses: actions/create-github-app-token@v2
24+
with:
25+
app-id: ${{ secrets.IGNITEUI_GITHUB_APP_ID }}
26+
private-key: ${{ secrets.IGNITEUI_GITHUB_APP_PRIVATE_KEY }}
27+
owner: IgniteUI
28+
29+
- name: Send repository dispatch to private repo
30+
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
31+
with:
32+
token: ${{ steps.app-token.outputs.token }}
33+
repository: IgniteUI/igniteui-actions
34+
event-type: igniteui-angular-public-release-created
35+
client-payload: |
36+
{
37+
"release_tag": "${{ github.event_name == 'workflow_dispatch' && inputs.release_tag || github.event.release.tag_name }}",
38+
"public_repo": "${{ github.repository }}"
39+
}

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1268,7 +1268,7 @@
12681268
outline-style: none;
12691269

12701270
igx-icon {
1271-
--component-size: #{if($variant == 'indigo', 2, 3)};
1271+
--ig-size: #{if($variant == 'indigo', 2, 3)};
12721272
}
12731273
}
12741274

projects/igniteui-angular/src/lib/core/styles/components/stepper/_stepper-theme.scss

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,10 @@
366366
}
367367

368368
@if $variant == 'indigo' {
369-
[aria-selected='true'] {
370-
%igx-stepper__step-content-wrapper {
371-
padding-block: rem(16px);
372-
padding-inline-end: rem(16px);
373-
}
374-
}
375-
376369
[aria-selected='false'] {
377370
%igx-stepper__step-content-wrapper {
378371
padding-block: 0;
372+
transition: padding-block 0.3s 0.2s ease;
379373
}
380374
}
381375
}

projects/igniteui-angular/src/lib/grids/columns/column.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,8 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy, ColumnTy
22232223
result.push(size.width + 'px');
22242224
} else {
22252225
const currentWidth = parseFloat(this.grid.getPossibleColumnWidth());
2226-
result.push((this.getConstrainedSizePx(currentWidth)) + 'px');
2226+
const target = size && size.ref ? size.ref : this;
2227+
result.push((target as IgxColumnComponent).getConstrainedSizePx(currentWidth) + 'px');
22272228
}
22282229
}
22292230
return result;
@@ -2716,7 +2717,7 @@ export class IgxColumnComponent implements AfterContentInit, OnDestroy, ColumnTy
27162717
} else if (this.minWidth && newSize <= this.userSetMinWidthPx) {
27172718
this.widthConstrained = true;
27182719
return this.userSetMinWidthPx;
2719-
} else if (!this.minWidth && (!this.widthSetByUser || this.width === 'fit-content') && !this.grid.columnWidthSetByUser && (!newSize || newSize <= this.grid.minColumnWidth)) {
2720+
} else if (!this.columnGroup && !this.minWidth && (!this.widthSetByUser || this.width === 'fit-content') && !this.grid.columnWidthSetByUser && (!newSize || newSize <= this.grid.minColumnWidth)) {
27202721
return this.grid.minColumnWidth;
27212722
} else {
27222723
this.widthConstrained = false;

projects/igniteui-angular/src/lib/grids/grid/grid-collapsible-columns.spec.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
44
import {
55
CollapsibleColumnGroupTestComponent,
66
CollapsibleGroupsTemplatesTestComponent,
7-
CollapsibleGroupsDynamicColComponent
7+
CollapsibleGroupsDynamicColComponent,
8+
CollapsibleGroupWithExplicitChildWidthsComponent
89
} from '../../test-utils/grid-samples.spec';
910
import { GridFunctions } from '../../test-utils/grid-functions.spec';
1011
import { UIInteractions, wait } from '../../test-utils/ui-interactions.spec';
@@ -28,7 +29,8 @@ describe('IgxGrid - multi-column headers #grid', () => {
2829
NoopAnimationsModule,
2930
CollapsibleColumnGroupTestComponent,
3031
CollapsibleGroupsTemplatesTestComponent,
31-
CollapsibleGroupsDynamicColComponent
32+
CollapsibleGroupsDynamicColComponent,
33+
CollapsibleGroupWithExplicitChildWidthsComponent
3234
]
3335
}).compileComponents();
3436
}));
@@ -617,6 +619,28 @@ describe('IgxGrid - multi-column headers #grid', () => {
617619
expect(spans.length).toBe(2);
618620
});
619621

622+
it('should not constrain collapsed column group width by default min width when children have explicit widths (#17042)', () => {
623+
const fix = TestBed.createComponent(CollapsibleGroupWithExplicitChildWidthsComponent);
624+
fix.detectChanges();
625+
const g: IgxGridComponent = fix.componentInstance.grid;
626+
627+
const customerInfoGroup = GridFunctions.getColGroup(g, 'Customer Information');
628+
expect(customerInfoGroup.expanded).toBe(false);
629+
expect(customerInfoGroup.collapsible).toBe(true);
630+
631+
// The only visible child when collapsed is CompanyName with width 100px.
632+
const visibleChildren = customerInfoGroup.children
633+
.filter(c => !c.hidden);
634+
expect(visibleChildren.length).toBe(1);
635+
636+
const visibleChildWidth = visibleChildren
637+
.reduce((sum, c) => sum + c.calcPixelWidth, 0);
638+
639+
const groupWidth = customerInfoGroup.calcPixelWidth;
640+
expect(groupWidth).toBe(visibleChildWidth);
641+
expect(groupWidth).toBe(100);
642+
});
643+
620644
it('Group By: test when group by a column', () => {
621645
addressInf.expanded = false;
622646
countryCol.visibleWhenCollapsed = false;

projects/igniteui-angular/src/lib/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/src/lib/paginator/paginator.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export class IgxPaginatorComponent implements IgxPaginatorToken {
250250
*/
251251
@Input()
252252
public set resourceStrings(value: IPaginatorResourceStrings) {
253-
this._resourceStrings = Object.assign({}, this._resourceStrings, value);
253+
this._resourceStrings = Object.assign({}, this.resourceStrings, value);
254254
}
255255

256256
/**

projects/igniteui-angular/src/lib/test-utils/grid-samples.spec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,3 +2812,26 @@ export class IgxGridRowEditingDefinedColumnsComponent extends BasicGridComponent
28122812
})
28132813
export class IgxGridConditionalFilteringComponent extends IgxGridFilteringComponent {
28142814
}
2815+
2816+
@Component({
2817+
template: `
2818+
<igx-grid #grid [data]="data" height="500px" width="600px">
2819+
<igx-column-group header="Customer Information" [collapsible]="true" [expanded]="false">
2820+
<igx-column field="CompanyName" width="100px" [visibleWhenCollapsed]="true"></igx-column>
2821+
<igx-column field="ContactName" width="100px" [visibleWhenCollapsed]="false"></igx-column>
2822+
<igx-column field="ContactTitle" width="100px" [visibleWhenCollapsed]="false"></igx-column>
2823+
</igx-column-group>
2824+
<igx-column field="ID" width="200px"></igx-column>
2825+
<igx-column field="Address" width="200px"></igx-column>
2826+
<igx-column field="City" width="200px"></igx-column>
2827+
<igx-column field="Country" width="200px"></igx-column>
2828+
<igx-column field="Phone" width="200px"></igx-column>
2829+
</igx-grid>
2830+
`,
2831+
imports: [IgxGridComponent, IgxColumnComponent, IgxColumnGroupComponent]
2832+
})
2833+
export class CollapsibleGroupWithExplicitChildWidthsComponent {
2834+
@ViewChild(IgxGridComponent, { read: IgxGridComponent, static: true })
2835+
public grid: IgxGridComponent;
2836+
public data = SampleTestData.contactInfoDataFull();
2837+
}

0 commit comments

Comments
 (0)