From 58f2060233be4f9c153875e7ffa5bbac01033b3b Mon Sep 17 00:00:00 2001 From: Roma Date: Mon, 8 Sep 2025 16:14:06 +0300 Subject: [PATCH 01/28] fix(metadata-step): Made Publication DOI field optional --- .../metadata-step.component.html | 33 ++++++++----------- .../metadata-step/metadata-step.component.ts | 4 +-- .../review-step/review-step.component.html | 14 ++++---- src/assets/i18n/en.json | 2 +- 4 files changed, 25 insertions(+), 28 deletions(-) diff --git a/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.html b/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.html index e5a5af081..4e1480156 100644 --- a/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.html +++ b/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.html @@ -22,25 +22,6 @@

{{ 'shared.license.title' | translate }}

/> - -
-

{{ 'preprints.preprintStepper.metadata.publicationDoi.title' | translate }}

- - - @let doiControl = metadataForm.controls['doi']; - @if (doiControl.errors?.['required'] && (doiControl.touched || doiControl.dirty)) { - - {{ INPUT_VALIDATION_MESSAGES.required | translate }} - - } - @if (doiControl.errors?.['pattern'] && (doiControl.touched || doiControl.dirty)) { - {{ 'preprints.preprintStepper.metadata.publicationDoi.patternError' | translate }} - - } -
-
-
@@ -59,6 +40,20 @@

{{ 'preprints.preprintStepper.metadata.tagsTitle' | translate }}

+ +
+

{{ 'preprints.preprintStepper.metadata.publicationDoi.title' | translate }}

+ + + @let doiControl = metadataForm.controls['doi']; + @if (doiControl.errors?.['pattern'] && (doiControl.touched || doiControl.dirty)) { + {{ 'preprints.preprintStepper.metadata.publicationDoi.patternError' | translate }} + + } +
+
+

{{ 'preprints.preprintStepper.metadata.publicationDateTitle' | translate }}

