Skip to content

Commit d3512c0

Browse files
crisbetommalerba
authored andcommitted
build: bump to latest MDC version and fix error in master (#17447)
Bumps to the latest canary version of MDC and fixes an error that shows up in master. Note that the updates to the `MDCLinearProgressAdapter` interface haven't landed yet, but our CI is failing because it runs against unreleased MDC code.
1 parent ef92091 commit d3512c0

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"@types/youtube": "^0.0.38",
5353
"@webcomponents/custom-elements": "^1.1.0",
5454
"core-js": "^2.6.1",
55-
"material-components-web": "^4.0.0-canary.e851d4f40.0",
55+
"material-components-web": "^4.0.0-canary.062ade5c0.0",
5656
"rxjs": "^6.5.3",
5757
"systemjs": "0.19.43",
5858
"tsickle": "^0.35.0",

src/material-experimental/mdc-progress-bar/progress-bar.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,18 @@ export class MatProgressBar extends _MatProgressBarMixinBase implements AfterVie
8282
addClass: (className: string) => this._rootElement.classList.add(className),
8383
getBuffer: () => this._bufferBar,
8484
getPrimaryBar: () => this._primaryBar,
85+
// TODO(crisbeto): remove the ` as MDCLinearProgressAdapter` below once this is released:
86+
// tslint:disable-next-line:max-line-length
87+
// https://github.com/material-components/material-components-web/commit/062ade5c052cf00cefeee6e8e0acf7d16c4ce338
88+
// We add `forceLayout` before the code requiring it is in the canary
89+
// release so that our cronjob that runs against master doesn't fail.
90+
forceLayout: () => this._platform.isBrowser && this._rootElement.offsetWidth,
8591
hasClass: (className: string) => this._rootElement.classList.contains(className),
8692
removeClass: (className: string) => this._rootElement.classList.remove(className),
8793
setStyle: (el: HTMLElement, styleProperty: string, value: string) => {
8894
(el.style as any)[styleProperty] = value;
8995
}
90-
};
96+
} as MDCLinearProgressAdapter;
9197

9298
/** Flag that indicates whether NoopAnimations mode is set to true. */
9399
_isNoopAnimation = false;

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7996,7 +7996,7 @@ matchdep@^2.0.0:
79967996
resolve "^1.4.0"
79977997
stack-trace "0.0.10"
79987998

7999-
material-components-web@^4.0.0-canary.e851d4f40.0:
7999+
material-components-web@^4.0.0-canary.062ade5c0.0:
80008000
version "4.0.0-canary.e851d4f40.0"
80018001
resolved "https://registry.yarnpkg.com/material-components-web/-/material-components-web-4.0.0-canary.e851d4f40.0.tgz#a3c0539eca3a78498056ba4268115ab332c29658"
80028002
integrity sha512-QNv/KGq3zYdxqNrWJu9ksryEGHIzy0LWoNixR/4gaqV5Cick/b74+7u/qni81ZGib7A10Y8iYVo3kPASPnceVw==

0 commit comments

Comments
 (0)