-
Notifications
You must be signed in to change notification settings - Fork 433
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 to angular 16 #2871
Upgrade to angular 16 #2871
Conversation
…BrowserModule import
…ement.setAttribute error)
DURACOM-238 update ng2 file upload Approved-by: Andrea Barbasso
…ule inside form.module.ts
# Conflicts: # package.json # src/app/access-control/epeople-registry/eperson-resolver.service.ts # src/app/admin/admin-registries/bitstream-formats/bitstream-formats.resolver.ts # src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts # src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.ts # src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workspace-item/workspace-item-search-result-admin-workflow-grid-element.component.ts # src/app/app.module.ts # src/app/bitstream-page/bitstream-page.resolver.ts # src/app/bitstream-page/legacy-bitstream-url.resolver.ts # src/app/browse-by/browse-by-guard.ts # src/app/collection-page/collection-page.resolver.ts # src/app/collection-page/create-collection-page/create-collection-page.guard.ts # src/app/collection-page/edit-item-template-page/item-template-page.resolver.ts # src/app/community-page/community-page.resolver.ts # src/app/community-page/create-community-page/create-community-page.guard.ts # src/app/core/auth/auth-blocking.guard.ts # src/app/core/auth/authenticated.guard.ts # src/app/core/breadcrumbs/dso-breadcrumb.resolver.ts # src/app/core/breadcrumbs/i18n-breadcrumb.resolver.ts # src/app/core/breadcrumbs/quality-assurance-breadcrumb.resolver.ts # src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-single-feature.guard.spec.ts # src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.spec.ts # src/app/core/data/feature-authorization/feature-authorization-guard/dso-page-some-feature.guard.ts # src/app/core/data/feature-authorization/feature-authorization-guard/some-feature-authorization.guard.ts # src/app/core/end-user-agreement/abstract-end-user-agreement.guard.ts # src/app/core/feedback/feedback.guard.ts # src/app/core/reload/reload.guard.ts # src/app/core/server-check/server-check.guard.ts # src/app/core/submission/resolver/submission-object.resolver.ts # src/app/home-page/home-page.resolver.ts # src/app/init.service.ts # src/app/item-page/edit-item-page/edit-item-page.component.spec.ts # src/app/item-page/edit-item-page/edit-item-page.component.ts # src/app/item-page/item.resolver.ts # src/app/item-page/version-page/version.resolver.ts # src/app/lookup-by-id/lookup-guard.ts # src/app/menu.resolver.ts # src/app/my-dspace-page/my-dspace.guard.ts # src/app/process-page/process-breadcrumb.resolver.ts # src/app/process-page/process-page.resolver.ts # src/app/quality-assurance-notifications-pages/quality-assurance-events-page/quality-assurance-events-page.resolver.ts # src/app/quality-assurance-notifications-pages/quality-assurance-source-page-component/quality-assurance-source-data.resolver.ts # src/app/quality-assurance-notifications-pages/quality-assurance-source-page-component/quality-assurance-source-page-resolver.service.ts # src/app/quality-assurance-notifications-pages/quality-assurance-topics-page/quality-assurance-topics-page-resolver.service.ts # src/app/register-email-form/registration.resolver.ts # src/app/register-page/registration.guard.ts # src/app/request-copy/request-copy.resolver.ts # src/app/search-page/configuration-search-page.guard.ts # src/app/shared/context-help.directive.ts # src/app/shared/dso-page/dso-edit-menu.resolver.ts # src/app/shared/form/chips/chips.component.spec.ts # src/app/shared/form/chips/chips.component.ts # src/app/shared/form/form.module.ts # src/app/shared/metadata-representation/metadata-representation-loader.component.ts # src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts # src/app/shared/resource-policies/resolvers/resource-policy-target.resolver.ts # src/app/shared/resource-policies/resolvers/resource-policy.resolver.ts # src/app/shared/theme-support/themed.component.ts # src/app/shared/utils/markdown.pipe.ts # src/app/submission/sections/upload/accessConditions/submission-section-upload-access-conditions.component.ts # src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-actions-loader/advanced-workflow-actions-loader.component.ts # src/app/workflowitems-edit-page/item-from-workflow.resolver.ts # src/app/workflowitems-edit-page/workflow-item-page.resolver.ts # src/app/workspaceitems-edit-page/item-from-workspace.resolver.ts # src/app/workspaceitems-edit-page/workspace-item-page.resolver.ts # src/config/app-config.interface.ts # src/main.server.ts # src/modules/app/browser-app.module.ts # src/modules/app/browser-init.service.ts # src/modules/app/server-app.module.ts # src/modules/app/server-init.service.ts # src/ngx-translate-loaders/translate-browser.loader.ts # src/ngx-translate-loaders/translate-server.loader.ts # src/themes/custom/lazy-theme.module.ts # src/themes/dspace/lazy-theme.module.ts # yarn.lock
sorry @tdonohue the PR was not yet ready to be reviewed again. Now it should if all tests pass. @artlowel @tdonohue
|
NOTE: I think the e2e test failures are now because of CSRF issues with our Cypress test suite. Now that DSpace/DSpace#9321 is merged on the backend, I think that slightly changed the CSRF behavior (the changes were caused by Spring Security 6, not by us). This difference in behavior appears to be causing Cypress to fail whenever it tries to login. So, I think the e2e test failures here are NOT an issue with this PR as they are not reproducible in the UI. Instead it is an issue with our Cypress test suite -- I'm looking into it, but I think it can be ignored for now. If we have to we could temporarily disable the failing Cypress tests while we fix them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @atarix83!
for all the other guards whose migration would have taken too long due to the use of class inheritance (the ones which extend
SomeFeatureAuthorizationGuard
class) i've use the helper function mapToCanActivate provided by Angular. I suggest to open a follow-up task for migrating all of them to functional guards if you agree
That's fine
One more thing though: the convention is for function names to start with a lowercase letter, and class names to start with a capital letter. All resolver-functions in this PR still start with a capital letter. If you can still fix it, that would be great, or you can add it to the ticket to clean up the guards.
@atarix83 and @artlowel : I've verified that the remaining e2e test failures in this PR also exist on I'm working on a fix to these issues. The problem is that the CSRF token is not being initialized properly before the e2e tests run, which causes the e2e tests to not be able to login (i.e. all tests that require authentication are failing). The fix is to pre-initialize the CSRF token.. I'm borrowing code from #2838 (created by @artlowel 's team) and updating it to fix the issue. With these fixes, the e2e tests are working now on my end, but I'm doing some minor code cleanup & I'll create a PR for this shortly. |
@artlowel done |
Hi @atarix83, |
# Conflicts: # src/app/core/data/request.service.ts # src/modules/app/browser-app.config.ts # src/modules/app/server-app.config.ts
@tdonohue @artlowel @tdonohue |
@atarix83 I agree that refactor would be a good idea, However I wouldn't hold up this PR to do it. I'd rather do it in a small bugfix PR next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks @atarix83 ! As discussed in today's dev meeting, I'm merging this immediately. The code looks good & I've verified it's working. The only outstanding issues are the refactor you mentioned above and the potential security vulnerability reported by CodeQL. I'm going to move those both to follow-up tickets & assign to you so that they can be fixed prior to 8.0 final.
References
Description
This PR provide upgrade to angular 16
Instructions for Reviewers
List of changes in this PR:
ngx-sortablej
and replaced it by usig the angular cdk drag/drop module.markdown-it-mathjax3
. Since this was only a plugin to support the MathJax for the markdown-it library we decide to use directly the MathJax library. It's not a direct dependency but we've implemented a service for injecting the script by retrieving it from a CDN. In this way we don't need to add to the bundle a so heavy dependency.Include guidance for how to test or review your PR.
Review this PR by running the application (against sandbox rest server) to verify everything works properly as the current sandbox environment.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.