diff --git a/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.ts b/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.ts index 091eed446..fc32f7f40 100644 --- a/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.ts +++ b/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.ts @@ -21,7 +21,7 @@ import { SaveLicense, UpdatePreprint, } from '@osf/features/preprints/store/preprint-stepper'; -import { CustomValidators, findChangedFields } from '@osf/shared/helpers'; +import { findChangedFields } from '@osf/shared/helpers'; import { IconComponent, LicenseComponent, TagsInputComponent, TextInputComponent } from '@shared/components'; import { INPUT_VALIDATION_MESSAGES } from '@shared/constants'; import { License, LicenseOptions } from '@shared/models'; @@ -87,7 +87,7 @@ export class MetadataStepComponent implements OnInit { this.metadataForm = new FormGroup({ doi: new FormControl(this.createdPreprint()?.doi || null, { nonNullable: true, - validators: [CustomValidators.requiredTrimmed(), Validators.pattern(this.inputLimits.doi.pattern)], + validators: [Validators.pattern(this.inputLimits.doi.pattern)], }), originalPublicationDate: new FormControl(publicationDate ? new Date(publicationDate) : null, { nonNullable: false, diff --git a/src/app/features/preprints/components/stepper/review-step/review-step.component.html b/src/app/features/preprints/components/stepper/review-step/review-step.component.html index 63e7994a6..ec32ef5e8 100644 --- a/src/app/features/preprints/components/stepper/review-step/review-step.component.html +++ b/src/app/features/preprints/components/stepper/review-step/review-step.component.html @@ -87,13 +87,15 @@

{{ 'preprints.preprintStepper.review.sections.metadata.license' | translate -
-

{{ 'preprints.preprintStepper.review.sections.metadata.publicationDoi' | translate }}

+ @if (preprint()?.articleDoiLink) { +
+

{{ 'preprints.preprintStepper.review.sections.metadata.publicationDoi' | translate }}

- - {{ preprint()?.articleDoiLink }} - -
+ + {{ preprint()?.articleDoiLink }} + +
+ }

{{ 'preprints.preprintStepper.review.sections.metadata.subjects' | translate }}

diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index a6e08287f..80461ac17 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -1943,7 +1943,7 @@ "metadata": { "title": "Metadata", "publicationDoi": { - "title": "Publication DOI", + "title": "Publication DOI (optional)", "patternError": "Please use a valid DOI format (10.xxxx/xxxxx)" }, "tagsTitle": "Tags (optional)", From c5fdf2eafe3bccd671e44a3d62837d7a178937bb Mon Sep 17 00:00:00 2001 From: Roma Date: Mon, 8 Sep 2025 16:17:36 +0300 Subject: [PATCH 02/28] fix(preprints-landing): Contact Us button titlecased, Show example button link fixed --- .../preprint-provider-hero.component.html | 2 +- .../preprints/pages/landing/preprints-landing.component.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/features/preprints/components/preprint-provider-hero/preprint-provider-hero.component.html b/src/app/features/preprints/components/preprint-provider-hero/preprint-provider-hero.component.html index 84fb74913..f21f7c0d3 100644 --- a/src/app/features/preprints/components/preprint-provider-hero/preprint-provider-hero.component.html +++ b/src/app/features/preprints/components/preprint-provider-hero/preprint-provider-hero.component.html @@ -55,7 +55,7 @@

{{ preprintProvider()!.name }}

} @else if (preprintProvider()?.examplePreprintId) {

- {{ 'preprints.showExample' | translate }}

diff --git a/src/app/features/preprints/pages/landing/preprints-landing.component.html b/src/app/features/preprints/pages/landing/preprints-landing.component.html index 854e2340d..9170bd825 100644 --- a/src/app/features/preprints/pages/landing/preprints-landing.component.html +++ b/src/app/features/preprints/pages/landing/preprints-landing.component.html @@ -40,7 +40,7 @@

{{ 'preprints.title' | translate }}

} @else if (osfPreprintProvider()!.examplePreprintId) { {{ 'preprints.showExample' | translate }} } @@ -79,6 +79,6 @@

{{ 'preprints.createServer.title' | translate }}

- {{ 'preprints.createServer.contactUs' | translate }} + {{ 'preprints.createServer.contactUs' | translate | titlecase }}
From a78ae94eeddd3af00c8802ddcb99f2553731fd78 Mon Sep 17 00:00:00 2001 From: Roma Date: Mon, 8 Sep 2025 16:36:25 +0300 Subject: [PATCH 03/28] fix(create-new-version): Handled back button --- .../create-new-version/create-new-version.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/features/preprints/pages/create-new-version/create-new-version.component.ts b/src/app/features/preprints/pages/create-new-version/create-new-version.component.ts index e2b63289a..c56f1c596 100644 --- a/src/app/features/preprints/pages/create-new-version/create-new-version.component.ts +++ b/src/app/features/preprints/pages/create-new-version/create-new-version.component.ts @@ -18,7 +18,7 @@ import { signal, } from '@angular/core'; import { toSignal } from '@angular/core/rxjs-interop'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { FileStepComponent, ReviewStepComponent } from '@osf/features/preprints/components'; import { createNewVersionStepsConst } from '@osf/features/preprints/constants'; @@ -45,7 +45,8 @@ import { BrandService } from '@shared/services'; export class CreateNewVersionComponent implements OnInit, OnDestroy, CanDeactivateComponent { @HostBinding('class') classes = 'flex-1 flex flex-column w-full'; - private readonly route = inject(ActivatedRoute); + private route = inject(ActivatedRoute); + private router = inject(Router); private providerId = toSignal(this.route.params.pipe(map((params) => params['providerId'])) ?? of(undefined)); private preprintId = toSignal(this.route.params.pipe(map((params) => params['preprintId'])) ?? of(undefined)); @@ -114,7 +115,8 @@ export class CreateNewVersionComponent implements OnInit, OnDestroy, CanDeactiva } moveToPreviousStep() { - this.currentStep.set(this.newVersionSteps[this.currentStep()?.index - 1]); + const id = this.preprintId().split('_')[0]; + this.router.navigate([id]); } @HostListener('window:beforeunload', ['$event']) From 841f490b1a1029156b202e7f063b1a5c30d149a7 Mon Sep 17 00:00:00 2001 From: Roma Date: Mon, 8 Sep 2025 17:07:15 +0300 Subject: [PATCH 04/28] fix(preprint-moderation): Fixed sorting for submissions --- .../moderation/enums/preprint-submissions-sort.enum.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/features/moderation/enums/preprint-submissions-sort.enum.ts b/src/app/features/moderation/enums/preprint-submissions-sort.enum.ts index ca1f886f1..dbf6c5633 100644 --- a/src/app/features/moderation/enums/preprint-submissions-sort.enum.ts +++ b/src/app/features/moderation/enums/preprint-submissions-sort.enum.ts @@ -1,6 +1,6 @@ export enum PreprintSubmissionsSort { TitleAZ = 'title', TitleZA = '-title', - Oldest = 'date_last_transitioned', - Newest = '-date_last_transitioned', + Oldest = '-date_last_transitioned', + Newest = 'date_last_transitioned', } From a9d43ffb8c9fd1f1f2d51ef8dd70951b808fa3e2 Mon Sep 17 00:00:00 2001 From: Roma Date: Mon, 8 Sep 2025 17:13:49 +0300 Subject: [PATCH 05/28] fix(license-component): Clearing all fields on cancel button click --- src/app/shared/components/license/license.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/components/license/license.component.ts b/src/app/shared/components/license/license.component.ts index 0485c5c78..d7d58a099 100644 --- a/src/app/shared/components/license/license.component.ts +++ b/src/app/shared/components/license/license.component.ts @@ -112,7 +112,7 @@ export class LicenseComponent { cancel() { this.licenseForm.reset({ - year: this.currentYear.getFullYear().toString(), + year: '', copyrightHolders: '', }); } From aceedbb80ec1afaabf1cb592b4980a7db2529e56 Mon Sep 17 00:00:00 2001 From: Roma Date: Tue, 9 Sep 2025 12:51:26 +0300 Subject: [PATCH 06/28] fix(preprint-stepper): Fixed add-project-form --- .../general-information/general-information.component.html | 2 +- src/app/features/preprints/preprints.routes.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/features/preprints/components/preprint-details/general-information/general-information.component.html b/src/app/features/preprints/components/preprint-details/general-information/general-information.component.html index acc12f774..673cdd165 100644 --- a/src/app/features/preprints/components/preprint-details/general-information/general-information.component.html +++ b/src/app/features/preprints/components/preprint-details/general-information/general-information.component.html @@ -14,7 +14,7 @@

{{ 'preprints.preprintStepper.common.labels.abstract' | translate }}

@if (preprintValue.nodeId) {

{{ 'preprints.details.supplementalMaterials' | translate }}

- + {{ nodeLink() }} diff --git a/src/app/features/preprints/preprints.routes.ts b/src/app/features/preprints/preprints.routes.ts index 9fbf1ae23..4fb081229 100644 --- a/src/app/features/preprints/preprints.routes.ts +++ b/src/app/features/preprints/preprints.routes.ts @@ -8,7 +8,7 @@ import { PreprintState } from '@osf/features/preprints/store/preprint'; import { PreprintProvidersState } from '@osf/features/preprints/store/preprint-providers'; import { PreprintStepperState } from '@osf/features/preprints/store/preprint-stepper'; import { ConfirmLeavingGuard } from '@shared/guards'; -import { CitationsState, ContributorsState, SubjectsState } from '@shared/stores'; +import { CitationsState, ContributorsState, ProjectsState, SubjectsState } from '@shared/stores'; import { PreprintModerationState } from '../moderation/store/preprint-moderation'; @@ -62,6 +62,7 @@ export const preprintsRoutes: Routes = [ (c) => c.SubmitPreprintStepperComponent ), canDeactivate: [ConfirmLeavingGuard], + providers: [provideStates([ProjectsState])], }, { path: ':providerId/edit/:preprintId', @@ -71,6 +72,7 @@ export const preprintsRoutes: Routes = [ (c) => c.UpdatePreprintStepperComponent ), canDeactivate: [ConfirmLeavingGuard], + providers: [provideStates([ProjectsState])], }, { path: ':providerId/moderation', From 3a57685f5eb773de2b8cccf21e7b8bdfee4abeef Mon Sep 17 00:00:00 2001 From: Roma Date: Thu, 11 Sep 2025 16:26:55 +0300 Subject: [PATCH 07/28] fix(preprint-title): Increased title maxLength to 512 chars --- src/app/features/preprints/constants/form-input-limits.const.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/features/preprints/constants/form-input-limits.const.ts b/src/app/features/preprints/constants/form-input-limits.const.ts index 2fb0de2d2..abee2a74d 100644 --- a/src/app/features/preprints/constants/form-input-limits.const.ts +++ b/src/app/features/preprints/constants/form-input-limits.const.ts @@ -4,7 +4,7 @@ export const formInputLimits = { maxLength: 3000, }, title: { - maxLength: 100, + maxLength: 512, }, doi: { pattern: /^10\.\d{4}\/[\s\S]{2,500}$/, From 08d3e3c4a1b19d6e3215e710dd9e974b6e8d4b92 Mon Sep 17 00:00:00 2001 From: Roma Date: Thu, 11 Sep 2025 16:41:18 +0300 Subject: [PATCH 08/28] fix(preprint-details): Fixed date format for download prev version dropdown --- .../preprint-file-section/preprint-file-section.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.ts b/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.ts index a29ee1b89..53d377d12 100644 --- a/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.ts +++ b/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.ts @@ -54,7 +54,7 @@ export class PreprintFileSectionComponent { return fileVersions.map((version, index) => ({ label: this.translateService.instant('preprints.details.file.downloadVersion', { version: ++index, - date: this.datePipe.transform(version.dateCreated, 'mm/dd/yyyy hh:mm:ss'), + date: this.datePipe.transform(version.dateCreated, 'MM/dd/yyyy hh:mm:ss'), }), url: version.downloadLink, })); From 1428375e29ad84ab281b496719db8deac6902450 Mon Sep 17 00:00:00 2001 From: Roma Date: Thu, 11 Sep 2025 16:49:40 +0300 Subject: [PATCH 09/28] fix(preprint-details): Fixed created and last edited dates value --- .../preprint-file-section.component.html | 6 +++--- .../preprint-file-section.component.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.html b/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.html index fc9183d87..d42a94e53 100644 --- a/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.html +++ b/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.html @@ -41,15 +41,15 @@ } @if (file()) { - @let fileValue = file()!; + @let preprintValue = preprint()!;
- {{ dateLabel() | translate }}: {{ fileValue.dateCreated | date: 'longDate' }} + {{ dateLabel() | translate }}: {{ preprintValue.dateCreated | date: 'longDate' }} @if (isMedium() || isLarge()) { | } - {{ 'preprints.details.file.lastEdited' | translate }} : {{ fileValue.dateModified | date: 'longDate' }} + {{ 'preprints.details.file.lastEdited' | translate }} : {{ preprintValue.dateModified | date: 'longDate' }}
} diff --git a/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.ts b/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.ts index 53d377d12..702373655 100644 --- a/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.ts +++ b/src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.ts @@ -34,6 +34,7 @@ export class PreprintFileSectionComponent { isMedium = toSignal(inject(IS_MEDIUM)); isLarge = toSignal(inject(IS_LARGE)); + preprint = select(PreprintSelectors.getPreprint); file = select(PreprintSelectors.getPreprintFile); isFileLoading = select(PreprintSelectors.isPreprintFileLoading); safeLink = computed(() => { From 6fc3e45806c2d7bb3e562dbfd977337a12a4c72e Mon Sep 17 00:00:00 2001 From: Roma Date: Thu, 11 Sep 2025 17:45:39 +0300 Subject: [PATCH 10/28] fix(preprint-links): Made institution and license help guide links open in a new tab --- .../stepper/metadata-step/metadata-step.component.html | 5 +++-- .../affiliated-institutions-view.component.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.html b/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.html index 552394153..7bbba2f5b 100644 --- a/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.html +++ b/src/app/features/preprints/components/stepper/metadata-step/metadata-step.component.html @@ -10,8 +10,9 @@

{{ 'shared.license.title' | translate }}

{{ 'shared.license.description' | translate }}

{{ 'shared.license.helpText' | translate }} - {{ 'common.links.helpGuide' | translate }}. + + {{ 'common.links.helpGuide' | translate }}. +

{{ 'project.overview.metadata.affiliatedInstitutions' | translate }}

@if (institutions().length) { @for (institution of institutions(); track institution.id) { - + institution logo } From e9cdbc29bcb6100f481e83a4f28e262f7daf53b8 Mon Sep 17 00:00:00 2001 From: Roma Date: Thu, 11 Sep 2025 17:50:48 +0300 Subject: [PATCH 11/28] fix(affiliated-institutions): Added tooltip containing institution name --- .../affiliated-institutions-view.component.html | 8 +++++++- .../affiliated-institutions-view.component.ts | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/shared/components/affiliated-institutions-view/affiliated-institutions-view.component.html b/src/app/shared/components/affiliated-institutions-view/affiliated-institutions-view.component.html index 274b66e19..17e3d9e01 100644 --- a/src/app/shared/components/affiliated-institutions-view/affiliated-institutions-view.component.html +++ b/src/app/shared/components/affiliated-institutions-view/affiliated-institutions-view.component.html @@ -6,7 +6,13 @@

{{ 'project.overview.metadata.affiliatedInstitutions' | translate }}

@if (institutions().length) { @for (institution of institutions(); track institution.id) { - + institution logo } diff --git a/src/app/shared/components/affiliated-institutions-view/affiliated-institutions-view.component.ts b/src/app/shared/components/affiliated-institutions-view/affiliated-institutions-view.component.ts index d8aaead15..3c60e7802 100644 --- a/src/app/shared/components/affiliated-institutions-view/affiliated-institutions-view.component.ts +++ b/src/app/shared/components/affiliated-institutions-view/affiliated-institutions-view.component.ts @@ -1,5 +1,7 @@ import { TranslatePipe } from '@ngx-translate/core'; +import { Tooltip } from 'primeng/tooltip'; + import { ChangeDetectionStrategy, Component, input } from '@angular/core'; import { RouterLink } from '@angular/router'; @@ -7,7 +9,7 @@ import { Institution } from '@shared/models'; @Component({ selector: 'osf-affiliated-institutions-view', - imports: [TranslatePipe, RouterLink], + imports: [TranslatePipe, RouterLink, Tooltip], templateUrl: './affiliated-institutions-view.component.html', styleUrl: './affiliated-institutions-view.component.scss', changeDetection: ChangeDetectionStrategy.OnPush, From a66b7c77faff2585eb2ed70c7b8d9eda69fdd3a8 Mon Sep 17 00:00:00 2001 From: Roma Date: Thu, 11 Sep 2025 18:17:18 +0300 Subject: [PATCH 12/28] fix(file-step): Fixed label --- .../components/stepper/file-step/file-step.component.html | 5 +++-- .../stepper/review-step/review-step.component.html | 1 + .../title-and-abstract-step.component.html | 2 ++ src/assets/i18n/en.json | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/features/preprints/components/stepper/file-step/file-step.component.html b/src/app/features/preprints/components/stepper/file-step/file-step.component.html index 2b6b6a399..a0117d16d 100644 --- a/src/app/features/preprints/components/stepper/file-step/file-step.component.html +++ b/src/app/features/preprints/components/stepper/file-step/file-step.component.html @@ -25,12 +25,13 @@

{{ 'preprints.preprintStepper.file.title' | translate }}

(onClick)="selectFileSource(PreprintFileSource.Computer)" /> {{ 'preprints.preprintStepper.file.title' | translate }}
-

{{ file.name }}

+

{{ file.name }}

{{ 'preprints.preprintStepper.review.sections.supplements.title' | translate [disabled]="isPreprintSubmitting()" /> {{ 'preprints.preprintStepper.titleAndAbstract.title' | translate }}