Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
26f117e
[ENG-10048] Add Registry Name to Registration Metadata (#858)
nsemets Jan 30, 2026
bf56c47
[ENG-10047] Display Affiliated Institution(s) on User Profile Page (#…
mkovalua Jan 30, 2026
cd31559
ENG-9720 | fix(addons): Fix GitLab pagination Load More button not sh…
sh-andriy Jan 30, 2026
0113de1
[ENG-9042] Each registries, preprints, and collections provider sets …
mkovalua Jan 30, 2026
4d85d51
[ENG-6719] Show Funder and Grant ID information on registries moderat…
mkovalua Jan 30, 2026
90213a3
fix(ssr-routes): removed home route due to auth (#866)
nsemets Jan 30, 2026
a2a9f35
[ENG-10148] Fix frontend state-management bug causing stale facet res…
nsemets Feb 2, 2026
91f8e0d
[ENG-10251] Standardize model file naming convention (#874)
nsemets Feb 6, 2026
ae6fc32
[ENG-10252] Add unit tests for the previously skipped tests in projec…
nsemets Feb 11, 2026
571ea01
[ENG-9157] [AOI] Add atomic ability to remove contributors from child…
nsemets Feb 13, 2026
5bb1c44
[ENG-10255] Part 1: Added unit tests for pages components in registri…
nsemets Feb 17, 2026
a13b596
[ENG-10255] Part 2: Added unit tests for pages components in registri…
nsemets Feb 17, 2026
b6e7d56
[ENG-9043] v2 (#878)
mkovalua Feb 17, 2026
2a6b2f1
[ENG-10255] Part 3: Added unit tests for pages components in registri…
nsemets Feb 17, 2026
70339af
[ENG-10042] fix(registry): moderators cannot approve registration upd…
Vlad0n20 Feb 18, 2026
d2e16b4
fix(ssr): updated config for ssr
nsemets Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 0 additions & 4 deletions src/app/app.routes.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ export const serverRoutes: ServerRoute[] = [
path: 'forgotpassword',
renderMode: RenderMode.Prerender,
},
{
path: '',
renderMode: RenderMode.Prerender,
},
{
path: 'dashboard',
renderMode: RenderMode.Client,
Expand Down
39 changes: 0 additions & 39 deletions src/app/core/animations/fade.in-out.animation.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Component: Cookie Consent Banner', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [OSFTestingModule, CookieConsentBannerComponent, MockComponent(IconComponent)],
imports: [CookieConsentBannerComponent, OSFTestingModule, MockComponent(IconComponent)],
providers: [{ provide: CookieService, useValue: cookieServiceMock }],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,20 @@ import { Message } from 'primeng/message';
import { isPlatformBrowser } from '@angular/common';
import { ChangeDetectionStrategy, Component, inject, PLATFORM_ID, signal } from '@angular/core';

import { fadeInOutAnimation } from '@core/animations/fade.in-out.animation';
import { IconComponent } from '@osf/shared/components/icon/icon.component';

/**
* Displays a cookie consent banner until the user accepts.
*
* - Uses `ngx-cookie-service` to persist acceptance across sessions.
* - Automatically hides the banner if consent is already recorded.
* - Animates in/out using the `fadeInOutAnimation`.
* - Supports translation via `TranslatePipe`.
*/
@Component({
selector: 'osf-cookie-consent-banner',
templateUrl: './cookie-consent-banner.component.html',
styleUrls: ['./cookie-consent-banner.component.scss'],
imports: [Button, TranslatePipe, IconComponent, Message],
animations: [fadeInOutAnimation],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CookieConsentBannerComponent {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
@if (maintenance() && !dismissed()) {
<p-message
class="block p-3"
styleClass="w-full"
icon="pi pi-info-circle"
[severity]="maintenance()?.severity"
[text]="maintenance()?.message"
[closable]="true"
(onClose)="dismiss()"
class="block p-3"
icon="pi pi-info-circle"
@fadeInOut
>
</p-message>
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { CookieService } from 'ngx-cookie-service';

import { MessageModule } from 'primeng/message';

import { of } from 'rxjs';

import { HttpClient } from '@angular/common/http';
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';

import { MaintenanceBannerComponent } from './maintenance-banner.component';

import { OSFTestingModule } from '@testing/osf.testing.module';

describe('Component: Maintenance Banner', () => {
let fixture: ComponentFixture<MaintenanceBannerComponent>;
let httpClient: { get: jest.Mock };
Expand All @@ -25,7 +24,7 @@ describe('Component: Maintenance Banner', () => {
httpClient = { get: jest.fn() } as any;

await TestBed.configureTestingModule({
imports: [MaintenanceBannerComponent, NoopAnimationsModule, MessageModule],
imports: [MaintenanceBannerComponent, OSFTestingModule],
providers: [
{ provide: CookieService, useValue: cookieService },
{ provide: HttpClient, useValue: httpClient },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { MessageModule } from 'primeng/message';
import { CommonModule, isPlatformBrowser } from '@angular/common';
import { ChangeDetectionStrategy, Component, inject, OnInit, PLATFORM_ID, signal } from '@angular/core';

import { fadeInOutAnimation } from '@core/animations/fade.in-out.animation';

import { MaintenanceModel } from '../models/maintenance.model';
import { MaintenanceService } from '../services/maintenance.service';

Expand All @@ -17,8 +15,6 @@ import { MaintenanceService } from '../services/maintenance.service';
* the banner. If not, it queries the maintenance status from the server and displays
* the maintenance message if one is active.
*
* The component supports animation via `fadeInOutAnimation` and is optimized with `OnPush` change detection.
*
* @example
* ```html
* <osf-maintenance-banner />
Expand All @@ -29,7 +25,6 @@ import { MaintenanceService } from '../services/maintenance.service';
imports: [CommonModule, MessageModule],
templateUrl: './maintenance-banner.component.html',
styleUrls: ['./maintenance-banner.component.scss'],
animations: [fadeInOutAnimation],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MaintenanceBannerComponent implements OnInit {
Expand Down
18 changes: 11 additions & 7 deletions src/app/core/services/osf-config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,24 @@ export class OSFConfigService {
* On the server, this is skipped as config is only needed in the browser.
*/
async load(): Promise<void> {
if (!this.config && isPlatformBrowser(this.platformId)) {
if (this.config) return;

if (isPlatformBrowser(this.platformId)) {
this.config = await lastValueFrom<ConfigModel>(
this.http.get<ConfigModel>('/assets/config/config.json').pipe(
shareReplay(1),
catchError(() => of({} as ConfigModel))
)
);
} else {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
this.config = ((globalThis as any).__SSR_CONFIG__ ?? {}) as ConfigModel;
}

// Apply every key from config to environment
for (const [key, value] of Object.entries(this.config)) {
// eslint-disable-next-line
// @ts-ignore
this.environment[key] = value;
}
for (const [key, value] of Object.entries(this.config)) {
// eslint-disable-next-line
// @ts-ignore
this.environment[key] = value;
}
}
}
2 changes: 1 addition & 1 deletion src/app/core/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { inject, Injectable } from '@angular/core';
import { ENVIRONMENT } from '@core/provider/environment.provider';
import { ProfileSettingsKey } from '@osf/shared/enums/profile-settings-key.enum';
import { UserMapper } from '@osf/shared/mappers/user';
import { UserData, UserModel } from '@osf/shared/models/user/user.model';
import { JsonApiService } from '@osf/shared/services/json-api.service';
import { ProfileSettingsUpdate } from '@shared/models/profile-settings-update.model';
import { UserData, UserModel } from '@shared/models/user/user.models';
import {
UserAcceptedTermsOfServiceJsonApi,
UserDataJsonApi,
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/store/user/user.actions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Education } from '@osf/shared/models/user/education.model';
import { Employment } from '@osf/shared/models/user/employment.model';
import { SocialModel } from '@osf/shared/models/user/social.model';
import { UserModel } from '@osf/shared/models/user/user.models';
import { UserModel } from '@osf/shared/models/user/user.model';

export class GetCurrentUser {
static readonly type = '[User] Get Current User';
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/store/user/user.model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AsyncStateModel } from '@osf/shared/models/store/async-state.model';
import { UserModel } from '@osf/shared/models/user/user.models';
import { UserModel } from '@osf/shared/models/user/user.model';

export interface UserStateModel {
currentUser: AsyncStateModel<UserModel | null>;
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/store/user/user.selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Selector } from '@ngxs/store';
import { Education } from '@osf/shared/models/user/education.model';
import { Employment } from '@osf/shared/models/user/employment.model';
import { SocialModel } from '@osf/shared/models/user/social.model';
import { UserModel } from '@osf/shared/models/user/user.models';
import { UserModel } from '@osf/shared/models/user/user.model';

import { UserStateModel } from './user.model';
import { UserState } from './user.state';
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/store/user/user.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { UserService } from '@core/services/user.service';
import { ProfileSettingsKey } from '@osf/shared/enums/profile-settings-key.enum';
import { removeNullable } from '@osf/shared/helpers/remove-nullable.helper';
import { UserMapper } from '@osf/shared/mappers/user';
import { UserModel } from '@osf/shared/models/user/user.model';
import { SocialModel } from '@shared/models/user/social.model';
import { UserModel } from '@shared/models/user/user.models';

import {
AcceptTermsOfServiceByUser,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ActivatedRoute } from '@angular/router';
import { BarChartComponent } from '@osf/shared/components/bar-chart/bar-chart.component';
import { LoadingSpinnerComponent } from '@osf/shared/components/loading-spinner/loading-spinner.component';
import { StatisticCardComponent } from '@osf/shared/components/statistic-card/statistic-card.component';
import { DatasetInput } from '@osf/shared/models/charts/dataset-input';
import { DatasetInput } from '@osf/shared/models/charts/dataset-input.model';
import { SelectOption } from '@osf/shared/models/select-option.model';
import { DoughnutChartComponent } from '@shared/components/doughnut-chart/doughnut-chart.component';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Institution } from '@osf/shared/models/institutions/institutions.models';
import { Institution } from '@osf/shared/models/institutions/institutions.model';
import { AsyncStateModel } from '@osf/shared/models/store/async-state.model';
import { AsyncStateWithTotalCount } from '@osf/shared/models/store/async-state-with-total-count.model';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Selector } from '@ngxs/store';

import { Institution } from '@osf/shared/models/institutions/institutions.models';
import { Institution } from '@osf/shared/models/institutions/institutions.model';

import { InstitutionDepartment, InstitutionSearchFilter, InstitutionSummaryMetrics, InstitutionUser } from '../models';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { catchError, tap, throwError } from 'rxjs';
import { inject, Injectable } from '@angular/core';

import { handleSectionError } from '@osf/shared/helpers/state-error.handler';
import { Institution } from '@osf/shared/models/institutions/institutions.models';
import { Institution } from '@osf/shared/models/institutions/institutions.model';
import { InstitutionsService } from '@osf/shared/services/institutions.service';

import { InstitutionsAdminService } from '../services/institutions-admin.service';
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/analytics/analytics.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { ViewOnlyLinkMessageComponent } from '@osf/shared/components/view-only-l
import { IS_WEB } from '@osf/shared/helpers/breakpoints.tokens';
import { replaceBadEncodedChars } from '@osf/shared/helpers/format-bad-encoding.helper';
import { Primitive } from '@osf/shared/helpers/types.helper';
import { DatasetInput } from '@osf/shared/models/charts/dataset-input';
import { DatasetInput } from '@osf/shared/models/charts/dataset-input.model';
import { ViewOnlyLinkHelperService } from '@osf/shared/services/view-only-link-helper.service';

import { AnalyticsKpiComponent } from './components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { collectionFilterTypes } from '@osf/features/collections/constants';
import { AddToCollectionSteps, CollectionFilterType } from '@osf/features/collections/enums';
import { CollectionFilterEntry } from '@osf/features/collections/models/collection-filter-entry.model';
import { AddToCollectionSelectors } from '@osf/features/collections/store/add-to-collection';
import { CollectionSubmissionWithGuid } from '@osf/shared/models/collections/collections.models';
import { CollectionSubmissionWithGuid } from '@osf/shared/models/collections/collections.model';
import { CollectionsSelectors, GetCollectionDetails } from '@osf/shared/stores/collections';

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ import { TruncatedTextComponent } from '@osf/shared/components/truncated-text/tr
import { InputLimits } from '@osf/shared/constants/input-limits.const';
import { ResourceType } from '@osf/shared/enums/resource-type.enum';
import { LicenseModel } from '@osf/shared/models/license/license.model';
import { ProjectModel } from '@osf/shared/models/projects/projects.models';
import { ProjectModel } from '@osf/shared/models/projects/projects.model';
import { InterpolatePipe } from '@osf/shared/pipes/interpolate.pipe';
import { ToastService } from '@osf/shared/services/toast.service';
import { GetAllContributors } from '@osf/shared/stores/contributors';
import { ClearProjects, ProjectsSelectors, UpdateProjectMetadata } from '@osf/shared/stores/projects';
import { CollectionsSelectors } from '@shared/stores/collections';

@Component({
selector: 'osf-project-metadata-step',
Expand Down Expand Up @@ -86,6 +87,7 @@ export class ProjectMetadataStepComponent {
readonly inputLimits = InputLimits;

readonly selectedProject = select(ProjectsSelectors.getSelectedProject);
readonly collectionProvider = select(CollectionsSelectors.getCollectionProvider);
readonly collectionLicenses = select(AddToCollectionSelectors.getCollectionLicenses);
readonly isSelectedProjectUpdateSubmitting = select(ProjectsSelectors.getSelectedProjectUpdateSubmitting);

Expand Down Expand Up @@ -113,7 +115,8 @@ export class ProjectMetadataStepComponent {

readonly projectLicense = computed(() => {
const project = this.selectedProject();
return project ? (this.collectionLicenses().find((license) => license.id === project.licenseId) ?? null) : null;
const licenseId = project?.licenseId || this.collectionProvider()?.defaultLicenseId;
return project ? (this.collectionLicenses().find((license) => license.id === licenseId) ?? null) : null;
});

private readonly isFormUnchanged = computed(() => {
Expand Down Expand Up @@ -235,7 +238,6 @@ export class ProjectMetadataStepComponent {
this.formService.updateLicenseValidators(this.projectMetadataForm, license);
});
}

this.populateFormFromProject();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { ChangeDetectionStrategy, Component, computed, input, output, signal } f

import { AddToCollectionSteps } from '@osf/features/collections/enums';
import { ProjectSelectorComponent } from '@osf/shared/components/project-selector/project-selector.component';
import { ProjectModel } from '@osf/shared/models/projects/projects.model';
import { SetSelectedProject } from '@osf/shared/stores/projects';
import { ProjectModel } from '@shared/models/projects/projects.models';
import { CollectionsSelectors, GetUserCollectionSubmissions } from '@shared/stores/collections';
import { ProjectsSelectors } from '@shared/stores/projects/projects.selectors';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ComponentRef } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ContributorsListComponent } from '@osf/shared/components/contributors-list/contributors-list.component';
import { CollectionSubmissionWithGuid } from '@osf/shared/models/collections/collections.models';
import { CollectionSubmissionWithGuid } from '@osf/shared/models/collections/collections.model';

import { CollectionsSearchResultCardComponent } from './collections-search-result-card.component';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ChangeDetectionStrategy, Component, computed, input } from '@angular/co

import { collectionFilterNames } from '@osf/features/collections/constants';
import { ContributorsListComponent } from '@osf/shared/components/contributors-list/contributors-list.component';
import { CollectionSubmissionWithGuid } from '@osf/shared/models/collections/collections.models';
import { CollectionSubmissionWithGuid } from '@osf/shared/models/collections/collections.model';

@Component({
selector: 'osf-collections-search-result-card',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { FormControl, FormGroup, Validators } from '@angular/forms';

import { ProjectMetadataFormControls } from '@osf/features/collections/enums';
import { CustomValidators } from '@osf/shared/helpers/custom-form-validators.helper';
import { ProjectModel } from '@osf/shared/models/projects/projects.model';
import { LicenseModel } from '@shared/models/license/license.model';
import { ProjectMetadataUpdatePayload } from '@shared/models/project-metadata-update-payload.model';
import { ProjectModel } from '@shared/models/projects/projects.models';

import { ProjectMetadataForm } from '../models/project-metadata-form.model';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CollectionProjectSubmission } from '@osf/shared/models/collections/collections.models';
import { CollectionProjectSubmission } from '@osf/shared/models/collections/collections.model';
import { LicenseModel } from '@shared/models/license/license.model';
import { AsyncStateModel } from '@shared/models/store/async-state.model';

Expand Down
Loading