Skip to content

Commit 0363dce

Browse files
author
Konstantin Dinev
authored
Merge branch 'master' into didimmova/use-pad-function
2 parents de67076 + 49f15c2 commit 0363dce

10 files changed

Lines changed: 158 additions & 17 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"hammerjs": "^2.0.8",
121121
"ig-typedoc-theme": "^6.0.0",
122122
"igniteui-dockmanager": "^1.16.1",
123-
"igniteui-sassdoc-theme": "^2.0.1",
123+
"igniteui-sassdoc-theme": "^2.0.2",
124124
"igniteui-webcomponents": "6.2.1",
125125
"jasmine": "^5.6.0",
126126
"jasmine-core": "^5.6.0",

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@
241241
"version": "20.0.6",
242242
"description": "Updates Ignite UI for Angular from v20.0.2 to v20.0.6",
243243
"factory": "./update-20_0_6"
244+
},
245+
"migration-49": {
246+
"version": "20.1.0",
247+
"description": "Updates Ignite UI for Angular from v20.0.6 to v20.1.0",
248+
"factory": "./update-20_1_0"
244249
}
245250
}
246251
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "../../common/schema/theme-changes.schema.json",
3+
"changes": [
4+
{
5+
"name": "$filtering-background-and",
6+
"remove": true,
7+
"owner": "grid-theme",
8+
"type": "property"
9+
},
10+
{
11+
"name": "$filtering-background-and--focus",
12+
"remove": true,
13+
"owner": "grid-theme",
14+
"type": "property"
15+
},
16+
{
17+
"name": "$filtering-background-or",
18+
"remove": true,
19+
"owner": "grid-theme",
20+
"type": "property"
21+
},
22+
{
23+
"name": "$filtering-background-or--focus",
24+
"remove": true,
25+
"owner": "grid-theme",
26+
"type": "property"
27+
}
28+
]
29+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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 = '20.1.0';
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-49';
17+
18+
it('should remove properties related to the advanced filtering from the grid theme', async () => {
19+
const testFilePath = `/testSrc/appPrefix/component/test.component.scss`;
20+
21+
appTree.create(
22+
testFilePath,
23+
`$my-input-group-theme: grid-theme(
24+
$filtering-row-background: #ccc,
25+
$filtering-background-and: red,
26+
$filtering-background-and--focus: blue,
27+
$filtering-background-or: yellow,
28+
$filtering-background-or--focus: green
29+
);`
30+
);
31+
32+
const tree = await schematicRunner.runSchematic(migrationName, {}, appTree);
33+
34+
expect(tree.readContent(testFilePath)).toEqual(
35+
`$my-input-group-theme: grid-theme(
36+
$filtering-row-background: #ccc
37+
);`
38+
);
39+
});
40+
});
41+
42+
43+
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 = '20.1.0';
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/button/_button-theme.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@
6161
$variant
6262
);
6363

