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(tab-nav-bar): ripples still showing up when globally disabled #11865

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
7 changes: 6 additions & 1 deletion src/lib/tabs/tab-nav-bar/tab-nav-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ export class MatTabLink extends _MatTabLinkMixinBase
/** Reference to the RippleRenderer for the tab-link. */
protected _tabLinkRipple: RippleRenderer;

/** Whether the ripples are globally disabled through the RippleGlobalOptions */
private _ripplesGloballyDisabled = false;

/** Whether the link is active. */
@Input()
get active(): boolean { return this._isActive; }
Expand All @@ -210,7 +213,8 @@ export class MatTabLink extends _MatTabLinkMixinBase
* @docs-private
*/
get rippleDisabled(): boolean {
return this.disabled || this.disableRipple || this._tabNavBar.disableRipple;
return this.disabled || this.disableRipple || this._tabNavBar.disableRipple ||
this._ripplesGloballyDisabled;
}

constructor(private _tabNavBar: MatTabNav,
Expand All @@ -227,6 +231,7 @@ export class MatTabLink extends _MatTabLinkMixinBase
this.tabIndex = parseInt(tabIndex) || 0;

if (globalOptions) {
this._ripplesGloballyDisabled = !!globalOptions.disabled;
// TODO(paul): Once the speedFactor is removed, we no longer need to copy each single option.
this.rippleConfig = {
terminateOnPointerUp: globalOptions.terminateOnPointerUp,
Expand Down
2 changes: 1 addition & 1 deletion tools/gulp/tasks/screenshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function setFileResult(database: Database, prNumber: string, fileName: string, r

/** Sets the full diff result for the current Pull Request that runs inside of Travis. */
function setPullRequestResult(database: Database, prNumber: string, result: boolean) {
return getPullRequestRef(database, prNumber).child('result').child(pullRequestSha).set(result);
return getPullRequestRef(database, prNumber).child('result').child(pullRequestSha!).set(result);
}

/** Returns the Firebase Reference that contains all data related to the specified PR. */
Expand Down