Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bd7e4f8
fix(barrel-files): removed barrel files for services and components
nsemets Oct 28, 2025
708b8a2
fix(barrel-files): removed barrel files for constants, enums and mappers
nsemets Oct 29, 2025
280abeb
fix(barrel-files): removed for models, services and enums
nsemets Oct 29, 2025
a2c7b52
Merge branch 'feature/pbs-25.03' into fix/ENG-9633
nsemets Oct 29, 2025
79a688b
fix(models): updated some models naming
nsemets Oct 29, 2025
750e520
Merge remote-tracking branch 'upstream/feature/pbs-25.03' into fix/ch…
nsemets Oct 29, 2025
6017f00
fix(import): fixed import
nsemets Oct 29, 2025
f3f3a13
Merge branch 'feature/pbs-25.03' into fix/ENG-9633
nsemets Oct 30, 2025
c07df20
fix(overview-toolbar): slit toolbar for project and registration
nsemets Oct 30, 2025
693bce8
fix(bookmarks): updated bookmarks state and service
nsemets Oct 30, 2025
258bf42
fix(overview): updated registration metadata section
nsemets Nov 3, 2025
1e8ec73
fix(overview): added shared components for resource metadata
nsemets Nov 3, 2025
52036de
Merge remote-tracking branch 'upstream/feature/pbs-25.03' into fix/EN…
nsemets Nov 3, 2025
6d0fa7b
Merge remote-tracking branch 'upstream/feature/pbs-25.03' into fix/EN…
nsemets Nov 4, 2025
de7074b
fix(registry-overview): update overview components
nsemets Nov 4, 2025
f27f431
fix(registration): updated models
nsemets Nov 5, 2025
b2176dd
fix(registration): updated registration overview state
nsemets Nov 5, 2025
a96393a
fix(unit-tests): updated unit tests
nsemets Nov 5, 2025
f140b0b
fix(meta-tags): updated setting meta tags for registration
nsemets Nov 5, 2025
b289c5a
Merge remote-tracking branch 'upstream/feature/pbs-25.03' into fix/EN…
nsemets Nov 5, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export const routes: Routes = [
path: 'my-projects',
loadComponent: () =>
import('./features/my-projects/my-projects.component').then((mod) => mod.MyProjectsComponent),
providers: [provideStates([BookmarksState, ProjectsState])],
canActivate: [authGuard],
providers: [provideStates([BookmarksState, ProjectsState])],
},
{
path: 'my-registrations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { NO_ERRORS_SCHEMA, signal } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActivatedRoute, Router } from '@angular/router';

import { CustomMenuItem } from '@core/models/custom-menu-item.model';
import { AuthService } from '@core/services/auth.service';
import { CustomMenuItem } from '@osf/core/models';
import { ProviderSelectors } from '@osf/core/store/provider/provider.selectors';
import { UserSelectors } from '@osf/core/store/user/user.selectors';
import { IconComponent } from '@osf/shared/components/icon/icon.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActivatedRoute, Router } from '@angular/router';

import { ProjectOverviewSelectors } from '@osf/features/project/overview/store';
import { RegistryOverviewSelectors } from '@osf/features/registry/store/registry-overview';
import { RegistrySelectors } from '@osf/features/registry/store/registry';
import { ContributorsListComponent } from '@osf/shared/components/contributors-list/contributors-list.component';
import { CustomPaginatorComponent } from '@osf/shared/components/custom-paginator/custom-paginator.component';
import { IconComponent } from '@osf/shared/components/icon/icon.component';
Expand Down Expand Up @@ -64,8 +64,8 @@ describe('Component: View Duplicates', () => {
{ selector: DuplicatesSelectors.getDuplicatesTotalCount, value: 0 },
{ selector: ProjectOverviewSelectors.getProject, value: MOCK_PROJECT_OVERVIEW },
{ selector: ProjectOverviewSelectors.isProjectAnonymous, value: false },
{ selector: RegistryOverviewSelectors.getRegistry, value: undefined },
{ selector: RegistryOverviewSelectors.isRegistryAnonymous, value: false },
{ selector: RegistrySelectors.getRegistry, value: undefined },
{ selector: RegistrySelectors.isRegistryAnonymous, value: false },
],
}),
MockProvider(CustomDialogService, mockCustomDialogService),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { UserSelectors } from '@core/store/user';
import { DeleteComponentDialogComponent, ForkDialogComponent } from '@osf/features/project/overview/components';
import { ClearProjectOverview, GetProjectById, ProjectOverviewSelectors } from '@osf/features/project/overview/store';
import {
ClearRegistryOverview,
GetRegistryById,
RegistryOverviewSelectors,
} from '@osf/features/registry/store/registry-overview';
import { ClearRegistry, GetRegistryById, RegistrySelectors } from '@osf/features/registry/store/registry';
import { ContributorsListComponent } from '@osf/shared/components/contributors-list/contributors-list.component';
import { CustomPaginatorComponent } from '@osf/shared/components/custom-paginator/custom-paginator.component';
import { IconComponent } from '@osf/shared/components/icon/icon.component';
Expand Down Expand Up @@ -72,9 +68,9 @@ export class ViewDuplicatesComponent {
private router = inject(Router);
private destroyRef = inject(DestroyRef);
private project = select(ProjectOverviewSelectors.getProject);
private registration = select(RegistryOverviewSelectors.getRegistry);
private registration = select(RegistrySelectors.getRegistry);
private isProjectAnonymous = select(ProjectOverviewSelectors.isProjectAnonymous);
private isRegistryAnonymous = select(RegistryOverviewSelectors.isRegistryAnonymous);
private isRegistryAnonymous = select(RegistrySelectors.isRegistryAnonymous);

duplicates = select(DuplicatesSelectors.getDuplicates);
isDuplicatesLoading = select(DuplicatesSelectors.getDuplicatesLoading);
Expand Down Expand Up @@ -127,7 +123,7 @@ export class ViewDuplicatesComponent {
getDuplicates: GetAllDuplicates,
clearDuplicates: ClearDuplicates,
clearProject: ClearProjectOverview,
clearRegistration: ClearRegistryOverview,
clearRegistration: ClearRegistry,
getComponentsTree: GetResourceWithChildren,
});

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

