Skip to content

Commit b63f987

Browse files
authored
Merge branch '18.2.x' into igniteui-angular-15002-18-2-x
2 parents 6dc9140 + d21f4ec commit b63f987

File tree

9 files changed

+91
-49
lines changed

9 files changed

+91
-49
lines changed

projects/igniteui-angular/migrations/migration-collection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@
201201
"version": "18.2.0",
202202
"description": "Updates Ignite UI for Angular from v18.1.x to v18.2.0",
203203
"factory": "./update-18_2_0"
204+
},
205+
"migration-41": {
206+
"version": "18.2.3",
207+
"description": "Updates Ignite UI for Angular from v18.2.0 to v18.2.3",
208+
"factory": "./update-18_2_3"
204209
}
205210
}
206211
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "../../common/schema/theme-changes.schema.json",
3+
"changes": [
4+
{
5+
"name": "$header-time-period-color",
6+
"remove": true,
7+
"owner": "time-picker-theme",
8+
"type":"property"
9+
}
10+
]
11+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import * as path from 'path';
2+
3+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
4+
import { setupTestTree } from '../common/setup.spec';
5+
6+
const version = '18.2.3';
7+
8+
describe(`Update to ${version}`, () => {
9+
let appTree: UnitTestTree;
10+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
11+
12+
beforeEach(() => {
13+
appTree = setupTestTree();
14+
});
15+
16+
const migrationName = 'migration-41';
17+
18+
it('should remove the $header-time-period-color property from the time-picker-theme', async () => {
19+
appTree.create(
20+
`/testSrc/appPrefix/component/test.component.scss`,
21+
`$custom-time-picker: time-picker-theme(
22+
$text-color: red,
23+
$header-time-period-color: pink
24+
);`
25+
);
26+
27+
const tree = await schematicRunner
28+
.runSchematic(migrationName, {}, appTree);
29+
30+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss')).toEqual(
31+
`$custom-time-picker: time-picker-theme(
32+
$text-color: red
33+
);`
34+
);
35+
});
36+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type {
2+
Rule,
3+
SchematicContext,
4+
Tree
5+
} from '@angular-devkit/schematics';
6+
import { UpdateChanges } from '../common/UpdateChanges';
7+
8+
const version = '18.2.3';
9+
10+
export default (): Rule => async (host: Tree, context: SchematicContext) => {
11+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
12+
const update = new UpdateChanges(__dirname, host, context);
13+
update.applyChanges();
14+
};

projects/igniteui-angular/src/lib/core/styles/components/time-picker/_time-picker-component.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
@extend %time-picker__wrapper !optional;
2525
}
2626

27-
@include e(header-ampm) {
28-
@extend %time-picker__header-ampm !optional;
29-
}
30-
3127
@include e(header-hour){
3228
@extend %time-picker__header-hour !optional;
3329
}

projects/igniteui-angular/src/lib/core/styles/components/time-picker/_time-picker-theme.scss

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
/// @param {Color} $disabled-item-background [null] - The background color for disabled values .
2424
/// @param {Color} $header-background [null] - The header background color of a time picker.
2525
/// @param {Color} $header-hour-text-color [null] - The header hour text color of a time picker.
26-
/// @param {Color} $header-time-period-color [null] - The header AM/PM text color of a time picker.
2726
/// @param {Color} $background-color [null] - The time-picker panel background color.
2827
/// @param {Number} $time-item-size [null] - The height of the time item.
2928
/// @param {Color} $divider-color [null] - The color for the actions area divider.
@@ -56,7 +55,6 @@
5655
$disabled-item-background: null,
5756
$header-background: null,
5857
$header-hour-text-color: null,
59-
$header-time-period-color: null,
6058
$background-color: null,
6159
$modal-shadow: null,
6260
$dropdown-shadow: null,
@@ -85,12 +83,6 @@
8583
$header-hour-text-color: text-contrast($header-background);
8684
}
8785

88-
@if not($header-time-period-color) and $header-background {
89-
@if meta.type-of($header-background) == 'color' {
90-
$header-time-period-color: rgba(text-contrast($header-background), .8);
91-
}
92-
}
93-
9486
@if not($selected-text-color) and $active-item-background {
9587
$selected-text-color: text-contrast($active-item-background);
9688
}
@@ -135,7 +127,6 @@
135127
disabled-item-background: $disabled-item-background,
136128
header-background: $header-background,
137129
header-hour-text-color: $header-hour-text-color,
138-
header-time-period-color: $header-time-period-color,
139130
background-color: $background-color,
140131
modal-shadow: $modal-shadow,
141132
dropdown-shadow: $dropdown-shadow,
@@ -162,15 +153,15 @@
162153
$picker-buttons-padding: map.get((
163154
'material': rem(8px),
164155
'fluent': rem(8px),
165-
'bootstrap': rem(16px),
156+
'bootstrap': rem(8px),
166157
'indigo': rem(8px) rem(16px),
167158
), $variant);
168159

