-
Notifications
You must be signed in to change notification settings - Fork 47
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
Upgrade for Angular 9 #180
Conversation
…ular/common@8 @angular/cdk@8 @angular/material@8 Used --force to get past tsickle peer dependency: >Package "tsickle" has an incompatible peer dependency to "typescript" (requires "~3.4.1", would install "3.5.3").
Deprecated: Use @angular/common instead, see https://angular.io/guide/deprecations#angularhttp
…latest, @angular/common@latest, @angular/cdk@latest, @angular/material@latest
Angular Workspace migration. Update an Angular CLI workspace to version 9.
Static flag migration. Removes the `static` flag from dynamic queries. As of Angular 9, the "static" flag defaults to false and is no longer required for your view and content queries. Read more about this here: https://v9.angular.io/guide/migration-dynamic-flag
Updates Angular Material to v9
Any plans to merge this soon? @willshowell |
We had been trying to keep them at a base level, not to versions > |
Also, I tried building locally w/ no success. What version of node? |
Man... I accidentally deleted my last post 😄.
@pgkehle and @henrahmagix, after switching I'm using node v13.10.1 |
@julianobrasil do you get any warnings/errors in the demo? Mine builds and runs now, but I get these warnings:
Also,
|
I haven't run anything yesterday, but I'll mess a little bit with it today. One thing that I've noticed by running the demo ( popover/src/demo/app/anchor-reuse/anchor-reuse.component.ts Lines 39 to 40 in 35a99eb
I looks like something changed in angular 9 and you now need to run the queries before the first change detection cycle to avoid an error message on devtools console, or you will have trouble here when calling popover/src/demo/app/anchor-reuse/anchor-reuse.component.ts Lines 23 to 30 in 35a99eb
You can solve that by just setting the @ViewChild('a', {static: true}) aPopover: SatPopover;
@ViewChild('b', {static: true}) bPopover: SatPopover; I'll dig in the other things you've pointed out. |
WHEN |
@pgkehle, concerning the first warning message about the Instead of:
We can just: // TODO: remove this line when angular stop supporting IE11 and cdk provides
// other methods to check for the key codes in a safe way.
// tslint:disable-next-line: deprecation
filter(event => event.keyCode === ESCAPE), |
@pgkehle, the second warning is about an update of cdk a11y API. Originally there was a The basic difference is that the deprecated one received a boolean as its second parameter: create(element: HTMLElement, deferCaptureElements: boolean = false): ConfigurableFocusTrap {
...
} The new /**
* Creates a focus-trapped region around the given element.
* @param element The element around which focus will be trapped.
* @param config The focus trap configuration.
* @returns The created focus trap instance.
*/
create(element: HTMLElement, config?: ConfigurableFocusTrapConfig): ConfigurableFocusTrap; As you can see, the second argument is optional, and, internally, its default value is We are not using the second parameter and, in cdk code, its default value is still false for the deferring thing: popover/src/lib/popover/popover.component.ts Line 398 in 35a99eb
By switching |
What do you thinking we should do now? Should we wait for @henrahmagix to fix all of the issues in this single PR? Or, as an alternative, he could just fix the rebasing and the |
I think you're referring to the IDE's warnings (I didn't get this warning on the command line and I think it's just something related to "angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableIvy": false <= added
}, npm run build (with Ivy):npm run build (w/o Ivy):npm run build:demonpm run demonpm run test:once |
@julianobrasil Yes, I was referring to the IDE warnings in vs-code. If it is related just to the IDE, which it seems you just proved, then while it would be nice to find a solution for vs-code, it's not something we need to worry about. Thanks for all of that digging. I'd agree that we should get this PR merged then do a smaller follow up for the bugs, like you suggested. While @willshowell and I were trying to keep this on the major change revision, it's just going to have to be a major release for this project. @henrahmagix Can you please submit the change to using |
Obsoleted by #185 |
Followed official upgrade instructions https://update.angular.io/#8.0:9.0l3 and did a bit of pruning