From 5ec544ffea5aadc081033c632ef7274d7b8ef4ea Mon Sep 17 00:00:00 2001 From: Ben Bosman Date: Wed, 18 Mar 2020 11:43:20 +0100 Subject: [PATCH 1/8] Moving create community to the top so "create" is not interpreted as an ID --- .../+community-page/community-page-routing.module.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/+community-page/community-page-routing.module.ts b/src/app/+community-page/community-page-routing.module.ts index 976a4ad0fe..876e85c554 100644 --- a/src/app/+community-page/community-page-routing.module.ts +++ b/src/app/+community-page/community-page-routing.module.ts @@ -33,6 +33,11 @@ const COMMUNITY_EDIT_PATH = 'edit'; @NgModule({ imports: [ RouterModule.forChild([ + { + path: COMMUNITY_CREATE_PATH, + component: CreateCommunityPageComponent, + canActivate: [AuthenticatedGuard, CreateCommunityPageGuard] + }, { path: ':id', resolve: { @@ -58,11 +63,6 @@ const COMMUNITY_EDIT_PATH = 'edit'; } ] }, - { - path: COMMUNITY_CREATE_PATH, - component: CreateCommunityPageComponent, - canActivate: [AuthenticatedGuard, CreateCommunityPageGuard] - }, ]) ], providers: [ From f49007e2f65ed51e4283c9dd9fc2cbfc3a0639bd Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Wed, 18 Mar 2020 16:12:35 +0100 Subject: [PATCH 2/8] 69920: Move collection create route on top of ID + fix non-static ViewChild --- .../+collection-page/collection-page-routing.module.ts | 10 +++++----- .../comcol-forms/comcol-form/comcol-form.component.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/+collection-page/collection-page-routing.module.ts b/src/app/+collection-page/collection-page-routing.module.ts index 61cfda0d9e..353e3ee9f2 100644 --- a/src/app/+collection-page/collection-page-routing.module.ts +++ b/src/app/+collection-page/collection-page-routing.module.ts @@ -34,6 +34,11 @@ const COLLECTION_EDIT_PATH = 'edit'; @NgModule({ imports: [ RouterModule.forChild([ + { + path: COLLECTION_CREATE_PATH, + component: CreateCollectionPageComponent, + canActivate: [AuthenticatedGuard, CreateCollectionPageGuard] + }, { path: ':id', resolve: { @@ -65,11 +70,6 @@ const COLLECTION_EDIT_PATH = 'edit'; } ] }, - { - path: COLLECTION_CREATE_PATH, - component: CreateCollectionPageComponent, - canActivate: [AuthenticatedGuard, CreateCollectionPageGuard] - }, ]) ], providers: [ diff --git a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts index 35c6f50969..f8199d2aad 100644 --- a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts +++ b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts @@ -39,7 +39,7 @@ export class ComColFormComponent implements OnInit, OnDe /** * The logo uploader component */ - @ViewChild(UploaderComponent, {static: true}) uploaderComponent: UploaderComponent; + @ViewChild(UploaderComponent, {static: false}) uploaderComponent: UploaderComponent; /** * DSpaceObject that the form represents From 0d38c75ea271400fcc30564f62cb8e2cca9070c3 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 27 Mar 2020 12:37:45 -0500 Subject: [PATCH 3/8] Initial draft PR template --- .github/pull_request_template.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..e2bb230ace --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,28 @@ +## References +_Add references/links to any related tickets or PRs. These may include:_ +* Link to [Angular issue or PR](https://github.com/DSpace/dspace-angular/issues) related to this PR, if any +* Link to [JIRA](https://jira.lyrasis.org/projects/DS/summary) ticket(s), if any + +## Description +Short summary of changes (1-2 sentences). + +## Instructions for Reviewers +Please add a more detailed description of the changes made by your PR. At a minimum, providing a bulleted list of changes in your PR is helpful to reviewers. + +List of changes in this PR: +* First, ... +* Second, ... + +**Include guidance for how to test or review your PR.** This may include: steps to reproduce a bug, screenshots or description of a new feature, or reasons behind specific changes. + +## 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!_ + +- [ ] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests). Exceptions may be made if previously agreed upon. +- [ ] My PR passes [TSLint](https://palantir.github.io/tslint/) validation using `yarn run lint` +- [ ] My PR includes [TypeDoc](https://typedoc.org/) comments for _all new (or modified) public methods and classes_. It also includes TypeDoc for large or complex private methods. +- [ ] My PR passes all specs/tests and includes new/updated specs for any bug fixes, improvements or new features. A few reminders about what constitutes good tests: + * Include tests for different user types (if behavior differs), including: (1) Anonymous user, (2) Logged in user (non-admin), and (3) Administrator. + * Include tests for error scenarios, e.g. when errors/warnings should appear (or buttons should be disabled). + * For bug fixes, include a test that reproduces the bug and proves it is fixed. For clarity, it may be useful to provide the test in a separate commit from the bug fix. +- [ ] If my PR includes new, third-party dependencies (in `package.json`), I've made sure their licenses align with the [DSpace BSD License](https://github.com/DSpace/DSpace/blob/master/LICENSE) based on the [Licensing of Contributions](https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions) documentation. From ecf8e8915f4c896a4032a51013401d68a3045cca Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 31 Mar 2020 12:00:11 -0500 Subject: [PATCH 4/8] Minor tweak based on feedback. --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e2bb230ace..682f67294b 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -18,7 +18,7 @@ List of changes in this PR: ## 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!_ -- [ ] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests). Exceptions may be made if previously agreed upon. +- [ ] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible. - [ ] My PR passes [TSLint](https://palantir.github.io/tslint/) validation using `yarn run lint` - [ ] My PR includes [TypeDoc](https://typedoc.org/) comments for _all new (or modified) public methods and classes_. It also includes TypeDoc for large or complex private methods. - [ ] My PR passes all specs/tests and includes new/updated specs for any bug fixes, improvements or new features. A few reminders about what constitutes good tests: From 59df043578bbe42d0839a0c3230c844ea10a11a2 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 31 Mar 2020 12:11:51 -0500 Subject: [PATCH 5/8] Add license terms to this codebase --- LICENSE | 39 +++++++++++++++++++++++++++++++++++++++ LICENSES_THIRD_PARTY | 13 +++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 LICENSE create mode 100644 LICENSES_THIRD_PARTY diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..b7cb98fe83 --- /dev/null +++ b/LICENSE @@ -0,0 +1,39 @@ +DSpace source code BSD License: + +Copyright (c) 2002-2020, LYRASIS. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name DuraSpace nor the name of the DSpace Foundation +nor the names of its contributors may be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + + +DSpace uses third-party libraries which may be distributed under +different licenses to the above. Information about these licenses +is detailed in the LICENSES_THIRD_PARTY file at the root of the source +tree. You must agree to the terms of these licenses, in addition to +the above DSpace source code license, in order to use this software. diff --git a/LICENSES_THIRD_PARTY b/LICENSES_THIRD_PARTY new file mode 100644 index 0000000000..c4a0236e96 --- /dev/null +++ b/LICENSES_THIRD_PARTY @@ -0,0 +1,13 @@ + +DSpace uses third-party libraries which may be distributed under different licenses. +A summary of all third-party, production dependencies used by this user interface may be found by running: + + npx license-checker --production --summary + +You must agree to the terms of these licenses, in addition to the DSpace source code license, in order to use this +software. + +PLEASE NOTE: Some third-party dependencies may be listed under multiple licenses if they are dual-licensed. +This is especially true of anything listed as GPL (or similar), as DSpace does NOT allow for the inclusion of +any dependencies that are solely released under GPL (or similar) terms. For more info see: +https://wiki.lyrasis.org/display/DSPACE/Code+Contribution+Guidelines#CodeContributionGuidelines-LicensingofContributions From 46a5a3eaca3f2d2f3d33e0d549e1c61c1b02cc52 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 31 Mar 2020 12:14:08 -0500 Subject: [PATCH 6/8] Link back to license-checker --- LICENSES_THIRD_PARTY | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LICENSES_THIRD_PARTY b/LICENSES_THIRD_PARTY index c4a0236e96..c42cc0b255 100644 --- a/LICENSES_THIRD_PARTY +++ b/LICENSES_THIRD_PARTY @@ -4,6 +4,8 @@ A summary of all third-party, production dependencies used by this user interfac npx license-checker --production --summary +(Additional license-checker options may be found in its documentation: https://github.com/davglass/license-checker) + You must agree to the terms of these licenses, in addition to the DSpace source code license, in order to use this software. From 1f984c4c40406255dfa88ecc50354c7d32ea286a Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Wed, 1 Apr 2020 13:29:25 +0200 Subject: [PATCH 7/8] 69920: Test fix --- .../comcol-forms/comcol-form/comcol-form.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.spec.ts b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.spec.ts index 06f9843c6d..454a036b15 100644 --- a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.spec.ts +++ b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.spec.ts @@ -137,7 +137,7 @@ describe('ComColFormComponent', () => { type: Community.type }, ), - uploader: {} as any, + uploader: undefined, deleteLogo: false } ); From ddc0ed63214a6816a06efe355feeb87d6be26a6c Mon Sep 17 00:00:00 2001 From: Bram Luyten Date: Thu, 2 Apr 2020 10:14:32 +0200 Subject: [PATCH 8/8] Spelling correction in a single en.json5 key --- resources/i18n/en.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/i18n/en.json5 b/resources/i18n/en.json5 index 7b814fd5bc..ec502f058f 100644 --- a/resources/i18n/en.json5 +++ b/resources/i18n/en.json5 @@ -38,7 +38,7 @@ "admin.registries.bitstream-formats.edit.extensions.label": "File extensions", - "admin.registries.bitstream-formats.edit.extensions.placeholder": "Enter a file extenstion without the dot", + "admin.registries.bitstream-formats.edit.extensions.placeholder": "Enter a file extension without the dot", "admin.registries.bitstream-formats.edit.failure.content": "An error occurred while editing the bitstream format.",