Skip to content

Upgrade angular 7#547

Merged
artlowel merged 26 commits intoDSpace:masterfrom
4Science:upgrade-angular-7
Jan 14, 2020
Merged

Upgrade angular 7#547
artlowel merged 26 commits intoDSpace:masterfrom
4Science:upgrade-angular-7

Conversation

@atarix83
Copy link
Contributor

This PR provides upgrade to angular 7.

Tests run successful and all seem to work fine.

I removed the webpack's resolve-url-loader from dependencies because it doesn't work but everything else seems to work the same.

atarix83 and others added 17 commits December 17, 2019 13:05
…ular-7

# Conflicts:
#	src/app/core/services/route.service.ts
#	src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
#	src/app/shared/form/builder/form-builder.service.ts
#	src/app/shared/object-list/object-list.component.spec.ts
#	src/app/submission/submission.service.ts
@tdonohue tdonohue added this to the 7.0beta1 milestone Jan 6, 2020
@tdonohue tdonohue mentioned this pull request Jan 6, 2020
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atarix83 : Thanks for this! I gave this a quick code review today, and it mostly looks fine to me. There's one new method which is added that needs TypeDocs & tests (and this method is pointed out by Coveralls in the coverage drop, so it may be a small part of the issue here).

That said, currently this PR fails to run with AoT compilation (yarn start). It looks like it may just be a minor issue, but here's the error I see:

    ERROR in build/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.spec.ts(116,7): error TS2554: Expected 0-1 arguments, but got 2.
    build/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.spec.ts(140,7): error TS2554: Expected 0-1 arguments, but got 2.
    build/app/shared/object-list/selectable-list/selectable-list.service.spec.ts(53,41): error TS2345: Argument of type 'Store<SelectableListsState>'
is not assignable to parameter of type 'Store<AppState>'.
      Type 'SelectableListsState' is not assignable to type 'AppState'.
        Property 'router' is missing in type 'SelectableListsState'.

It does run if you use yarn run watch (and testing it out it seems to work fine). The above error only occurs when using yarn start.

…ular-7

# Conflicts:
#	src/app/+collection-page/collection-form/collection-form.component.ts
#	src/app/+community-page/community-form/community-form.component.ts
#	src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts
@tdonohue
Copy link
Member

tdonohue commented Jan 8, 2020

@atarix83 : I retested this today, and based on your latest changes the AoT compilation now succeeds! So, thanks for those updates!

I think this is looking good, but I would like to see if we can add tests to the new function I mentioned above -- this new function is specifically called out by the Coveralls report as having a big impact on code coverage. I suspect if you added some tests for it, we might get the coverage to increase slightly (maybe get us closer to 78% or 79% again). Beyond that, I'd personally like to see this effort merged soon, as the next step will be to also upgrade us to Angular 8.

Copy link
Member

@artlowel artlowel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @atarix83

It works, and the changes look good apart from a few minor questions I had about the changes to the store state types, and @tdonohue's comments.

Could you also try to merge #553 to see if it doesn't cause any issues with this PR?

@atarix83
Copy link
Contributor Author

@artlowel I should resolve your reported issue
@tdonohue I've added tests for menuKeySelector and SidebarFilterService but coverage is stiil decreased

Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks for the updates, @atarix83 . I gave this some more testing today, and I'm not noticing any obvious issues with the UI after the upgrade. I also don't see any obvious reasons why the code coverage has dropped so significantly. So, in order to move this forward (and unblock the Angular 8 upgrade), I'm OK with merging this as-is. Thanks again!

Copy link
Member

@artlowel artlowel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @atarix83!

@artlowel artlowel merged commit 6e928ee into DSpace:master Jan 14, 2020
@atarix83 atarix83 deleted the upgrade-angular-7 branch January 15, 2020 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants