Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
58f2060
fix(metadata-step): Made Publication DOI field optional
rrromchIk Sep 8, 2025
c5fdf2e
fix(preprints-landing): Contact Us button titlecased, Show example bu…
rrromchIk Sep 8, 2025
a78ae94
fix(create-new-version): Handled back button
rrromchIk Sep 8, 2025
841f490
fix(preprint-moderation): Fixed sorting for submissions
rrromchIk Sep 8, 2025
a9d43ff
fix(license-component): Clearing all fields on cancel button click
rrromchIk Sep 8, 2025
73d231f
Merge branch 'main' into fix/preprints-bugs
rrromchIk Sep 8, 2025
30d7c69
Merge branch 'main' into fix/preprints-bugs
rrromchIk Sep 9, 2025
aceedbb
fix(preprint-stepper): Fixed add-project-form
rrromchIk Sep 9, 2025
684a183
Merge branch 'refs/heads/main' into fix/preprints-bugs
rrromchIk Sep 11, 2025
3a57685
fix(preprint-title): Increased title maxLength to 512 chars
rrromchIk Sep 11, 2025
08d3e3c
fix(preprint-details): Fixed date format for download prev version dr…
rrromchIk Sep 11, 2025
1428375
fix(preprint-details): Fixed created and last edited dates value
rrromchIk Sep 11, 2025
6fc3e45
fix(preprint-links): Made institution and license help guide links op…
rrromchIk Sep 11, 2025
e9cdbc2
fix(affiliated-institutions): Added tooltip containing institution name
rrromchIk Sep 11, 2025
a66b7c7
fix(file-step): Fixed label
rrromchIk Sep 11, 2025
5a18d6b
fix(affiliated-institution-select): Fixed description links
rrromchIk Sep 11, 2025
b1dcbd3
fix(preprint-contributors): Fixed contributors links
rrromchIk Sep 11, 2025
2503643
Merge branch 'main' into fix/preprints-bugs
rrromchIk Sep 11, 2025
af24348
fix(preprint-user-permissions): Only admin contributor can edit autho…
rrromchIk Sep 11, 2025
fff5a86
fix(contributors-list): Implemented permissions for managing contribu…
rrromchIk Sep 11, 2025
8c12f47
Merge branch 'main' into fix/preprints-bugs
rrromchIk Sep 12, 2025
4045d77
fix(search): Fixed small bug regarding search
rrromchIk Sep 12, 2025
3c4ebd8
Merge branch 'main' into fix/preprints-bugs
rrromchIk Sep 12, 2025
fd3815e
fix(contributors): Fixed PR comments
rrromchIk Sep 12, 2025
4b6f299
fix(preprint-file-section): Fixed version number for file
rrromchIk Sep 12, 2025
b6a9578
fix(preprint-file-section): Added cancel button to reset file source …
rrromchIk Sep 12, 2025
186d6a7
fix(preprint-file-section): Added file section for edit and resubmit …
rrromchIk Sep 12, 2025
3d682f4
fix(preprint-moderation): Improved sorting order
rrromchIk Sep 12, 2025
044eb5a
Merge branch 'refs/heads/main' into fix/preprints-bugs
rrromchIk Sep 12, 2025
c99c569
Merge branch 'main' into fix/preprints-bugs
rrromchIk Sep 16, 2025
fb3ec80
Merge branch 'refs/heads/main' into fix/preprints-bugs
rrromchIk Sep 17, 2025
4af696e
fix(supplements-step): Fixed labels for buttons
rrromchIk Sep 17, 2025
4d9ff3e
fix(preprint-provider-brand): Fixed parsing brand
rrromchIk Sep 17, 2025
91b40bf
Merge branch 'refs/heads/main' into fix/preprints-bugs
rrromchIk Sep 17, 2025
925949e
fix(institution-dashboard): Limited contributors to top 2
rrromchIk Sep 17, 2025
b88efc4
fix(supplements-step): Removed unused import
rrromchIk Sep 17, 2025
aa5f655
fix(comments): Fixed PR comments
rrromchIk Sep 17, 2025
1a94c16
fix(affiliated-institutions): Fixed description for metadata step
rrromchIk Sep 17, 2025
dad82d3
Merge branch 'refs/heads/main' into fix/preprints-bugs
rrromchIk Sep 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ export function mapCreators(project: ResourceModel, currentInstitutionId: string
text: `${name} (${role})`,
url: creator.absoluteUrl,
};
});
})
?.slice(0, 2);
}
Original file line number Diff line number Diff line change
@@ -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',
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>{{ 'preprints.preprintStepper.supplements.title' | translate }}</h2>
}"
class="supplement-option-button w-full"
styleClass="w-full"
[label]="'preprints.preprintStepper.supplements.options.connectExisting' | translate | titlecase"
[label]="'preprints.preprintStepper.supplements.options.connectExisting' | translate"
severity="secondary"
(click)="selectSupplementOption(SupplementOptions.ConnectExistingProject)"
/>
Expand All @@ -23,7 +23,7 @@ <h2>{{ 'preprints.preprintStepper.supplements.title' | translate }}</h2>
}"
class="supplement-option-button w-full"
styleClass="w-full"
[label]="'preprints.preprintStepper.supplements.options.createNew' | translate | titlecase"
[label]="'preprints.preprintStepper.supplements.options.createNew' | translate"
severity="secondary"
(click)="selectSupplementOption(SupplementOptions.CreateNewProject)"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Skeleton } from 'primeng/skeleton';

