Skip to content

switch progress-spinner implementation to use MDC #25324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/src/material/prebuilt-themes/** @andrewseguin
/src/material/legacy-prebuilt-themes/** @andrewseguin
/src/material/legacy-progress-bar/** @andrewseguin @crisbeto
/src/material/progress-spinner/** @andrewseguin @crisbeto
/src/material/legacy-progress-spinner/** @andrewseguin @crisbeto
/src/material/legacy-radio/** @andrewseguin @devversion
/src/material/schematics/** @devversion @andrewseguin
/src/material/legacy-select/** @crisbeto
Expand Down Expand Up @@ -123,7 +123,7 @@
/src/material/menu/** @crisbeto
/src/material/select/** @crisbeto
/src/material/paginator/** @crisbeto
/src/material-experimental/mdc-progress-spinner/** @andrewseguin
/src/material/progress-spinner/** @andrewseguin
/src/material/progress-bar/** @andrewseguin
/src/material/radio/** @mmalerba
/src/material/snack-bar/** @andrewseguin
Expand Down Expand Up @@ -337,7 +337,7 @@
/tools/public_api_guard/material/menu** @crisbeto
/tools/public_api_guard/material/legacy-paginator** @andrewseguin
/tools/public_api_guard/material/legacy-progress-bar** @andrewseguin @crisbeto
/tools/public_api_guard/material/progress-spinner**@andrewseguin @crisbeto
/tools/public_api_guard/material/legacy-progress-spinner**@andrewseguin @crisbeto
/tools/public_api_guard/material/radio** @andrewseguin @devversion
/tools/public_api_guard/material/legacy-radio** @andrewseguin @devversion
/tools/public_api_guard/material/legacy-select** @crisbeto
Expand Down
4 changes: 2 additions & 2 deletions .ng-dev/commit-message.mts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const commitMessage: CommitMessageConfig = {
'material/input',
'material/paginator',
'material/progress-bar',
'material-experimental/mdc-progress-spinner',
'material/progress-spinner',
'material/slide-toggle',
'material/snack-bar',
'material/table',
Expand Down Expand Up @@ -90,7 +90,7 @@ export const commitMessage: CommitMessageConfig = {
'material/prebuilt-themes',
'material/legacy-prebuilt-themes',
'material/legacy-progress-bar',
'material/progress-spinner',
'material/legacy-progress-spinner',
'material/radio',
'material/legacy-radio',
'material/schematics',
Expand Down
2 changes: 1 addition & 1 deletion goldens/tsec-exemption.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"../src/cdk/a11y/aria-describer/aria-reference.ts",
"../src/material/checkbox/checkbox.ts",
"../src/material/list/interactive-list-base.ts",
"../src/material-experimental/mdc-progress-spinner/progress-spinner.ts",
"../src/material/progress-spinner/progress-spinner.ts",
"../src/material/slide-toggle/slide-toggle.ts",
"../src/material/icon/icon-registry.ts",
"../src/material/icon/icon.ts"
Expand Down
2 changes: 1 addition & 1 deletion integration/mdc-migration/golden/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {MatListModule} from '@angular/material-experimental/mdc-list';
import {MatMenuModule} from '@angular/material-experimental/mdc-menu';
import {MatPaginatorModule} from '@angular/material/paginator';
import {MatProgressBarModule} from '@angular/material-experimental/mdc-progress-bar';
import {MatProgressSpinnerModule} from '@angular/material-experimental/mdc-progress-spinner';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatRadioModule} from '@angular/material-experimental/mdc-radio';
import {MatSelectModule} from '@angular/material-experimental/mdc-select';
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
import {ProgressSpinnerComponent} from './progress-spinner.component';

describe('ProgressSpinnerComponent', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {MatListModule} from '@angular/material/list';
import {MatMenuModule} from '@angular/material/menu';
import {MatPaginatorModule} from '@angular/material/paginator';
import {MatProgressBarModule} from '@angular/material/progress-bar';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
import {MatRadioModule} from '@angular/material/radio';
import {MatSelectModule} from '@angular/material/select';
import {MatSlideToggleModule} from '@angular/material/legacy-slide-toggle';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
import {ProgressSpinnerComponent} from './progress-spinner.component';

describe('ProgressSpinnerComponent', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ ng_module(
"//src/material/legacy-checkbox",
"//src/material/legacy-input",
"//src/material/legacy-paginator",
"//src/material/legacy-progress-spinner",
"//src/material/legacy-table",
"//src/material/legacy-table/testing",
"//src/material/progress-spinner",
"//src/material/sort",
"@npm//@angular/platform-browser",
"@npm//@angular/platform-browser-dynamic",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {MatLegacyCheckboxModule} from '@angular/material/legacy-checkbox';
import {MatIconModule} from '@angular/material/icon';
import {MatLegacyInputModule} from '@angular/material/legacy-input';
import {MatLegacyPaginatorModule} from '@angular/material/legacy-paginator';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatLegacyProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
import {MatSortModule} from '@angular/material/sort';
import {MatTableModule} from '@angular/material/table';
import {DragDropModule} from '@angular/cdk/drag-drop';
Expand Down Expand Up @@ -124,7 +124,7 @@ const EXAMPLES = [
MatIconModule,
MatLegacyInputModule,
MatLegacyPaginatorModule,
MatProgressSpinnerModule,
MatLegacyProgressSpinnerModule,
MatRippleModule,
MatSortModule,
MatTableModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ ng_module(
"//src/cdk/testing",
"//src/cdk/testing/testbed",
"//src/material/legacy-card",
"//src/material/legacy-progress-spinner",
"//src/material/legacy-progress-spinner/testing",
"//src/material/legacy-radio",
"//src/material/legacy-slider",
"//src/material/progress-spinner",
"//src/material/progress-spinner/testing",
"@npm//@angular/forms",
"@npm//@angular/platform-browser",
"@npm//@angular/platform-browser-dynamic",
Expand All @@ -43,8 +43,8 @@ ng_test_library(
":progress-spinner",
"//src/cdk/testing",
"//src/cdk/testing/testbed",
"//src/material/progress-spinner",
"//src/material/progress-spinner/testing",
"//src/material/legacy-progress-spinner",
"//src/material/legacy-progress-spinner/testing",
"@npm//@angular/platform-browser-dynamic",
],
)
Expand Down
4 changes: 2 additions & 2 deletions src/components-examples/material/progress-spinner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {MatLegacyCardModule} from '@angular/material/legacy-card';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatLegacyProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
import {MatLegacyRadioModule} from '@angular/material/legacy-radio';
import {MatLegacySliderModule} from '@angular/material/legacy-slider';
import {ProgressSpinnerConfigurableExample} from './progress-spinner-configurable/progress-spinner-configurable-example';
Expand All @@ -25,7 +25,7 @@ const EXAMPLES = [
imports: [
CommonModule,
MatLegacyCardModule,
MatProgressSpinnerModule,
MatLegacyProgressSpinnerModule,
MatLegacyRadioModule,
MatLegacySliderModule,
FormsModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component} from '@angular/core';
import {ThemePalette} from '@angular/material/core';
import {ProgressSpinnerMode} from '@angular/material/progress-spinner';
import {LegacyProgressSpinnerMode} from '@angular/material/legacy-progress-spinner';

/**
* @title Configurable progress spinner
Expand All @@ -12,6 +12,6 @@ import {ProgressSpinnerMode} from '@angular/material/progress-spinner';
})
export class ProgressSpinnerConfigurableExample {
color: ThemePalette = 'primary';
mode: ProgressSpinnerMode = 'determinate';
mode: LegacyProgressSpinnerMode = 'determinate';
value = 50;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {MatProgressSpinnerHarness} from '@angular/material/progress-spinner/testing';
import {MatLegacyProgressSpinnerHarness} from '@angular/material/legacy-progress-spinner/testing';
import {HarnessLoader} from '@angular/cdk/testing';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatLegacyProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
import {ProgressSpinnerHarnessExample} from './progress-spinner-harness-example';

describe('ProgressSpinnerHarnessExample', () => {
Expand All @@ -11,7 +11,7 @@ describe('ProgressSpinnerHarnessExample', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [MatProgressSpinnerModule],
imports: [MatLegacyProgressSpinnerModule],
declarations: [ProgressSpinnerHarnessExample],
}).compileComponents();
fixture = TestBed.createComponent(ProgressSpinnerHarnessExample);
Expand All @@ -20,22 +20,22 @@ describe('ProgressSpinnerHarnessExample', () => {
});

it('should load all progress spinner harnesses', async () => {
const progressSpinners = await loader.getAllHarnesses(MatProgressSpinnerHarness);
const progressSpinners = await loader.getAllHarnesses(MatLegacyProgressSpinnerHarness);
expect(progressSpinners.length).toBe(2);
});

it('should get the value', async () => {
fixture.componentInstance.value = 50;
const [determinate, impliedIndeterminate] = await loader.getAllHarnesses(
MatProgressSpinnerHarness,
MatLegacyProgressSpinnerHarness,
);
expect(await determinate.getValue()).toBe(50);
expect(await impliedIndeterminate.getValue()).toBe(null);
});

it('should get the mode', async () => {
const [determinate, impliedIndeterminate] = await loader.getAllHarnesses(
MatProgressSpinnerHarness,
MatLegacyProgressSpinnerHarness,
);
expect(await determinate.getMode()).toBe('determinate');
expect(await impliedIndeterminate.getMode()).toBe('indeterminate');
Expand Down
2 changes: 1 addition & 1 deletion src/components-examples/material/table/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ ng_module(
"//src/material/legacy-checkbox",
"//src/material/legacy-input",
"//src/material/legacy-paginator",
"//src/material/legacy-progress-spinner",
"//src/material/legacy-table",
"//src/material/legacy-table/testing",
"//src/material/progress-spinner",
"//src/material/sort",
"@npm//@angular/platform-browser",
"@npm//@angular/platform-browser-dynamic",
Expand Down
4 changes: 2 additions & 2 deletions src/components-examples/material/table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {MatLegacyCheckboxModule} from '@angular/material/legacy-checkbox';
import {MatIconModule} from '@angular/material/icon';
import {MatLegacyInputModule} from '@angular/material/legacy-input';
import {MatLegacyPaginatorModule} from '@angular/material/legacy-paginator';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatLegacyProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
import {MatSortModule} from '@angular/material/sort';
import {MatLegacyTableModule} from '@angular/material/legacy-table';
import {DragDropModule} from '@angular/cdk/drag-drop';
Expand Down Expand Up @@ -121,7 +121,7 @@ const EXAMPLES = [
MatIconModule,
MatLegacyInputModule,
MatLegacyPaginatorModule,
MatProgressSpinnerModule,
MatLegacyProgressSpinnerModule,
MatRippleModule,
MatSortModule,
MatLegacyTableModule,
Expand Down
2 changes: 1 addition & 1 deletion src/dev-app/mdc-progress-spinner/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ ng_module(
":mdc_progress_spinner_demo_scss",
],
deps = [
"//src/material-experimental/mdc-progress-spinner",
"//src/material/button",
"//src/material/button-toggle",
"//src/material/checkbox",
"//src/material/progress-spinner",
"@npm//@angular/forms",
],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import {Component} from '@angular/core';
import {ThemePalette} from '@angular/material/core';
import {MatProgressSpinnerModule} from '@angular/material-experimental/mdc-progress-spinner';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatButtonModule} from '@angular/material/button';
import {MatCheckboxModule} from '@angular/material/checkbox';
import {MatButtonToggleModule} from '@angular/material/button-toggle';
Expand Down
2 changes: 1 addition & 1 deletion src/dev-app/progress-spinner/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ng_module(
"//src/material/button-toggle",
"//src/material/legacy-button",
"//src/material/legacy-checkbox",
"//src/material/progress-spinner",
"//src/material/legacy-progress-spinner",
"@npm//@angular/forms",
],
)
Expand Down
4 changes: 2 additions & 2 deletions src/dev-app/progress-spinner/progress-spinner-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {FormsModule} from '@angular/forms';
import {MatLegacyButtonModule} from '@angular/material/legacy-button';
import {MatButtonToggleModule} from '@angular/material/button-toggle';
import {MatLegacyCheckboxModule} from '@angular/material/legacy-checkbox';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatLegacyProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';

@Component({
selector: 'progress-spinner-demo',
Expand All @@ -24,7 +24,7 @@ import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
MatLegacyButtonModule,
MatButtonToggleModule,
MatLegacyCheckboxModule,
MatProgressSpinnerModule,
MatLegacyProgressSpinnerModule,
],
})
export class ProgressSpinnerDemo {
Expand Down
2 changes: 1 addition & 1 deletion src/e2e-app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ng_module(
"//src/cdk/testing/tests:test_components",
"//src/components-examples/material-experimental/mdc-card",
"//src/components-examples/private",
"//src/material-experimental/mdc-progress-spinner",
"//src/material/button",
"//src/material/card",
"//src/material/checkbox",
Expand All @@ -60,6 +59,7 @@ ng_module(
"//src/material/legacy-list",
"//src/material/legacy-menu",
"//src/material/legacy-progress-bar",
"//src/material/legacy-progress-spinner",
"//src/material/legacy-radio",
"//src/material/legacy-slide-toggle",
"//src/material/legacy-tabs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import {NgModule} from '@angular/core';
import {MatProgressSpinnerModule} from '@angular/material-experimental/mdc-progress-spinner';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MdcProgressSpinnerE2e} from './mdc-progress-spinner-e2e';

@NgModule({
Expand Down
4 changes: 2 additions & 2 deletions src/e2e-app/progress-spinner/progress-spinner-e2e-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
*/