169160
$picker-header-padding: map.get((
170-
'material': rem(24px) rem(16px),
161+
'material': rem(16px) rem(24px),
171162
'fluent': rem(16px),
172163
'bootstrap': rem(16px),
173-
'indigo': rem(16px) rem(24px) ,
164+
'indigo': rem(16px),
174165
), $variant);
175166

176167
%time-picker-display {
@@ -287,7 +278,7 @@
287278
}
288279

289280
%time-picker__item {
290-
width: if($variant == 'indigo', rem(46px), rem(54px));
281+
width: rem(46px);
291282
padding: rem(5px) rem(10px);
292283
border-radius: var-get($theme, 'active-item-border-radius');
293284
height: var-get($theme, 'time-item-size');
@@ -355,10 +346,6 @@
355346
}
356347
}
357348

358-
%time-picker__header-ampm {
359-
color: var-get($theme, 'header-time-period-color');
360-
}
361-
362349
%time-picker__header--vertical {
363350
@if $variant == 'indigo' {
364351
min-width: rem(136px);
@@ -371,18 +358,14 @@
371358
%time-picker__header-hour {
372359
display: flex;
373360
color: var-get($theme, 'header-hour-text-color');
361+
margin: 0;
374362

375363
[dir='rtl'] & {
376364
flex-direction: row-reverse;
377365
justify-content: flex-end;
378366
}
379367
}
380368

381-
%time-picker__header-ampm,
382-
%time-picker__header-hour {
383-
margin: 0;
384-
}
385-
386369
%time-picker__buttons {
387370
display: flex;
388371
min-height: sizable(rem(40px), rem(44px), rem(48px));
@@ -413,24 +396,20 @@
413396
header-hour: 'h4',
414397
selected-time: 'h5'
415398
)) {
416-
$time-period: map.get($categories, 'header-time-period');
417399
$header-hour: map.get($categories, 'header-hour');
418400
$selected-time: map.get($categories, 'selected-time');
419401

420-
421-
%time-picker__header-ampm {
422-
@include type-style($time-period, false);
423-
}
424-
425402
%time-picker__header-hour {
426403
@include type-style($header-hour, false) {
427404
margin-top: 0;
405+
margin-bottom: 0;
428406
}
429407
}
430408

431409
%time-picker__item--selected {
432410
@include type-style($selected-time) {
433411
margin-top: 0;
412+
margin-bottom: 0;
434413
}
435414
}
436415
}

projects/igniteui-angular/src/lib/core/styles/typography/_bootstrap.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@
103103
));
104104
@include tabs-typography();
105105
@include time-picker-typography($categories: (
106-
header-time-period: 'subtitle-1',
107106
header-hour: 'h4',
108107
selected-time: 'h4'
109108
));

projects/igniteui-angular/src/lib/core/styles/typography/_indigo.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@
106106
label: 'subtitle-2',
107107
));
108108
@include time-picker-typography($categories: (
109-
header-time-period: 'subtitle-1',
110109
header-hour: 'h5',
111110
selected-time: 'h6'
112111
));

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.virtualization.spec.ts

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { GridFunctions } from '../../test-utils/grid-functions.spec';
1515
import { HierarchicalGridFunctions } from '../../test-utils/hierarchical-grid-functions.spec';
1616
import { IgxHierarchicalRowComponent } from './hierarchical-row.component';
1717
import { IgxHierarchicalGridDefaultComponent } from '../../test-utils/hierarchical-grid-components.spec';
18+
import { firstValueFrom } from 'rxjs';
1819

1920
describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
2021
let fixture;
@@ -101,7 +102,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
101102
fixture.detectChanges();
102103

103104
const childGrid = hierarchicalGrid.gridAPI.getChildGrids(false)[0] as IgxHierarchicalGridComponent;
104-
const childCell = childGrid.gridAPI.get_cell_by_index(0, 'ID');
105+
const childCell = childGrid.gridAPI.get_cell_by_index(0, 'ID');
105106
GridFunctions.focusCell(fixture, childCell);
106107
fixture.detectChanges();
107108

@@ -169,7 +170,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
169170
await wait(100);
170171
fixture.detectChanges();
171172
const startIndex = hierarchicalGrid.verticalScrollContainer.state.startIndex;
172-
const topOffset = GridFunctions.getGridDisplayContainer(fixture).nativeElement.style.top;
173+
const topOffset = GridFunctions.getGridDisplayContainer(fixture).nativeElement.style.top;
173174
const secondRow = hierarchicalGrid.dataRowList.toArray()[1];
174175
// expand second row
175176
(secondRow.nativeElement.children[0] as HTMLElement).click();
@@ -194,6 +195,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
194195
});
195196

