From f4b1ebe527f2395b58d89003ec39a253a98c6ff6 Mon Sep 17 00:00:00 2001 From: nsemets Date: Wed, 10 Dec 2025 16:27:17 +0200 Subject: [PATCH 1/6] [ENG-9802] Users unable to create a NEW CEDAR metadata template, and existing templates not able to be viewed #814 - Ticket: [ENG-9802] - Feature flag: n/a ## Summary of Changes 1. Fixed loading of cedar libraries. --- .../cedar-template-form.component.ts | 27 +++++++++---------- src/main.ts | 2 ++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/app/features/metadata/components/cedar-template-form/cedar-template-form.component.ts b/src/app/features/metadata/components/cedar-template-form/cedar-template-form.component.ts index 16a562e69..4faf1a9cd 100644 --- a/src/app/features/metadata/components/cedar-template-form/cedar-template-form.component.ts +++ b/src/app/features/metadata/components/cedar-template-form/cedar-template-form.component.ts @@ -26,7 +26,6 @@ import { ActivatedRoute } from '@angular/router'; import { ENVIRONMENT } from '@core/provider/environment.provider'; import 'cedar-artifact-viewer'; -import 'cedar-embeddable-editor'; import { CEDAR_CONFIG, CEDAR_VIEWER_CONFIG } from '../../constants'; import { CedarMetadataHelper } from '../../helpers'; @@ -71,6 +70,8 @@ export class CedarTemplateFormComponent { readonly downloadUrl = signal(''); readonly schemaName = signal(''); + readonly fileGuid = toSignal(this.route.params.pipe(map((params) => params['fileGuid'])) ?? of(undefined)); + shareItems = [ { label: 'files.detail.actions.share.email', @@ -123,7 +124,17 @@ export class CedarTemplateFormComponent { this.validateCedarMetadata(); } - readonly fileGuid = toSignal(this.route.params.pipe(map((params) => params['fileGuid'])) ?? of(undefined)); + private initializeFormData(): void { + const template = this.template()?.attributes?.template; + if (!template) return; + const metadata = this.existingRecord()?.attributes?.metadata; + if (this.existingRecord()) { + const structuredMetadata = CedarMetadataHelper.buildStructuredMetadata(metadata); + this.formData.set(structuredMetadata); + } else { + this.formData.set(CedarMetadataHelper.buildEmptyMetadata()); + } + } downloadMetadadaRecord() { if (this.fileGuid()) { @@ -174,18 +185,6 @@ export class CedarTemplateFormComponent { } } - private initializeFormData(): void { - const template = this.template()?.attributes?.template; - if (!template) return; - const metadata = this.existingRecord()?.attributes?.metadata; - if (this.existingRecord()) { - const structuredMetadata = CedarMetadataHelper.buildStructuredMetadata(metadata); - this.formData.set(structuredMetadata); - } else { - this.formData.set(CedarMetadataHelper.buildEmptyMetadata()); - } - } - handleEmailShare(): void { const url = window.location.href; window.location.href = `mailto:?subject=${this.schemaName()}&body=${url}`; diff --git a/src/main.ts b/src/main.ts index e005d74a2..1285e5af0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,6 +3,8 @@ import { bootstrapApplication } from '@angular/platform-browser'; import { AppComponent } from '@osf/app.component'; import { appConfig } from '@osf/app.config'; +import 'cedar-embeddable-editor'; + bootstrapApplication(AppComponent, { providers: [...appConfig.providers], }).catch((err) => From 85059f293c80f166b5cedc98f8d810ec00c9771f Mon Sep 17 00:00:00 2001 From: nsemets Date: Thu, 11 Dec 2025 17:51:06 +0200 Subject: [PATCH 2/6] [ENG-9802] Fix cedar libraries import (#819) * fix(cedar-template): fixed import of cedar library * fix(cedar-import): updated import for viewer * fix(cedar): fixed cedar styles * fix(cedar): removed import * fix(cedar): returned import --- angular.json | 1 + .../cedar-template-form/cedar-template-form.component.ts | 2 -- src/main.ts | 1 + src/styles/styles.scss | 5 ----- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/angular.json b/angular.json index 5108d40ce..351627358 100644 --- a/angular.json +++ b/angular.json @@ -50,6 +50,7 @@ "styles": [ "src/styles/styles.scss", "node_modules/primeflex/primeflex.css", + "node_modules/@fortawesome/fontawesome-free/css/all.min.css", "node_modules/ngx-markdown-editor/assets/highlight.js/agate.min.css" ], "stylePreprocessorOptions": { diff --git a/src/app/features/metadata/components/cedar-template-form/cedar-template-form.component.ts b/src/app/features/metadata/components/cedar-template-form/cedar-template-form.component.ts index 4faf1a9cd..96891e1e6 100644 --- a/src/app/features/metadata/components/cedar-template-form/cedar-template-form.component.ts +++ b/src/app/features/metadata/components/cedar-template-form/cedar-template-form.component.ts @@ -25,8 +25,6 @@ import { ActivatedRoute } from '@angular/router'; import { ENVIRONMENT } from '@core/provider/environment.provider'; -import 'cedar-artifact-viewer'; - import { CEDAR_CONFIG, CEDAR_VIEWER_CONFIG } from '../../constants'; import { CedarMetadataHelper } from '../../helpers'; import { diff --git a/src/main.ts b/src/main.ts index 1285e5af0..f2cc9c774 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,6 +4,7 @@ import { AppComponent } from '@osf/app.component'; import { appConfig } from '@osf/app.config'; import 'cedar-embeddable-editor'; +import 'cedar-artifact-viewer'; bootstrapApplication(AppComponent, { providers: [...appConfig.providers], diff --git a/src/styles/styles.scss b/src/styles/styles.scss index a51b536b8..f192f1d5d 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -7,11 +7,6 @@ @use "base"; @use "icons"; -@use "@fortawesome/fontawesome-free/scss/fontawesome.scss"; -@use "@fortawesome/fontawesome-free/scss/solid.scss"; -@use "@fortawesome/fontawesome-free/scss/brands.scss"; -@use "@fortawesome/fontawesome-free/scss/regular.scss"; - @use "./components/md-editor"; @use "./components/preprints"; @use "./components/collections"; From 1410d29573470f4a805ee4c435c7fb8735f23978 Mon Sep 17 00:00:00 2001 From: Longze Chen Date: Wed, 31 Dec 2025 15:29:06 -0500 Subject: [PATCH 3/6] [ENG-10006] Notification Refactor - FE Support PR (#778) * Fix notification frequency enum --- .../shared/enums/subscriptions/subscription-frequency.enum.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/enums/subscriptions/subscription-frequency.enum.ts b/src/app/shared/enums/subscriptions/subscription-frequency.enum.ts index 2c9f96421..660924152 100644 --- a/src/app/shared/enums/subscriptions/subscription-frequency.enum.ts +++ b/src/app/shared/enums/subscriptions/subscription-frequency.enum.ts @@ -1,5 +1,5 @@ export enum SubscriptionFrequency { Never = 'none', Daily = 'daily', - Instant = 'instant', + Instant = 'instantly', } From 3893b276456366600e6753f15076cae7c9b517aa Mon Sep 17 00:00:00 2001 From: Longze Chen Date: Wed, 31 Dec 2025 15:43:39 -0500 Subject: [PATCH 4/6] Create changelog and bump version --- CHANGELOG | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 000000000..b280270ff --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,11 @@ +# Changelog + +We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO. + +26.1.0 (2026-01-01) +=================== + +* Angular FE support for Notification Refactor Project + +# vi: ft=markdown + diff --git a/package.json b/package.json index 2ddc4e696..f25e4b715 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "osf", - "version": "25.4.0", + "version": "26.1.0", "scripts": { "ng": "ng", "analyze-bundle": "ng build --configuration=analyze-bundle && source-map-explorer dist/**/*.js --no-border-checks", From 89a5527eebd98fb7c83a9db37126c11d428c53fb Mon Sep 17 00:00:00 2001 From: Bohdan Odintsov Date: Wed, 7 Jan 2026 15:29:29 +0200 Subject: [PATCH 5/6] fix(profile-information): fix authenticated orcid is not shown --- .../profile-information.component.html | 6 ++---- .../profile-information.component.ts | 14 ++++++++++++++ src/app/shared/mappers/user/user.mapper.ts | 1 + .../shared/models/user/external-identity.model.ts | 8 ++++++++ src/app/shared/models/user/user-json-api.model.ts | 2 ++ src/app/shared/models/user/user.models.ts | 2 ++ 6 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 src/app/shared/models/user/external-identity.model.ts diff --git a/src/app/features/profile/components/profile-information/profile-information.component.html b/src/app/features/profile/components/profile-information/profile-information.component.html index e03ceb58f..613865457 100644 --- a/src/app/features/profile/components/profile-information/profile-information.component.html +++ b/src/app/features/profile/components/profile-information/profile-information.component.html @@ -14,12 +14,10 @@

