Skip to content
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

fix(ripple): remove unused ScrollDispatchModule #7528

Merged
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
3 changes: 1 addition & 2 deletions src/lib/core/ripple/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import {NgModule} from '@angular/core';
import {ScrollDispatchModule} from '@angular/cdk/scrolling';
import {PlatformModule} from '@angular/cdk/platform';
import {MatCommonModule} from '../common-behaviors/common-module';
import {MatRipple} from './ripple';
Expand All @@ -17,7 +16,7 @@ export {RippleRef, RippleState} from './ripple-ref';
export {RippleConfig, RIPPLE_FADE_IN_DURATION, RIPPLE_FADE_OUT_DURATION} from './ripple-renderer';

@NgModule({
imports: [MatCommonModule, PlatformModule, ScrollDispatchModule],
imports: [MatCommonModule, PlatformModule],
exports: [MatRipple, MatCommonModule],
declarations: [MatRipple],
})
Expand Down
12 changes: 1 addition & 11 deletions src/lib/core/ripple/ripple.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {TestBed, ComponentFixture, fakeAsync, tick, inject} from '@angular/core/testing';
import {Component, ViewChild} from '@angular/core';
import {Platform} from '@angular/cdk/platform';
import {ViewportRuler, VIEWPORT_RULER_PROVIDER} from '@angular/cdk/scrolling';
import {dispatchMouseEvent, dispatchTouchEvent} from '@angular/cdk/testing';
import {RIPPLE_FADE_OUT_DURATION, RIPPLE_FADE_IN_DURATION} from './ripple-renderer';
import {
Expand All @@ -13,7 +12,6 @@ describe('MatRipple', () => {
let fixture: ComponentFixture<any>;
let rippleTarget: HTMLElement;
let originalBodyMargin: string | null;
let viewportRuler: ViewportRuler;
let platform: Platform;

/** Extracts the numeric value of a pixel size string like '123px'. */
Expand All @@ -24,7 +22,6 @@ describe('MatRipple', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [MatRippleModule],
providers: [VIEWPORT_RULER_PROVIDER],
declarations: [
BasicRippleContainer,
RippleContainerWithInputBindings,
Expand All @@ -34,8 +31,7 @@ describe('MatRipple', () => {
});
});

beforeEach(inject([ViewportRuler, Platform], (ruler: ViewportRuler, p: Platform) => {
viewportRuler = ruler;
beforeEach(inject([Platform], (p: Platform) => {
platform = p;

// Set body margin to 0 during tests so it doesn't mess up position calculations.
Expand Down Expand Up @@ -239,9 +235,6 @@ describe('MatRipple', () => {

// Mobile safari
window.scrollTo(pageScrollLeft, pageScrollTop);
// Force an update of the cached viewport geometries because IE11 emits the
// scroll event later.
viewportRuler._cacheViewportGeometry();
});

afterEach(() => {
Expand All @@ -255,9 +248,6 @@ describe('MatRipple', () => {

// Mobile safari
window.scrollTo(0, 0);
// Force an update of the cached viewport geometries because IE11 emits the
// scroll event later.
viewportRuler._cacheViewportGeometry();
});

it('create ripple with correct position', () => {
Expand Down