import { ProjectOverviewSelectors } from '@osf/features/project/overview/store';
import { RegistryOverviewSelectors } from '@osf/features/registry/store/registry-overview';
import { RegistrySelectors } from '@osf/features/registry/store/registry';
import { ContributorsListComponent } from '@osf/shared/components/contributors-list/contributors-list.component';
import { CustomPaginatorComponent } from '@osf/shared/components/custom-paginator/custom-paginator.component';
import { IconComponent } from '@osf/shared/components/icon/icon.component';
Expand Down Expand Up @@ -54,7 +54,7 @@ describe('Component: View Duplicates', () => {
{ selector: LinkedProjectsSelectors.getLinkedProjectsLoading, value: false },
{ selector: LinkedProjectsSelectors.getLinkedProjectsTotalCount, value: 0 },
{ selector: ProjectOverviewSelectors.getProject, value: MOCK_PROJECT_OVERVIEW },
{ selector: RegistryOverviewSelectors.getRegistry, value: undefined },
{ selector: RegistrySelectors.getRegistry, value: undefined },
],
}),
MockProvider(ActivatedRoute, activatedRouteMock),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ import { toSignal } from '@angular/core/rxjs-interop';
import { ActivatedRoute, RouterLink } from '@angular/router';

import { ClearProjectOverview, GetProjectById, ProjectOverviewSelectors } from '@osf/features/project/overview/store';
import {
ClearRegistryOverview,
GetRegistryById,
RegistryOverviewSelectors,
} from '@osf/features/registry/store/registry-overview';
import { ClearRegistry, GetRegistryById, RegistrySelectors } from '@osf/features/registry/store/registry';
import { ContributorsListComponent } from '@osf/shared/components/contributors-list/contributors-list.component';
import { CustomPaginatorComponent } from '@osf/shared/components/custom-paginator/custom-paginator.component';
import { IconComponent } from '@osf/shared/components/icon/icon.component';
Expand Down Expand Up @@ -59,7 +55,7 @@ export class ViewLinkedProjectsComponent {
private route = inject(ActivatedRoute);
private destroyRef = inject(DestroyRef);
private project = select(ProjectOverviewSelectors.getProject);
private registration = select(RegistryOverviewSelectors.getRegistry);
private registration = select(RegistrySelectors.getRegistry);

linkedProjects = select(LinkedProjectsSelectors.getLinkedProjects);
isLoading = select(LinkedProjectsSelectors.getLinkedProjectsLoading);
Expand Down Expand Up @@ -93,7 +89,7 @@ export class ViewLinkedProjectsComponent {
getLinkedProjects: GetAllLinkedProjects,
clearLinkedProjects: ClearLinkedProjects,
clearProject: ClearProjectOverview,
clearRegistration: ClearRegistryOverview,
clearRegistration: ClearRegistry,
});

constructor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p-card>
<div class="flex justify-content-between align-items-center">
<h2>{{ 'project.overview.metadata.affiliatedInstitutions' | translate }}</h2>
<h2>{{ 'common.labels.affiliatedInstitutions' | translate }}</h2>