{{ currentUser()?.fullName }}

- @if (currentUser()?.social?.orcid) { + @if (orcidId()) { } diff --git a/src/app/features/profile/components/profile-information/profile-information.component.ts b/src/app/features/profile/components/profile-information/profile-information.component.ts index 25d7f1a4d..85a709f86 100644 --- a/src/app/features/profile/components/profile-information/profile-information.component.ts +++ b/src/app/features/profile/components/profile-information/profile-information.component.ts @@ -43,6 +43,20 @@ export class ProfileInformationComponent { userSocials = computed(() => mapUserSocials(this.currentUser()?.social, SOCIAL_LINKS)); + orcidId = computed(() => { + const orcid = this.currentUser()?.external_identity?.ORCID; + if (!orcid || !orcid.id) { + return undefined; + } + + const status = (orcid.status || '').toUpperCase(); + if (status !== 'VERIFIED') { + return undefined; + } + + return orcid.id; + }); + toProfileSettings() { this.editProfile.emit(); } diff --git a/src/app/shared/mappers/user/user.mapper.ts b/src/app/shared/mappers/user/user.mapper.ts index 50b7b8b71..0a89499c6 100644 --- a/src/app/shared/mappers/user/user.mapper.ts +++ b/src/app/shared/mappers/user/user.mapper.ts @@ -32,6 +32,7 @@ export class UserMapper { employment: user.attributes.employment, iri: user.links.iri, social: user.attributes.social, + external_identity: user.attributes.external_identity, defaultRegionId: user.relationships?.default_region?.data?.id, canViewReviews: user.attributes.can_view_reviews === true, // [NS] Do not simplify it timezone: user.attributes.timezone, diff --git a/src/app/shared/models/user/external-identity.model.ts b/src/app/shared/models/user/external-identity.model.ts new file mode 100644 index 000000000..9703400e0 --- /dev/null +++ b/src/app/shared/models/user/external-identity.model.ts @@ -0,0 +1,8 @@ +export interface OrcidInfo { + id: string; + status: string; +} + +export interface ExternalIdentityModel { + ORCID?: OrcidInfo | null; +} diff --git a/src/app/shared/models/user/user-json-api.model.ts b/src/app/shared/models/user/user-json-api.model.ts index fd2fc083f..99ffcf74a 100644 --- a/src/app/shared/models/user/user-json-api.model.ts +++ b/src/app/shared/models/user/user-json-api.model.ts @@ -2,6 +2,7 @@ import { ResponseDataJsonApi } from '../common/json-api.model'; import { Education } from './education.model'; import { Employment } from './employment.model'; +import { ExternalIdentityModel } from './external-identity.model'; import { SocialModel } from './social.model'; export type UserResponseJsonApi = ResponseDataJsonApi; @@ -47,6 +48,7 @@ export interface UserAttributesJsonApi { suffix: string; locale: string; social: SocialModel; + external_identity: ExternalIdentityModel; timezone: string; } diff --git a/src/app/shared/models/user/user.models.ts b/src/app/shared/models/user/user.models.ts index 2eadb1721..cbde55356 100644 --- a/src/app/shared/models/user/user.models.ts +++ b/src/app/shared/models/user/user.models.ts @@ -1,5 +1,6 @@ import { Education } from './education.model'; import { Employment } from './employment.model'; +import { ExternalIdentityModel } from './external-identity.model'; import { SocialModel } from './social.model'; export interface UserData { @@ -24,6 +25,7 @@ export interface UserModel { timezone: string; locale: string; social: SocialModel; + external_identity: ExternalIdentityModel; defaultRegionId: string; link?: string; iri?: string; From a6b47a830630458a0ef403ccbe19abe89d8405fd Mon Sep 17 00:00:00 2001 From: Bohdan Odintsov Date: Thu, 8 Jan 2026 10:19:29 +0200 Subject: [PATCH 6/6] fix(profile-information): fix orcid displayed on user profile --- .../profile-information.component.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/app/features/profile/components/profile-information/profile-information.component.ts b/src/app/features/profile/components/profile-information/profile-information.component.ts index 85a709f86..3304a8ce2 100644 --- a/src/app/features/profile/components/profile-information/profile-information.component.ts +++ b/src/app/features/profile/components/profile-information/profile-information.component.ts @@ -45,16 +45,7 @@ export class ProfileInformationComponent { orcidId = computed(() => { const orcid = this.currentUser()?.external_identity?.ORCID; - if (!orcid || !orcid.id) { - return undefined; - } - - const status = (orcid.status || '').toUpperCase(); - if (status !== 'VERIFIED') { - return undefined; - } - - return orcid.id; + return orcid?.status?.toUpperCase() === 'VERIFIED' ? orcid.id : undefined; }); toProfileSettings() {