Skip to content

Commit 20a23f1

Browse files
andrewseguinjelbourn
authored andcommitted
fix: remove all md prefixes (#7241)
1 parent 3571f68 commit 20a23f1

File tree

554 files changed

+8545
-9735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

554 files changed

+8545
-9735
lines changed

CODING_STANDARDS.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@ In HTML code, use `<!-- ... -->` comments, which will be stripped when packaging
4949

5050
For example, rather than doing this:
5151
```html
52-
<md-button>Basic button</md-button>
53-
<md-button class="mat-fab">FAB</md-button>
54-
<md-button class="mat-icon-button">pony</md-button>
52+
<mat-button>Basic button</mat-button>
53+
<mat-button class="mat-fab">FAB</mat-button>
54+
<mat-button class="mat-icon-button">pony</mat-button>
5555
```
5656

5757
do this:
5858
```html
59-
<md-button>Basic button</md-button>
60-
<md-fab>FAB</md-fab>
61-
<md-icon-button>pony</md-icon-button>
59+
<mat-button>Basic button</mat-button>
60+
<mat-fab>FAB</mat-fab>
61+
<mat-icon-button>pony</mat-icon-button>
6262
```
6363

6464
#### Prefer small, focused modules
@@ -191,7 +191,7 @@ and the return value:
191191
* @param config Dialog configuration options.
192192
* @returns Reference to the newly-opened dialog.
193193
*/
194-
open<T>(component: ComponentType<T>, config?: MdDialogConfig): MdDialogRef<T> { ... }
194+
open<T>(component: ComponentType<T>, config?: MatDialogConfig): MatDialogRef<T> { ... }
195195
```
196196

197197
Boolean properties and return values should use "Whether..." as opposed to "True if...":
@@ -229,7 +229,7 @@ class UniqueSelectionDispatcher { }
229229
Avoid suffixing a class with "Service", as it communicates nothing about what the class does. Try to
230230
think of the class name as a person's job title.
231231

232-
Classes that correspond to a directive with an `md-` prefix should also be prefixed with `Md`.
232+
Classes that correspond to a directive with an `mat-` prefix should also be prefixed with `Mat`.
233233
CDK classes should only have a `Cdk` prefix when the class is a directive with a `cdk` selector
234234
prefix.
235235

e2e/components/button-toggle-e2e.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('button-toggle', () => {
66
beforeEach(() => browser.get('/button-toggle'));
77

88
it('should show a button-toggle', async () => {
9-
expect(element(by.tagName('md-button-toggle'))).toBeDefined();
9+
expect(element(by.tagName('mat-button-toggle'))).toBeDefined();
1010
screenshot();
1111
});
1212

e2e/components/card-e2e.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {browser, by, element} from 'protractor';
22
import {screenshot} from '../screenshot';
33

4-
describe('md-card', () => {
4+
describe('mat-card', () => {
55

66
beforeEach(() => browser.get('/cards'));
77

88
it('should show a card', async () => {
9-
const card = element(by.tagName('md-card'));
9+
const card = element(by.tagName('mat-card'));
1010
expect(card).toBeDefined();
1111

1212
screenshot('fancy card example');

e2e/components/dialog-e2e.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('dialog', () => {
1414

1515
it('should open a dialog', () => {
1616
element(by.id('default')).click();
17-
expectToExist('md-dialog-container');
17+
expectToExist('mat-dialog-container');
1818
screenshot('simple dialog opened');
1919
});
2020

@@ -29,40 +29,40 @@ describe('dialog', () => {
2929

3030
await waitForDialog();
3131
clickOnBackrop();
32-
expectToExist('md-dialog-container', false);
32+
expectToExist('mat-dialog-container', false);
3333
});
3434

3535
it('should close by pressing escape', async () => {
3636
element(by.id('default')).click();
3737

3838
await waitForDialog();
3939
pressKeys(Key.ESCAPE);
40-
expectToExist('md-dialog-container', false);
40+
expectToExist('mat-dialog-container', false);
4141
});
4242

4343
it('should close by pressing escape when the first tabbable element has lost focus',
4444
async () => {
4545
element(by.id('default')).click();
4646

4747
await waitForDialog();
48-
clickElementAtPoint('md-dialog-container', { x: 0, y: 0 });
48+
clickElementAtPoint('mat-dialog-container', { x: 0, y: 0 });
4949
pressKeys(Key.ESCAPE);
50-
expectToExist('md-dialog-container', false);
50+
expectToExist('mat-dialog-container', false);
5151
});
5252

5353
it('should close by clicking on the "close" button', async () => {
5454
element(by.id('default')).click();
5555

5656
await waitForDialog();
5757
element(by.id('close')).click();
58-
expectToExist('md-dialog-container', false);
58+
expectToExist('mat-dialog-container', false);
5959
});
6060

6161
it('should focus the first focusable element', async () => {
6262
element(by.id('default')).click();
6363

6464
await waitForDialog();
65-
expectFocusOn('md-dialog-container input');
65+
expectFocusOn('mat-dialog-container input');
6666
});
6767

6868
it('should restore focus to the element that opened the dialog', async () => {
@@ -88,19 +88,19 @@ describe('dialog', () => {
8888

8989
await waitForDialog();
9090
clickOnBackrop();
91-
expectToExist('md-dialog-container');
91+
expectToExist('mat-dialog-container');
9292
});
9393

9494
it('should be able to prevent closing by pressing escape', async () => {
9595
element(by.id('disabled')).click();
9696

9797
await waitForDialog();
9898
pressKeys(Key.ESCAPE);
99-
expectToExist('md-dialog-container');
99+
expectToExist('mat-dialog-container');
100100
});
101101

102102
function waitForDialog() {
103-
return waitForElement('md-dialog-container');
103+
return waitForElement('mat-dialog-container');
104104
}
105105

106106
function clickOnBackrop() {

e2e/components/grid-list-e2e.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ describe('grid-list', () => {
66
beforeEach(() => browser.get('/grid-list'));
77

88
it('should render a grid list container', () => {
9-
expectToExist('md-grid-list');
9+
expectToExist('mat-grid-list');
1010
screenshot();
1111
});
1212

1313
it('should render list items inside the grid list container', () => {
14-
expectToExist('md-grid-list md-grid-tile');
14+
expectToExist('mat-grid-list mat-grid-tile');
1515
});
1616
});

e2e/components/list-e2e.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ describe('list', () => {
66
beforeEach(() => browser.get('/list'));
77

88
it('should render a list container', () => {
9-
expectToExist('md-list');
9+
expectToExist('mat-list');
1010
screenshot();
1111
});
1212

1313
it('should render list items inside the list container', () => {
14-
expectToExist('md-list md-list-item');
14+
expectToExist('mat-list mat-list-item');
1515
});
1616
});

e2e/components/menu-e2e.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class MenuPage {
207207
trigger = () => element(by.id('trigger'));
208208
triggerTwo = () => element(by.id('trigger-two'));
209209
backdrop = () => element(by.css('.cdk-overlay-backdrop'));
210-
items = (index: number) => element.all(by.css('[md-menu-item]')).get(index);
210+
items = (index: number) => element.all(by.css('[mat-menu-item]')).get(index);
211211
textArea = () => element(by.id('text'));
212212
beforeTrigger = () => element(by.id('before-t'));
213213
aboveTrigger = () => element(by.id('above-t'));

e2e/components/progress-bar-e2e.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ describe('progress-bar', () => {
55
beforeEach(() => browser.get('/progress-bar'));
66

77
it('should render a determinate progress bar', () => {
8-
expectToExist('md-progress-bar[mode="determinate"]');
8+
expectToExist('mat-progress-bar[mode="determinate"]');
99
});
1010

1111
it('should render a buffer progress bar', () => {
12-
expectToExist('md-progress-bar[mode="buffer"]');
12+
expectToExist('mat-progress-bar[mode="buffer"]');
1313
});
1414

1515
it('should render a query progress bar', () => {
16-
expectToExist('md-progress-bar[mode="query"]');
16+
expectToExist('mat-progress-bar[mode="query"]');
1717
});
1818

1919
it('should render a indeterminate progress bar', () => {
20-
expectToExist('md-progress-bar[mode="indeterminate"]');
20+
expectToExist('mat-progress-bar[mode="indeterminate"]');
2121
});
2222
});

e2e/components/progress-spinner-e2e.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ describe('progress-spinner', () => {
44
beforeEach(() => browser.get('/progress-spinner'));
55

66
it('should render a determinate progress spinner', () => {
7-
expect(element(by.css('md-progress-spinner')).isPresent()).toBe(true);
7+
expect(element(by.css('mat-progress-spinner')).isPresent()).toBe(true);
88
});
99

1010
it('should render an indeterminate progress spinner', () => {
11-
expect(element(by.css('md-progress-spinner[mode="indeterminate"]')).isPresent()).toBe(true);
11+
expect(element(by.css('mat-progress-spinner[mode="indeterminate"]')).isPresent()).toBe(true);
1212
});
1313

1414
it('should render a spinner', () => {
15-
expect(element(by.css('md-spinner')).isPresent()).toBe(true);
15+
expect(element(by.css('mat-spinner')).isPresent()).toBe(true);
1616
});
1717
});

e2e/components/sidenav-e2e.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('sidenav', () => {
66

77
beforeEach(() => {
88
browser.get('/sidenav');
9-
sidenav = element(by.tagName('md-sidenav'));
9+
sidenav = element(by.tagName('mat-sidenav'));
1010
});
1111

1212
it('should be closed', () => {

0 commit comments

Comments
 (0)