Skip to content

Commit

Permalink
refactor: remove compatibility mode
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
crisbeto committed Oct 10, 2017
1 parent 7fe1b81 commit a06a23d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 254 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ src/lib/core/option/** @kara @crisbeto
src/lib/core/rxjs/** @jelbourn
src/lib/core/ripple/** @devversion
src/lib/core/a11y/** @jelbourn @devversion
src/lib/core/compatibility/** @jelbourn
src/lib/core/overlay/** @jelbourn @crisbeto
src/lib/core/overlay/scroll/** @andrewseguin @crisbeto
src/lib/core/platform/** @jelbourn @devversion
Expand Down
22 changes: 0 additions & 22 deletions guides/compatibility-mode.md

This file was deleted.

7 changes: 3 additions & 4 deletions src/lib/core/common-behaviors/common-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

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


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

/**
* Module that captures anything that should be loaded and/or run for *all* Angular Material
* components. This includes Bidi, compatibility mode, etc.
* components. This includes Bidi, etc.
*
* This module should be imported to each top-level component module (e.g., MatTabsModule).
*/
@NgModule({
imports: [CompatibilityModule, BidiModule],
exports: [CompatibilityModule, BidiModule],
imports: [BidiModule],
exports: [BidiModule],
providers: [{
provide: MATERIAL_SANITY_CHECKS, useValue: true,
}],
Expand Down
Empty file.
205 changes: 0 additions & 205 deletions src/lib/core/compatibility/compatibility.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/lib/core/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

export * from './animation/animation';
export * from './common-behaviors/index';
export * from './compatibility/compatibility';
export * from './datetime/index';
export * from './error/error-options';
export * from './gestures/gesture-annotations';
Expand Down
24 changes: 6 additions & 18 deletions src/lib/stepper/stepper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,7 @@ class SimpleMatHorizontalStepperApp {
<mat-step [stepControl]="oneGroup">
<form [formGroup]="oneGroup">
<ng-template matStepLabel>Step one</ng-template>
<mat-form-field>
<input matInput formControlName="oneCtrl" required>
</mat-form-field>
<input formControlName="oneCtrl" required>
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand All @@ -734,9 +732,7 @@ class SimpleMatHorizontalStepperApp {
<mat-step [stepControl]="twoGroup">
<form [formGroup]="twoGroup">
<ng-template matStepLabel>Step two</ng-template>
<mat-form-field>
<input matInput formControlName="twoCtrl" required>
</mat-form-field>
<input formControlName="twoCtrl" required>
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand All @@ -746,9 +742,7 @@ class SimpleMatHorizontalStepperApp {
<mat-step [stepControl]="threeGroup" optional>
<form [formGroup]="threeGroup">
<ng-template matStepLabel>Step two</ng-template>
<mat-form-field>
<input matInput formControlName="threeCtrl">
</mat-form-field>
<input formControlName="threeCtrl">
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand Down Expand Up @@ -818,9 +812,7 @@ class SimpleMatVerticalStepperApp {
<mat-step [stepControl]="oneGroup">
<form [formGroup]="oneGroup">
<ng-template matStepLabel>Step one</ng-template>
<mat-form-field>
<input matInput formControlName="oneCtrl" required>
</mat-form-field>
<input formControlName="oneCtrl" required>
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand All @@ -830,9 +822,7 @@ class SimpleMatVerticalStepperApp {
<mat-step [stepControl]="twoGroup">
<form [formGroup]="twoGroup">
<ng-template matStepLabel>Step two</ng-template>
<mat-form-field>
<input matInput formControlName="twoCtrl" required>
</mat-form-field>
<input formControlName="twoCtrl" required>
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand All @@ -842,9 +832,7 @@ class SimpleMatVerticalStepperApp {
<mat-step [stepControl]="threeGroup" optional>
<form [formGroup]="threeGroup">
<ng-template matStepLabel>Step two</ng-template>
<mat-form-field>
<input matInput formControlName="threeCtrl">
</mat-form-field>
<input formControlName="threeCtrl">
<div>
<button mat-button matStepperPrevious>Back</button>
<button mat-button matStepperNext>Next</button>
Expand Down
7 changes: 4 additions & 3 deletions src/universal-app/kitchen-sink/kitchen-sink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import {
MatToolbarModule,
MatTooltipModule,
MatStepperModule,
MatButtonToggleModule,
MatCheckboxModule,
} from '@angular/material';
import {
CdkTableModule,
Expand Down Expand Up @@ -68,10 +70,9 @@ export class KitchenSink {
BrowserModule.withServerTransition({appId: 'kitchen-sink'}),
MatAutocompleteModule,
MatButtonModule,
// Button toggle and checkbox can't work due to https://github.com/angular/angular/issues/17050
// MatButtonToggleModule,
MatButtonToggleModule,
MatCardModule,
// MatCheckboxModule,
MatCheckboxModule,
MatChipsModule,
MatDatepickerModule,
MatDialogModule,
Expand Down

0 comments on commit a06a23d

Please sign in to comment.