196197
it('should not lose scroll position after expanding a row when there are already expanded rows above.', async () => {
198+
197199
// Expand two rows at the top
198200
(hierarchicalGrid.dataRowList.toArray()[2].nativeElement.children[0] as HTMLElement).click();
199201
await wait();
@@ -205,7 +207,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
205207

206208
// Scroll to bottom
207209
hierarchicalGrid.verticalScrollContainer.getScroll().scrollTop = 5000;
208-
await wait(50);
210+
await firstValueFrom(hierarchicalGrid.verticalScrollContainer.chunkLoad);
209211
fixture.detectChanges();
210212
// Expand two rows at the bottom
211213
(hierarchicalGrid.dataRowList.toArray()[6].nativeElement.children[0] as HTMLElement).click();
@@ -218,12 +220,12 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
218220

219221
// Scroll to top to make sure top.
220222
hierarchicalGrid.verticalScrollContainer.getScroll().scrollTop = 0;
221-
await wait();
223+
await firstValueFrom(hierarchicalGrid.verticalScrollContainer.chunkLoad);
222224
fixture.detectChanges();
223225

224226
// Scroll to somewhere in the middle and make sure scroll position stays when expanding/collapsing.
225227
hierarchicalGrid.verticalScrollContainer.getScroll().scrollTop = 1250;
226-
await wait();
228+
await firstValueFrom(hierarchicalGrid.verticalScrollContainer.chunkLoad);
227229
fixture.detectChanges();
228230
const startIndex = hierarchicalGrid.verticalScrollContainer.state.startIndex;
229231
const topOffset = GridFunctions.getGridDisplayContainer(fixture).nativeElement.style.top;
@@ -266,7 +268,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
266268
hierarchicalGrid.verticalScrollContainer.state.chunkSize).toBe(80);
267269
expect(hierarchicalGrid.verticalScrollContainer.getScroll().scrollTop)
268270
.toEqual(hierarchicalGrid.verticalScrollContainer.getScroll().scrollHeight -
269-
parseInt(hierarchicalGrid.verticalScrollContainer.igxForContainerSize, 10));
271+
parseInt(hierarchicalGrid.verticalScrollContainer.igxForContainerSize, 10));
270272
});
271273

272274
it('should update scroll height after expanding/collapsing rows.', async () => {
@@ -326,7 +328,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
326328
expect(scrHeight).toBe(3 * 51 + (childGrid1.nativeElement.closest('.igx-grid__tr-container') as HTMLElement).offsetHeight - 1);
327329
});
328330

329-
it('should update context information correctly for child grid container after scrolling', async () => {
331+
it('should update context information correctly for child grid container after scrolling', async () => {
330332
// expand 3rd row
331333
const row = hierarchicalGrid.dataRowList.toArray()[3];
332334
(row.nativeElement.children[0] as HTMLElement).click();
@@ -345,7 +347,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => {
345347
expect(childRowComponent.index).toBe(4);
346348
});
347349

348-
it('should update scrollbar when expanding a row with data loaded after initial view initialization', (done) => {
350+
it('should update scrollbar when expanding a row with data loaded after initial view initialization', (done) => {
349351
fixture.componentInstance.data = fixture.componentInstance.generateData(10, 0);
350352
fixture.detectChanges();
351353

@@ -446,7 +448,7 @@ describe('IgxHierarchicalGrid Virtualization Custom Scenarios #hGrid', () => {
446448
});
447449
}));
448450

449-
it('should show scrollbar after expanding a row with data loaded after initial view initialization', async () => {
451+
it('should show scrollbar after expanding a row with data loaded after initial view initialization', async () => {
450452
const fixture = TestBed.createComponent(IgxHierarchicalGridNoScrollTestComponent);
451453
fixture.detectChanges();
452454
await wait();
@@ -505,12 +507,13 @@ export class IgxHierarchicalGridTestBaseComponent {
505507
let children;
506508
for (let i = 0; i < count; i++) {
507509
const rowID = parendID ? parendID + i : i.toString();
508-
if (level > 0 ) {
509-
children = this.generateData(count / 2 , currLevel - 1, rowID);
510-
}
511-
prods.push({
512-
ID: rowID, ChildLevels: currLevel, ProductName: 'Product: A' + i, Col1: i,
513-
Col2: i, Col3: i, childData: children, childData2: children });
510+
if (level > 0) {
511+
children = this.generateData(count / 2, currLevel - 1, rowID);
512+
}
513+
prods.push({
514+
ID: rowID, ChildLevels: currLevel, ProductName: 'Product: A' + i, Col1: i,
515+
Col2: i, Col3: i, childData: children, childData2: children
516+
});
514517
}
515518
return prods;
516519
}

0 commit comments

Comments
 (0)