Skip to content

Commit b6e8eac

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into feature/pbs-25-24
2 parents 6e027fe + 3141ef7 commit b6e8eac

13 files changed

Lines changed: 44 additions & 33 deletions

File tree

CHANGELOG

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO.
4+
5+
26.1.0 (2026-01-01)
6+
===================
7+
8+
* Angular FE support for Notification Refactor Project
9+
10+
# vi: ft=markdown
11+

angular.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"styles": [
5454
"src/styles/styles.scss",
5555
"node_modules/primeflex/primeflex.css",
56+
"node_modules/@fortawesome/fontawesome-free/css/all.min.css",
5657
"node_modules/ngx-markdown-editor/assets/highlight.js/agate.min.css"
5758
],
5859
"stylePreprocessorOptions": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "osf",
3-
"version": "25.4.0",
3+
"version": "26.1.0",
44
"scripts": {
55
"ng": "ng",
66
"analyze-bundle": "ng build --configuration=analyze-bundle && source-map-explorer dist/**/*.js --no-border-checks",

src/app/features/metadata/components/cedar-template-form/cedar-template-form.component.ts

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Tooltip } from 'primeng/tooltip';
66

77
import { map, of } from 'rxjs';
88

9-
import { CommonModule, isPlatformBrowser } from '@angular/common';
9+
import { CommonModule } from '@angular/common';
1010
import {
1111
ChangeDetectionStrategy,
1212
Component,
@@ -16,7 +16,6 @@ import {
1616
inject,
1717
input,
1818
output,
19-
PLATFORM_ID,
2019
signal,
2120
viewChild,
2221
ViewEncapsulation,
@@ -25,7 +24,6 @@ import { toSignal } from '@angular/core/rxjs-interop';
2524
import { ActivatedRoute } from '@angular/router';
2625

2726
import { ENVIRONMENT } from '@core/provider/environment.provider';
28-
import { LoadingSpinnerComponent } from '@osf/shared/components/loading-spinner/loading-spinner.component';
2927

3028
import { CEDAR_CONFIG, CEDAR_VIEWER_CONFIG } from '../../constants';
3129
import { CedarMetadataHelper } from '../../helpers';
@@ -38,7 +36,7 @@ import {
3836

3937
@Component({
4038
selector: 'osf-cedar-template-form',
41-
imports: [CommonModule, Button, TranslatePipe, Tooltip, Menu, LoadingSpinnerComponent],
39+
imports: [CommonModule, Button, TranslatePipe, Tooltip, Menu],
4240
templateUrl: './cedar-template-form.component.html',
4341
styleUrl: './cedar-template-form.component.scss',
4442
schemas: [CUSTOM_ELEMENTS_SCHEMA],
@@ -65,8 +63,6 @@ export class CedarTemplateFormComponent {
6563

6664
private route = inject(ActivatedRoute);
6765
readonly environment = inject(ENVIRONMENT);
68-
private platformId = inject(PLATFORM_ID);
69-
readonly cedarLoaded = signal<boolean>(false);
7066

7167
readonly recordId = signal<string>('');
7268
readonly downloadUrl = signal<string>('');
@@ -93,15 +89,15 @@ export class CedarTemplateFormComponent {
9389
effect(() => {
9490
const tpl = this.template();
9591
if (tpl?.attributes?.template) {
96-
this.loadCedarLibraries().then(() => this.initializeCedar());
92+
this.initializeCedar();
9793
}
9894
});
9995

10096
effect(() => {
10197
const record = this.existingRecord();
10298
this.schemaName.set(record?.embeds?.template.data.attributes.schema_name || '');
10399
if (record) {
104-
this.loadCedarLibraries().then(() => this.initializeCedar());
100+
this.initializeCedar();
105101
}
106102
});
107103
}
@@ -138,19 +134,6 @@ export class CedarTemplateFormComponent {
138134
}
139135
}
140136

141-
private async loadCedarLibraries(): Promise<void> {
142-
if (!isPlatformBrowser(this.platformId) || this.cedarLoaded()) {
143-
return;
144-
}
145-
146-
try {
147-
await Promise.all([import('cedar-artifact-viewer'), import('cedar-embeddable-editor')]);
148-
this.cedarLoaded.set(true);
149-
} catch {
150-
this.cedarLoaded.set(false);
151-
}
152-
}
153-
154137
downloadMetadadaRecord() {
155138
if (this.fileGuid()) {
156139
window.open(`${this.environment.webUrl}/metadata/${this.fileGuid()}`)?.focus();

src/app/features/profile/components/profile-information/profile-information.component.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ <h1>{{ currentUser()?.fullName }}</h1>
1414

1515
<div class="flex flex-column gap-4 min-w-0 xl:align-items-end xl:flex-1">
1616
<div class="flex flex-column gap-3 w-full md:flex-row xl:gap-4 xl:justify-content-end">
17-
@if (currentUser()?.social?.orcid) {
17+
@if (orcidId()) {
1818
<div class="flex flex-row align-items-center gap-2">
1919
<img ngSrc="assets/icons/colored/orcid.svg" width="16" height="16" alt="orcid" />
20-
<a class="dark-blue-two-link font-bold" [href]="'https://orcid.org/' + currentUser()?.social?.orcid">
21-
https://orcid.org/{{ currentUser()?.social?.orcid }}
22-
</a>
20+
<a class="font-bold" [href]="'https://orcid.org/' + orcidId()"> https://orcid.org/{{ orcidId() }} </a>
2321
</div>
2422
}
2523

src/app/features/profile/components/profile-information/profile-information.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ export class ProfileInformationComponent {
4343

4444
userSocials = computed(() => mapUserSocials(this.currentUser()?.social, SOCIAL_LINKS));
4545

46+
orcidId = computed(() => {
47+
const orcid = this.currentUser()?.external_identity?.ORCID;
48+
return orcid?.status?.toUpperCase() === 'VERIFIED' ? orcid.id : undefined;
49+
});
50+
4651
toProfileSettings() {
4752
this.editProfile.emit();
4853
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export enum SubscriptionFrequency {
22
Never = 'none',
33
Daily = 'daily',
4-
Instant = 'instant',
4+
Instant = 'instantly',
55
}

src/app/shared/mappers/user/user.mapper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export class UserMapper {
3232
employment: user.attributes.employment,
3333
iri: user.links.iri,
3434
social: user.attributes.social,
35+
external_identity: user.attributes.external_identity,
3536
defaultRegionId: user.relationships?.default_region?.data?.id,
3637
canViewReviews: user.attributes.can_view_reviews === true, // [NS] Do not simplify it
3738
timezone: user.attributes.timezone,
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface OrcidInfo {
2+
id: string;
3+
status: string;
4+
}
5+
6+
export interface ExternalIdentityModel {
7+
ORCID?: OrcidInfo | null;
8+
}

src/app/shared/models/user/user-json-api.model.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ResponseDataJsonApi } from '../common/json-api.model';
22

33
import { Education } from './education.model';
44
import { Employment } from './employment.model';
5+
import { ExternalIdentityModel } from './external-identity.model';
56
import { SocialModel } from './social.model';
67

78
export type UserResponseJsonApi = ResponseDataJsonApi<UserDataJsonApi>;
@@ -47,6 +48,7 @@ export interface UserAttributesJsonApi {
4748
suffix: string;
4849
locale: string;
4950
social: SocialModel;
51+
external_identity: ExternalIdentityModel;
5052
timezone: string;
5153
}
5254

0 commit comments

Comments
 (0)