import { debounceTime, distinctUntilChanged, map } from 'rxjs';

import { NgClass, TitleCasePipe } from '@angular/common';
import { NgClass } from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
Expand Down Expand Up @@ -43,17 +43,7 @@ import { CustomConfirmationService, ToastService } from '@shared/services';

@Component({
selector: 'osf-supplements-step',
imports: [
Button,
TitleCasePipe,
NgClass,
Card,
Select,
AddProjectFormComponent,
ReactiveFormsModule,
Skeleton,
TranslatePipe,
],
imports: [Button, NgClass, Card, Select, AddProjectFormComponent, ReactiveFormsModule, Skeleton, TranslatePipe],
templateUrl: './supplements-step.component.html',
styleUrl: './supplements-step.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
35 changes: 23 additions & 12 deletions src/app/features/preprints/mappers/preprint-providers.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import {
PreprintProviderDetailsJsonApi,
PreprintProviderShortInfo,
} from '@osf/features/preprints/models';
import { SubjectDataJsonApi, SubjectModel } from '@shared/models';
import { Brand, BrandDataJsonApi, SubjectDataJsonApi, SubjectModel } from '@shared/models';

export class PreprintProvidersMapper {
static fromPreprintProviderDetailsGetResponse(response: PreprintProviderDetailsJsonApi): PreprintProviderDetails {
const brandRaw = response.embeds!.brand.data;
const brandRaw = response.embeds!.brand?.data;
return {
id: response.id,
name: response.attributes.name,
Expand All @@ -20,16 +20,7 @@ export class PreprintProvidersMapper {
allowSubmissions: response.attributes.allow_submissions,
assertionsEnabled: response.attributes.assertions_enabled,
permissions: response.attributes.permissions,
brand: {
id: brandRaw.id,
name: brandRaw.attributes.name,
heroLogoImageUrl: brandRaw.attributes.hero_logo_image,
heroBackgroundImageUrl: brandRaw.attributes.hero_background_image,
topNavLogoImageUrl: brandRaw.attributes.topnav_logo_image,
primaryColor: brandRaw.attributes.primary_color,
secondaryColor: brandRaw.attributes.secondary_color,
backgroundColor: brandRaw.attributes.background_color,
},
brand: PreprintProvidersMapper.parseBrand(brandRaw),
iri: response.links.iri,
faviconUrl: response.attributes.assets?.favicon,
squareColorNoTransparentImageUrl: response.attributes.assets?.square_color_no_transparent,
Expand All @@ -40,6 +31,26 @@ export class PreprintProvidersMapper {
};
}

static parseBrand(brandRaw: BrandDataJsonApi): Brand {
if (!brandRaw) {
return {
primaryColor: 'var(--osf-provider-primary-color)',
secondaryColor: 'var(--osf-provider-secondary-color)',
} as Brand;
}

return {
id: brandRaw.id,
name: brandRaw.attributes.name,
heroLogoImageUrl: brandRaw.attributes.hero_logo_image,
heroBackgroundImageUrl: brandRaw.attributes.hero_background_image,
topNavLogoImageUrl: brandRaw.attributes.topnav_logo_image,
primaryColor: brandRaw.attributes.primary_color,
secondaryColor: brandRaw.attributes.secondary_color,
backgroundColor: brandRaw.attributes.background_color,
};
}

static toPreprintProviderShortInfoFromGetResponse(
response: PreprintProviderDetailsJsonApi[]
): PreprintProviderShortInfo[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,6 @@ export class ReusableFilterComponent {
return filter.isLoading || false;
}

isFilterPaginationLoading(filter: DiscoverableFilter): boolean {
return filter.isPaginationLoading || false;
}

isFilterSearchLoading(filter: DiscoverableFilter): boolean {
return filter.isSearchLoading || false;
}

getSelectedValue(filterKey: string): string | null {
return this.selectedValues()[filterKey] || null;
}
Expand Down
6 changes: 3 additions & 3 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,7 @@
"publicationDateTitle": "Publication Date (optional)",
"publicationCitationTitle": "Publication Citation (optional)",
"affiliatedInstitutionsTitle": "Affiliated Institutions",
"affiliatedInstitutionsDescription": "You can affiliate your {{preprintWord}} with your institution if it is an OSF institutional member and has worked with the <a class='font-bold' href='https://www.cos.io/products/osf-institutions' target='_blank'>Center for Open Science</a> to create a dedicated <a class='font-bold' href='https://help.osf.io/article/191-view-institutional-landing-pages' target='_blank'>institutional OSF landing page</a>."
"affiliatedInstitutionsDescription": "You can affiliate your {{preprintWord}} with your institution if it is an <a class='font-bold' href='https://www.cos.io/products/osf-institutions' target='_blank'>OSF institutional member</a> and has worked with the Center for Open Science to create a dedicated <a class='font-bold' href='https://help.osf.io/article/191-view-institutional-landing-pages' target='_blank'>institutional OSF landing page</a>."
},
"authorAssertions": {
"title": "Author Assertions",
Expand All @@ -2063,8 +2063,8 @@
"title": "Supplements (optional)",
"description": "Connect an OSF project to share data, code, protocols, or other supplemental materials.",
"options": {
"connectExisting": "Connect an existing OSF project",
"createNew": "Create a new OSF project"
"connectExisting": "Connect An Existing OSF Project",
"createNew": "Create A New OSF Project"
},
"projectSelection": {
"title": "Select Project",
Expand Down
7 changes: 5 additions & 2 deletions src/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ $white-60: var(--white-60);
// Opacity Colors
--white-60: rgba(256, 256, 256, 0.6);

--osf-provider-primary-color: #f5fafd;
--osf-provider-secondary-color: #204762;

// Gradients
--gradient-1:
linear-gradient(
Expand Down Expand Up @@ -167,8 +170,8 @@ $white-60: var(--white-60);
--header-background-color: none;
--header-background-image-url: none;

--branding-primary-color: var(--pr-blue-1);
--branding-secondary-color: var(--white);
--branding-primary-color: var(--osf-provider-primary-color);
--branding-secondary-color: var(--osf-provider-secondary-color);
--branding-background-color: var(--white);
--branding-hero-logo-image-url: none;
--branding-hero-background-image-url: none;
Expand Down
Loading