@if (!readonly()) {
<p-button
Expand All @@ -13,6 +13,6 @@ <h2>{{ 'project.overview.metadata.affiliatedInstitutions' | translate }}</h2>
</div>

<div class="mt-4">
<osf-affiliated-institutions-view [institutions]="affiliatedInstitutions()" [showTitle]="false" />
<osf-affiliated-institutions-view [institutions]="affiliatedInstitutions()" />
</div>
</p-card>
1 change: 0 additions & 1 deletion src/app/features/my-projects/mappers/index.ts

This file was deleted.

20 changes: 6 additions & 14 deletions src/app/features/my-projects/my-projects.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@ import { SearchInputComponent } from '@osf/shared/components/search-input/search
import { SelectComponent } from '@osf/shared/components/select/select.component';
import { SubHeaderComponent } from '@osf/shared/components/sub-header/sub-header.component';
import { DEFAULT_TABLE_PARAMS } from '@osf/shared/constants/default-table-params.constants';
import { ResourceType } from '@osf/shared/enums/resource-type.enum';
import { SortOrder } from '@osf/shared/enums/sort-order.enum';
import { IS_MEDIUM } from '@osf/shared/helpers/breakpoints.tokens';
import { CustomDialogService } from '@osf/shared/services/custom-dialog.service';
import { ProjectRedirectDialogService } from '@osf/shared/services/project-redirect-dialog.service';
import { BookmarksSelectors, GetBookmarksCollectionId } from '@osf/shared/stores/bookmarks';
import { BookmarksSelectors, GetAllMyBookmarks, GetBookmarksCollectionId } from '@osf/shared/stores/bookmarks';
import {
ClearMyResources,
GetMyBookmarks,
GetMyPreprints,
GetMyProjects,
GetMyRegistrations,
Expand Down Expand Up @@ -82,7 +80,6 @@ export class MyProjectsComponent implements OnInit {
readonly queryService = inject(MyProjectsQueryService);
readonly tableParamsService = inject(MyProjectsTableParamsService);

readonly bookmarksPageSize = 100;
readonly isLoading = signal(false);
readonly isMedium = toSignal(inject(IS_MEDIUM));
readonly tabOptions = MY_PROJECTS_TABS;
Expand All @@ -104,12 +101,13 @@ export class MyProjectsComponent implements OnInit {
readonly projects = select(MyResourcesSelectors.getProjects);
readonly registrations = select(MyResourcesSelectors.getRegistrations);
readonly preprints = select(MyResourcesSelectors.getPreprints);
readonly bookmarks = select(MyResourcesSelectors.getBookmarks);
readonly totalProjectsCount = select(MyResourcesSelectors.getTotalProjects);
readonly totalRegistrationsCount = select(MyResourcesSelectors.getTotalRegistrations);
readonly totalPreprintsCount = select(MyResourcesSelectors.getTotalPreprints);
readonly totalBookmarksCount = select(MyResourcesSelectors.getTotalBookmarks);

readonly bookmarks = select(BookmarksSelectors.getBookmarks);
readonly bookmarksCollectionId = select(BookmarksSelectors.getBookmarksCollectionId);
readonly totalBookmarksCount = select(BookmarksSelectors.getBookmarksTotalCount);
readonly isBookmarks = computed(() => this.selectedTab() === MyProjectsTab.Bookmarks);

readonly actions = createDispatchMap({
Expand All @@ -118,7 +116,7 @@ export class MyProjectsComponent implements OnInit {
getMyProjects: GetMyProjects,
getMyRegistrations: GetMyRegistrations,
getMyPreprints: GetMyPreprints,
getMyBookmarks: GetMyBookmarks,
getMyBookmarks: GetAllMyBookmarks,
});

constructor() {
Expand Down Expand Up @@ -314,13 +312,7 @@ export class MyProjectsComponent implements OnInit {
break;
case MyProjectsTab.Bookmarks:
if (this.bookmarksCollectionId()) {
action$ = this.actions.getMyBookmarks(
this.bookmarksCollectionId(),
pageNumber,
this.bookmarksPageSize,
filters,
ResourceType.Null
);
action$ = this.actions.getMyBookmarks(this.bookmarksCollectionId(), filters);
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ export class AdditionalInfoComponent {
if (!preprint) return null;
return preprint.embeddedLicense;
});
licenseOptionsRecord = computed(() => {
return (this.preprint()?.licenseOptions ?? {}) as Record<string, string>;
});

licenseOptionsRecord = computed(() => (this.preprint()?.licenseOptions ?? {}) as Record<string, string>);

skeletonData = Array.from({ length: 5 }, () => null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ <h3>{{ 'preprints.preprintStepper.common.labels.abstract' | translate }}</h3>
</section>

@if (affiliatedInstitutions().length) {
<osf-affiliated-institutions-view [institutions]="affiliatedInstitutions()" />
<section class="flex flex-column gap-2">
<h3>{{ 'common.labels.affiliatedInstitutions' | translate }}</h3>

<osf-affiliated-institutions-view [institutions]="affiliatedInstitutions()" />
</section>
}

@if (preprintProvider()?.assertionsEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ <h3>{{ 'common.labels.contributors' | translate }}</h3>
</section>

@if (affiliatedInstitutions().length) {
<osf-affiliated-institutions-view data-test-preprint-institution-list [institutions]="affiliatedInstitutions()" />
<section class="flex flex-column gap-2">
<h3>{{ 'common.labels.affiliatedInstitutions' | translate }}</h3>

<osf-affiliated-institutions-view
data-test-preprint-institution-list
[institutions]="affiliatedInstitutions()"
/>
</section>
}

@if (license()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@if (hasAdminAccessForAllComponents()) {
@if (hasSubcomponents()) {
@if (hasSubComponents()) {
<p>{{ 'project.overview.dialog.deleteComponent.listMessage' | translate }}</p>
@if (isLoading()) {
<p-skeleton styleClass="mt-2" width="100%" height="4rem" />
Expand All @@ -25,6 +25,7 @@
} @else {
<p [innerHTML]="'project.overview.dialog.deleteComponent.noPermissionsMessage' | translate"></p>
}

<div class="flex pt-5 justify-content-end gap-3">
<p-button
class="w-12rem btn-full-width"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { FormsModule } from '@angular/forms';

import { DeleteProject, SettingsSelectors } from '@osf/features/project/settings/store';
import { RegistryOverviewSelectors } from '@osf/features/registry/store/registry-overview';
import { RegistrySelectors } from '@osf/features/registry/store/registry';
import { ScientistsNames } from '@osf/shared/constants/scientists.const';
import { ResourceType } from '@osf/shared/enums/resource-type.enum';
import { UserPermissions } from '@osf/shared/enums/user-permissions.enum';
Expand All @@ -38,7 +38,7 @@ export class DeleteComponentDialogComponent {
scientistNames = ScientistsNames;

project = select(ProjectOverviewSelectors.getProject);
registration = select(RegistryOverviewSelectors.getRegistry);
registration = select(RegistrySelectors.getRegistry);
isSubmitting = select(SettingsSelectors.isSettingsSubmitting);
isLoading = select(CurrentResourceSelectors.isResourceWithChildrenLoading);
components = select(CurrentResourceSelectors.getResourceWithChildren);
Expand Down Expand Up @@ -68,7 +68,7 @@ export class DeleteComponentDialogComponent {
return components.every((component) => component.permissions?.includes(UserPermissions.Admin));
});

hasSubcomponents = computed(() => {
hasSubComponents = computed(() => {
const components = this.components();
return components && components.length > 1;
});
Expand Down
7 changes: 3 additions & 4 deletions src/app/features/project/overview/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ export { CitationAddonCardComponent } from './citation-addon-card/citation-addon
export { CitationCollectionItemComponent } from './citation-collection-item/citation-collection-item.component';
export { CitationItemComponent } from './citation-item/citation-item.component';
export { DeleteComponentDialogComponent } from './delete-component-dialog/delete-component-dialog.component';
export { DeleteNodeLinkDialogComponent } from './delete-node-link-dialog/delete-node-link-dialog.component';
export { DuplicateDialogComponent } from './duplicate-dialog/duplicate-dialog.component';
export { FilesWidgetComponent } from './files-widget/files-widget.component';
export { ForkDialogComponent } from './fork-dialog/fork-dialog.component';
export { LinkResourceDialogComponent } from './link-resource-dialog/link-resource-dialog.component';
export { LinkedResourcesComponent } from './linked-resources/linked-resources.component';
export { OverviewComponentsComponent } from './overview-components/overview-components.component';
export { OverviewToolbarComponent } from './overview-toolbar/overview-toolbar.component';
export { OverviewWikiComponent } from './overview-wiki/overview-wiki.component';
export { RecentActivityComponent } from './recent-activity/recent-activity.component';
export { TogglePublicityDialogComponent } from './toggle-publicity-dialog/toggle-publicity-dialog.component';
export { DeleteNodeLinkDialogComponent } from '@osf/features/project/overview/components/delete-node-link-dialog/delete-node-link-dialog.component';
export { LinkResourceDialogComponent } from '@osf/features/project/overview/components/link-resource-dialog/link-resource-dialog.component';
export { LinkedResourcesComponent } from '@osf/features/project/overview/components/linked-resources/linked-resources.component';
Loading