Skip to content

Commit dcef604

Browse files
crisbetommalerba
authored andcommitted
refactor: remove compatibility mode (#7689)
Since the switch to the `mat-` prefix, the compatibility mode is no longer necessary. These changes remove anything that was left. BREAKING CHANGE: The `MATERIAL_COMPATIBILITY_MODE`, `CompatibilityModule`, `NoConflictStyleCompatibilityMode`, `MatPrefixRejector`, `MdPrefixRejector` symbols have been removed.
1 parent f806286 commit dcef604

File tree

8 files changed

+11
-251
lines changed

8 files changed

+11
-251
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
/src/lib/core/* @jelbourn
3636
/src/lib/core/animation/** @jelbourn
3737
/src/lib/core/common-behaviors/** @jelbourn
38-
/src/lib/core/compatibility/** @jelbourn
3938
/src/lib/core/datetime/** @mmalerba
4039
/src/lib/core/error/** @crisbeto @mmalerba
4140
/src/lib/core/gestures/** @jelbourn

guides/compatibility-mode.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/lib/core/common-behaviors/common-module.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import {NgModule, InjectionToken, Optional, Inject, isDevMode} from '@angular/core';
1010
import {BidiModule} from '@angular/cdk/bidi';
11-
import {CompatibilityModule} from '../compatibility/compatibility';
1211

1312

1413
/** Injection token that configures whether the Material sanity checks are enabled. */
@@ -17,13 +16,13 @@ export const MATERIAL_SANITY_CHECKS = new InjectionToken<boolean>('mat-sanity-ch
1716

1817
/**
1918
* Module that captures anything that should be loaded and/or run for *all* Angular Material
20-
* components. This includes Bidi, compatibility mode, etc.
19+
* components. This includes Bidi, etc.
2120
*
2221
* This module should be imported to each top-level component module (e.g., MatTabsModule).
2322
*/
2423
@NgModule({
25-
imports: [CompatibilityModule, BidiModule],
26-
exports: [CompatibilityModule, BidiModule],
24+
imports: [BidiModule],
25+
exports: [BidiModule],
2726
providers: [{
2827
provide: MATERIAL_SANITY_CHECKS, useValue: true,
2928
}],

src/lib/core/compatibility/compatibility.spec.ts

Whitespace-only changes.

src/lib/core/compatibility/compatibility.ts

Lines changed: 0 additions & 205 deletions
This file was deleted.

src/lib/core/public-api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
export * from './animation/animation';
1010
export * from './common-behaviors/index';
11-
export * from './compatibility/compatibility';
1211
export * from './datetime/index';
1312
export * from './error/error-options';
1413
export * from './gestures/gesture-annotations';

src/lib/stepper/stepper.spec.ts

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -722,9 +722,7 @@ class SimpleMatHorizontalStepperApp {
722722
<mat-step [stepControl]="oneGroup">
723723
<form [formGroup]="oneGroup">
724724
<ng-template matStepLabel>Step one</ng-template>
725-
<mat-form-field>
726-
<input matInput formControlName="oneCtrl" required>
727-
</mat-form-field>
725+
<input formControlName="oneCtrl" required>
728726
<div>
729727
<button mat-button matStepperPrevious>Back</button>
730728
<button mat-button matStepperNext>Next</button>
@@ -734,9 +732,7 @@ class SimpleMatHorizontalStepperApp {
734732
<mat-step [stepControl]="twoGroup">
735733
<form [formGroup]="twoGroup">
736734
<ng-template matStepLabel>Step two</ng-template>
737-
<mat-form-field>
738-
<input matInput formControlName="twoCtrl" required>
739-
</mat-form-field>
735+
<input formControlName="twoCtrl" required>
740736
<div>
741737
<button mat-button matStepperPrevious>Back</button>
742738
<button mat-button matStepperNext>Next</button>
@@ -746,9 +742,7 @@ class SimpleMatHorizontalStepperApp {
746742
<mat-step [stepControl]="threeGroup" optional>
747743
<form [formGroup]="threeGroup">
748744
<ng-template matStepLabel>Step two</ng-template>
749-
<mat-form-field>
750-
<input matInput formControlName="threeCtrl">
751-
</mat-form-field>
745+
<input formControlName="threeCtrl">
752746
<div>
753747
<button mat-button matStepperPrevious>Back</button>
754748
<button mat-button matStepperNext>Next</button>
@@ -818,9 +812,7 @@ class SimpleMatVerticalStepperApp {
818812
<mat-step [stepControl]="oneGroup">
819813
<form [formGroup]="oneGroup">
820814
<ng-template matStepLabel>Step one</ng-template>
821-
<mat-form-field>
822-
<input matInput formControlName="oneCtrl" required>
823-
</mat-form-field>
815+
<input formControlName="oneCtrl" required>
824816
<div>
825817
<button mat-button matStepperPrevious>Back</button>
826818
<button mat-button matStepperNext>Next</button>
@@ -830,9 +822,7 @@ class SimpleMatVerticalStepperApp {
830822
<mat-step [stepControl]="twoGroup">
831823
<form [formGroup]="twoGroup">
832824
<ng-template matStepLabel>Step two</ng-template>
833-
<mat-form-field>
834-
<input matInput formControlName="twoCtrl" required>
835-
</mat-form-field>
825+
<input formControlName="twoCtrl" required>
836826
<div>
837827
<button mat-button matStepperPrevious>Back</button>
838828
<button mat-button matStepperNext>Next</button>
@@ -842,9 +832,7 @@ class SimpleMatVerticalStepperApp {
842832
<mat-step [stepControl]="threeGroup" optional>
843833
<form [formGroup]="threeGroup">
844834
<ng-template matStepLabel>Step two</ng-template>
845-
<mat-form-field>
846-
<input matInput formControlName="threeCtrl">
847-
</mat-form-field>
835+
<input formControlName="threeCtrl">
848836
<div>
849837
<button mat-button matStepperPrevious>Back</button>
850838
<button mat-button matStepperNext>Next</button>

src/universal-app/kitchen-sink/kitchen-sink.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ import {
3535
MatToolbarModule,
3636
MatTooltipModule,
3737
MatStepperModule,
38+
MatButtonToggleModule,
39+
MatCheckboxModule,
3840
} from '@angular/material';
3941
import {
4042
CdkTableModule,

0 commit comments

Comments
 (0)