64-
$button-transition: color $time ease-in-out,
65-
background-color $time ease-in-out,
66-
border-color $time ease-in-out,
67-
box-shadow $time ease-in-out;
64+
$button-transition: color var(--_init-transition, #{$time}) ease-in-out,
65+
background-color var(--_init-transition, #{$time}) ease-in-out,
66+
border-color var(--_init-transition, #{$time}) ease-in-out,
67+
box-shadow var(--_init-transition, #{$time}) ease-in-out;
6868

6969
$button-disabled-shadow: none;
7070

projects/igniteui-angular/src/lib/core/styles/components/icon-button/_icon-button-theme.scss

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,10 @@
7373
-webkit-tap-highlight-color: transparent;
7474
overflow: hidden;
7575
white-space: nowrap;
76-
transition: box-shadow .2s ease-in, background .15s ease-out;
77-
transition-delay: .05s;
76+
transition:
77+
box-shadow var(--_init-transition, .2s) ease-in,
78+
background var(--_init-transition, .15s) ease-out;
79+
transition-delay: var(--_init-transition, .05s);
7880
min-width: unset;
7981
min-height: unset;
8082
font-size: rem(24px, 24px);
@@ -95,7 +97,9 @@
9597
}
9698

9799
@if $variant == 'fluent' {
98-
transition: color .15s ease-out, background .15s ease-out;
100+
transition:
101+
color var(--_init-transition, .15s) ease-out,
102+
background var(--_init-transition, .15s) ease-out;
99103

100104
&::after {
101105
position: absolute;
@@ -109,11 +113,18 @@
109113
}
110114

111115
@if $variant == 'bootstrap' {
112-
transition: box-shadow .15s ease-out, color .15s ease-out, background .15s ease-out;
116+
transition:
117+
box-shadow var(--_init-transition, .15s) ease-out,
118+
color var(--_init-transition, .15s) ease-out,
119+
background var(--_init-transition, .15s) ease-out;
113120
}
114121

115122
@if $variant == 'indigo' {
116-
transition: color .15s ease-in-out, box-shadow .15s ease-in-out, background .15s ease-in-out, border-color .15s ease-in-out;
123+
transition:
124+
color var(--_init-transition, .15s) ease-in-out,
125+
box-shadow var(--_init-transition, .15s) ease-in-out,
126+
background var(--_init-transition, .15s) ease-in-out,
127+
border-color var(--_init-transition, .15s) ease-in-out;
117128
}
118129
}
119130

projects/igniteui-angular/src/lib/directives/button/button-base.ts

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
1-
import { Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output, booleanAttribute } from '@angular/core';
1+
import {
2+
Directive,
3+
ElementRef,
4+
EventEmitter,
5+
HostBinding,
6+
HostListener,
7+
Input,
8+
Output,
9+
booleanAttribute,
10+
inject,
11+
afterRenderEffect,
12+
} from '@angular/core';
13+
import { PlatformUtil } from '../../core/utils';
214

315
export const IgxBaseButtonType = {
416
Flat: 'flat',
517
Contained: 'contained',
618
Outlined: 'outlined'
719
} as const;
820

21+
922
@Directive()
1023
export abstract class IgxButtonBaseDirective {
24+
private _platformUtil = inject(PlatformUtil);
25+
1126
/**
1227
* Emitted when the button is clicked.
1328
*/
@@ -79,7 +94,25 @@ export abstract class IgxButtonBaseDirective {
7994
return this.disabled || null;
8095
}
8196

82-
constructor(public element: ElementRef) { }
97+
protected constructor(
98+
public element: ElementRef,
99+
) {
100+
// In browser, set via native API for immediate effect (no-op on server).
101+
// In SSR there is no paint, so there’s no visual rendering or transitions to suppress.
102+
// Fix style flickering https://github.com/IgniteUI/igniteui-angular/issues/14759
103+
if (this._platformUtil.isBrowser) {
104+
afterRenderEffect({
105+
write: () => {
106+
this.element.nativeElement.style.setProperty('--_init-transition', '0s');
107+
},
108+
read: () => {
109+
requestAnimationFrame(() => {
110+
this.element.nativeElement.style.removeProperty('--_init-transition');
111+
});
112+
}
113+
});
114+
}
115+
}
83116

84117
/**
85118
* @hidden

projects/igniteui-angular/src/lib/directives/button/icon-button.directive.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Directive, HostBinding, Input } from '@angular/core';
1+
import {Directive, ElementRef, HostBinding, Input} from '@angular/core';
22
import { IgxBaseButtonType, IgxButtonBaseDirective } from './button-base';
33

44
/**
@@ -78,4 +78,10 @@ export class IgxIconButtonDirective extends IgxButtonBaseDirective {
7878
public get outlined(): boolean {
7979
return this._type === IgxBaseButtonType.Outlined;
8080
}
81+
82+
constructor(
83+
public override element: ElementRef,
84+
) {
85+
super(element);
86+
}
8187
}

0 commit comments

Comments
 (0)