Skip to content

Commit 6f58c24

Browse files
authored
Merge branch 'master' into tzhelev/fix-6005-master
2 parents 88ec14f + 8423d84 commit 6f58c24

File tree

16 files changed

+281
-142
lines changed

16 files changed

+281
-142
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ All notable changes for each version of this project will be documented in this
1818

1919
### New Features
2020
- `IgxOverlayService`:
21-
- `setOffset` method added. It repositions the content in the horizontal and vertical directions.
21+
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
2222
- `IgxToggleDirective`:
23-
- `setOffset` method added. It repositions the content in the horizontal and vertical directions.
23+
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
2424

2525
## 8.2.6
2626

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

+5
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@
5757
"factory": "./update-8_2_3"
5858
},
5959
"migration-12": {
60+
"version": "8.2.6",
61+
"description": "Updates Ignite UI for Angular from v8.2.3 to v8.2.6",
62+
"factory": "./update-8_2_6"
63+
},
64+
"migration-13": {
6065
"version": "9.0.0",
6166
"description": "Updates Ignite UI for Angular from v8.2.x to v9.2.0",
6267
"factory": "./update-9_0_0"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "../../common/schema/theme-props.schema.json",
3+
"changes": [
4+
{
5+
"name": "$button-background",
6+
"remove": true,
7+
"owner": "igx-grid-toolbar-theme"
8+
},
9+
{
10+
"name": "$button-text-color",
11+
"remove": true,
12+
"owner": "igx-grid-toolbar-theme"
13+
},
14+
{
15+
"name": "$button-hover-background",
16+
"remove": true,
17+
"owner": "igx-grid-toolbar-theme"
18+
},
19+
{
20+
"name": "$button-hover-text-color",
21+
"remove": true,
22+
"owner": "igx-grid-toolbar-theme"
23+
},
24+
{
25+
"name": "$button-focus-background",
26+
"remove": true,
27+
"owner": "igx-grid-toolbar-theme"
28+
},
29+
{
30+
"name": "$button-focus-text-color",
31+
"remove": true,
32+
"owner": "igx-grid-toolbar-theme"
33+
}
34+
]
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import * as path from 'path';
2+
3+
// tslint:disable:no-implicit-dependencies
4+
import { virtualFs } from '@angular-devkit/core';
5+
import { EmptyTree } from '@angular-devkit/schematics';
6+
// tslint:disable-next-line:no-submodule-imports
7+
import { SchematicTestRunner, UnitTestTree } from '@angular-devkit/schematics/testing';
8+
9+
describe('Update 8.2.6', () => {
10+
let appTree: UnitTestTree;
11+
const schematicRunner = new SchematicTestRunner('ig-migrate', path.join(__dirname, '../migration-collection.json'));
12+
const configJson = {
13+
defaultProject: 'testProj',
14+
projects: {
15+
testProj: {
16+
sourceRoot: '/testSrc'
17+
}
18+
},
19+
schematics: {
20+
'@schematics/angular:component': {
21+
prefix: 'appPrefix'
22+
}
23+
}
24+
};
25+
26+
beforeEach(() => {
27+
appTree = new UnitTestTree(new EmptyTree());
28+
appTree.create('/angular.json', JSON.stringify(configJson));
29+
});
30+
31+
it('should update igx-carousel-theme prop', done => {
32+
appTree.create(
33+
'/testSrc/appPrefix/component/test.component.scss',
34+
`$my-toolbar-theme: igx-grid-toolbar-theme(
35+
$background-color: null,
36+
$button-background: null,
37+
$title-text-color: null,
38+
$button-text-color: null,
39+
$button-hover-background: null,
40+
$button-hover-text-color: null,
41+
$button-focus-background: null,
42+
$button-focus-text-color: null,
43+
$dropdown-background: null,
44+
$item-text-color: null,
45+
$item-hover-background: null,
46+
$item-hover-text-color: null,
47+
$item-focus-background: null,
48+
$item-focus-text-color: null
49+
);`
50+
);
51+
const tree = schematicRunner.runSchematic('migration-12', {}, appTree);
52+
expect(tree.readContent('/testSrc/appPrefix/component/test.component.scss'))
53+
.toEqual(
54+
`$my-toolbar-theme: igx-grid-toolbar-theme(
55+
$background-color: null,
56+
$title-text-color: null,
57+
$dropdown-background: null,
58+
$item-text-color: null,
59+
$item-hover-background: null,
60+
$item-hover-text-color: null,
61+
$item-focus-background: null,
62+
$item-focus-text-color: null
63+
);`
64+
);
65+
done();
66+
});
67+
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {
2+
Rule,
3+
SchematicContext,
4+
Tree
5+
} from '@angular-devkit/schematics';
6+
import { UpdateChanges } from '../common/UpdateChanges';
7+
8+
const version = '8.2.6';
9+
10+
export default function(): Rule {
11+
return (host: Tree, context: SchematicContext) => {
12+
context.logger.info(`Applying migration for Ignite UI for Angular to version ${version}`);
13+
14+
const update = new UpdateChanges(__dirname, host, context);
15+
update.applyChanges();
16+
};
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "../../common/schema/theme-props.schema.json",
3+
"changes": [
4+
{
5+
"name": "$button-background",
6+
"remove": true,
7+
"owner": "igx-grid-toolbar-theme"
8+
},
9+
{
10+
"name": "$button-text-color",
11+
"remove": true,
12+
"owner": "igx-grid-toolbar-theme"
13+
},
14+
{
15+
"name": "$button-hover-background",
16+
"remove": true,
17+
"owner": "igx-grid-toolbar-theme"
18+
},
19+
{
20+
"name": "$button-hover-text-color",
21+
"remove": true,
22+
"owner": "igx-grid-toolbar-theme"
23+
},
24+
{
25+
"name": "$button-focus-background",
26+
"remove": true,
27+
"owner": "igx-grid-toolbar-theme"
28+
},
29+
{
30+
"name": "$button-focus-text-color",
31+
"remove": true,
32+
"owner": "igx-grid-toolbar-theme"
33+
}
34+
]
35+
}

projects/igniteui-angular/migrations/update-9_0_0/index.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Update 9.0.0', () => {
3535
IgxRowComponent, IgxHierarchicalGridBaseComponent } from 'igniteui-angular';
3636
`);
3737

38-
const tree = schematicRunner.runSchematic('migration-12', {}, appTree);
38+
const tree = schematicRunner.runSchematic('migration-13', {}, appTree);
3939
expect(tree.readContent('/testSrc/appPrefix/component/test.component.ts'))
4040
.toEqual(
4141
`import { IgxDropDownBaseDirective, IgxDropDownItemBaseDirective, IgxGridBaseDirective,

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

+8-78
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
///
1111
/// @param {Color} $background-color [null] - The toolbar background color.
1212
/// @param {Color} $title-text-color [null] - The toolbar title text color.
13-
/// @param {Color} $button-background [null] - The toolbar button background color.
14-
/// @param {Color} $button-text-color [null] - The toolbar button text color.
15-
/// @param {Color} $button-hover-background [null] - The toolbar button hover background color.
16-
/// @param {Color} $button-hover-text-color [null] - The toolbar button hover text color.
17-
/// @param {Color} $button-focus-background [null] - The toolbar button focus background color.
18-
/// @param {Color} $button-focus-text-color [null] - The toolbar button focus text color.
1913
/// @param {Color} $dropdown-background [null] - The toolbar drop-down background color.
2014
/// @param {Color} $item-text-color [null] - The toolbar drop-down item text color.
2115
/// @param {Color} $item-hover-background [null] - The toolbar drop-down item hover background color.
@@ -41,15 +35,8 @@
4135
$schema: $light-schema,
4236
4337
$background-color: null,
44-
$button-background: null,
4538
$title-text-color: null,
4639
47-
$button-text-color: null,
48-
$button-hover-background: null,
49-
$button-hover-text-color: null,
50-
$button-focus-background: null,
51-
$button-focus-text-color: null,
52-
5340
$dropdown-background: null,
5441
$item-text-color: null,
5542
$item-hover-background: null,
@@ -92,44 +79,13 @@
9279
$item-focus-text-color: text-contrast($item-focus-background);
9380
}
9481

95-
@if not($button-hover-background) and $background-color {
96-
$button-hover-text-color: text-contrast($background-color);
97-
98-
@if type-of($background-color) == 'color' {
99-
$button-hover-background: rgba(text-contrast($background-color), .2);
100-
}
101-
}
102-
103-
@if not($button-focus-background) and $background-color {
104-
$button-focus-text-color: text-contrast($background-color);
105-
106-
@if type-of($background-color) == 'color' {
107-
$button-focus-background: rgba(text-contrast($background-color), .2);
108-
}
109-
}
110-
111-
@if not($button-background) and $background-color {
112-
$button-text-color: text-contrast($background-color);
113-
114-
@if type-of($background-color) == 'color' {
115-
$button-background: rgba(text-contrast($background-color), .1);
116-
}
117-
}
118-
11982
@return extend($theme, (
12083
name: $name,
12184
palette: $palette,
12285

12386
background-color: $background-color,
124-
button-background: $button-background,
12587
title-text-color: $title-text-color,
12688

127-
button-text-color: $button-text-color,
128-
button-hover-background: $button-hover-background,
129-
button-hover-text-color: $button-hover-text-color,
130-
button-focus-background: $button-focus-background,
131-
button-focus-text-color: $button-focus-text-color,
132-
13389
item-text-color: $item-text-color,
13490
dropdown-background: $dropdown-background,
13591
item-hover-background: $item-hover-background,
@@ -191,39 +147,11 @@
191147
padding: map-get($grid-toolbar-padding-rtl, 'comfortable');
192148
}
193149

194-
%igx-button--flat {
195-
background: --var($theme, 'button-background');
196-
color: --var($theme, 'button-text-color');
197-
margin-#{$left}: rem(8);
198-
199-
&:hover {
200-
background: --var($theme, 'button-hover-background');
201-
color: --var($theme, 'button-hover-text-color');
202-
}
203-
204-
&:focus,
205-
&:active {
206-
background: --var($theme, 'button-focus-background');
207-
color: --var($theme, 'button-focus-text-color');
208-
}
209-
}
210-
211-
%igx-button--icon {
212-
background: --var($theme, 'button-background');
213-
color: --var($theme, 'button-text-color');
150+
%igx-button--outlined,
151+
%igx-button--raised,
152+
%igx-button--flat,
153+
%igx-button--icon{
214154
margin-#{$left}: rem(8);
215-
border-radius: 0;
216-
217-
&:hover {
218-
background: --var($theme, 'button-hover-background');
219-
color: --var($theme, 'button-hover-text-color');
220-
}
221-
222-
&:focus,
223-
&:active {
224-
background: --var($theme, 'button-focus-background');
225-
color: --var($theme, 'button-focus-text-color');
226-
}
227155
}
228156

229157
%igx-grid-toolbar__button-space {
@@ -249,8 +177,10 @@
249177
&[dir='rtl'] {
250178
text-align: #{$right};
251179

180+
%igx-button--outlined,
181+
%igx-button--raised,
252182
%igx-button--flat,
253-
%igx-button--icon {
183+
%igx-button--icon{
254184
margin-#{$left}: 0;
255185
margin-#{$right}: rem(8);
256186
}
@@ -321,7 +251,7 @@
321251
}
322252

323253
%igx-grid-toolbar__adv-filter--filtered {
324-
color: igx-color(map-get($theme, 'palette'), 'secondary') !important;
254+
border-color: igx-color(map-get($theme, 'palette'), 'secondary') !important;
325255
}
326256

327257
%igx-grid-toolbar__dropdown {

0 commit comments

Comments
 (0)