import {NgModule} from '@angular/core';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatLegacyProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
import {ProgressSpinnerE2E} from './progress-spinner-e2e';

@NgModule({
imports: [MatProgressSpinnerModule],
imports: [MatLegacyProgressSpinnerModule],
declarations: [ProgressSpinnerE2E],
})
export class ProgressSpinnerE2eModule {}
3 changes: 0 additions & 3 deletions src/material-experimental/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,5 @@
// MDC-related themes
@forward './mdc-core/core-theme' as mdc-core-* show mdc-core-theme, mdc-core-color,
mdc-core-density, mdc-core-typography;
@forward './mdc-progress-spinner/progress-spinner-theme' as mdc-progress-spinner-* show
mdc-progress-spinner-color, mdc-progress-spinner-typography, mdc-progress-spinner-density,
mdc-progress-spinner-theme;

// Additional public APIs for individual components
2 changes: 0 additions & 2 deletions src/material-experimental/config.bzl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
entryPoints = [
"column-resize",
"mdc-core",
"mdc-progress-spinner",
"mdc-progress-spinner/testing",
"menubar",
"popover-edit",
"selection",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@forward '../../../material/core/theming/theming.import';
@forward '../../../material/core/core.import';
@forward '../core-theme.import';
@forward '../../mdc-progress-spinner/progress-spinner-theme' as mat-mdc-progress-spinner-*;
@forward '../theming/all-theme';
@forward 'all-color' hide all-mdc-component-colors;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@forward '../../../material/core/theming/theming.import';
@forward '../../../material/core/core.import';
@forward '../core-theme.import';
@forward '../../mdc-progress-spinner/progress-spinner-theme' as mat-mdc-progress-spinner-*;
@forward '../theming/all-theme';
@forward 'all-density' show all-mdc-component-densities;

Expand Down
2 changes: 1 addition & 1 deletion src/material-experimental/mdc-core/theming/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ sass_library(
deps = [
"//src/material:sass_lib",
"//src/material-experimental/mdc-core:mdc_core_scss_lib",
"//src/material-experimental/mdc-progress-spinner:mdc_progress_spinner_scss_lib",
"//src/material/autocomplete:autocomplete_scss_lib",
"//src/material/button:button_scss_lib",
"//src/material/card:card_scss_lib",
Expand All @@ -31,6 +30,7 @@ sass_library(
"//src/material/form-field:form_field_scss_lib",
"//src/material/input:input_scss_lib",
"//src/material/progress-bar:progress_bar_scss_lib",
"//src/material/progress-spinner:progress_spinner_scss_lib",
"//src/material/slide-toggle:slide_toggle_scss_lib",
"//src/material/slider:slider_scss_lib",
"//src/material/snack-bar:snack_bar_scss_lib",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
@forward '../../../material/core/theming/theming.import';
@forward '../../../material/core/core.import';
@forward '../core-theme.import';
@forward '../../mdc-progress-spinner/progress-spinner-theme' as mat-mdc-progress-spinner-*;
@forward 'all-theme' hide all-mdc-component-themes;;

@import '../core-theme';
@import '../../mdc-progress-spinner/progress-spinner-theme';
@import '../../../material/core/core';
@import '../../../material/core/core-theme';
@import '../../../material/core/theming/theming';
Loading