From 4e12144c91c66d6f35bdd778dcad242fbfe167fc Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 10:59:56 -0600 Subject: [PATCH 01/12] PD-5746 Set title --- src/assets/print-view/fetch-orcid.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index 5fb372077..9e4ebfdd4 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -46,6 +46,7 @@ const STRINGS = { loadingRecord: $localize`:@@printView.loadingRecord:Loading ORCID record...`, recordNotFound: $localize`:@@printView.recordNotFound:Record data was not found in ORCID response.`, redirectingToPrimary: $localize`:@@printView.redirectingToPrimary:Redirecting to primary ORCID record…`, + orcidPrintView: $localize`:@@printView.orcidPrintView:ORCID Print view`, } const ORCID_REGEX = /\b\d{4}-\d{4}-\d{4}-\d{3}[\dX]\b/i @@ -258,6 +259,11 @@ function jsonOrcidUri(orcidIdentifier) { return uri || (path ? `https://orcid.org/${path}` : '') } +function setTitle(recordJson, chosenName) { + const orcidId = jsonText(recordJson?.['orcid-identifier']?.path) + document.title = `${chosenName} (${orcidId}) - ${STRINGS.orcidPrintView}` +} + function renderIdentityFromJson(recordJson) { const person = recordJson?.person const name = person?.name @@ -267,6 +273,8 @@ function renderIdentityFromJson(recordJson) { const fullName = [given, family].filter(Boolean).join(' ') const chosenName = credit || fullName || STRINGS.unnamedProfile + setTitle(recordJson, chosenName) + const container = document.createElement('article') container.className = 'cv-container' container.setAttribute('aria-label', `${chosenName} ORCID profile`) From 620ae4061b75730e90f8af512b6a90be1ea513fb Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 11:11:16 -0600 Subject: [PATCH 02/12] PD-5753 increase logo size --- src/assets/print-view/cv-style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/print-view/cv-style.css b/src/assets/print-view/cv-style.css index d62c7c4b3..7ce4bd91c 100644 --- a/src/assets/print-view/cv-style.css +++ b/src/assets/print-view/cv-style.css @@ -144,8 +144,8 @@ button:hover { } .orcid-id img { - width: 24px; - height: 24px; + width: 32px; + height: 32px; } a { From e173e4b8f838a0c022ca6ceca28b4b3beb1cb192 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 11:15:40 -0600 Subject: [PATCH 03/12] PD-5745 Fix private names placeholder --- src/assets/print-view/fetch-orcid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index 3a6fd7167..0ed8f1047 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -15,7 +15,7 @@ if (typeof $localize === 'undefined') { // All user-visible strings. Values are replaced per-locale by the Angular localize pipeline at build time. const STRINGS = { - unnamedProfile: $localize`:@@printView.unnamedProfile:Unnamed ORCID profile`, + unnamedProfile: $localize`:@@printView.unnamedProfile:Name is private`, orcidIdAlt: $localize`:@@printView.orcidIdAlt:ORCID iD`, biography: $localize`:@@printView.biography:Biography`, personalInformation: $localize`:@@printView.personalInformation:Personal information`, From efcb7f10752c64427ce681701209387b4ca5b740 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 11:22:44 -0600 Subject: [PATCH 04/12] PD-5744 when the credit name is provided, use the family name in the other names list --- src/assets/print-view/fetch-orcid.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index 0ed8f1047..41d124141 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -277,6 +277,7 @@ function renderIdentityFromJson(recordJson) { const fullName = [given, family].filter(Boolean).join(' ') const chosenName = credit || fullName || STRINGS.unnamedProfile + // Set the page title setTitle(recordJson, chosenName) const container = document.createElement('article') @@ -291,6 +292,11 @@ function renderIdentityFromJson(recordJson) { const otherNames = jsonList(person?.['other-names']?.['other-name']) .map((n) => jsonText(n?.content)) .filter(Boolean) + + if (credit && fullName) { + otherNames.unshift(fullName) + } + if (otherNames.length) { const namesLine = document.createElement('p') namesLine.className = 'other-names' From b1e8fcbe77b0cbc54925b3ccd6e509cda258fb2b Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 14:04:10 -0600 Subject: [PATCH 05/12] PD-5747 Fix display of other ids --- src/assets/print-view/fetch-orcid.js | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index 41d124141..c57516e93 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -419,7 +419,7 @@ function renderPersonalInfoFromJson(recordJson, container) { const lines = externalIds.map((entry) => { const label = entry.type || 'Identifier' const value = entry.value || entry.url || '' - return textLineNode(label, value, entry.url) + return otherIdsNode(label, value, entry.url) }) appendList(block, lines) blocks.push(block) @@ -485,6 +485,32 @@ function textLineNode(label, value, url) { } return wrapper } + +function otherIdsNode(label, value, url) { + const wrapper = document.createElement('p') + wrapper.className = 'line' + if (label) { + const prefix = document.createElement('span') + prefix.className = 'line-label' + prefix.textContent = `${label}: ` + wrapper.appendChild(prefix) + } + + wrapper.appendChild(document.createTextNode(value)) + + const safeUrl = sanitizeUrl(url) + if (safeUrl) { + wrapper.appendChild(document.createTextNode(' ')) + const a = document.createElement('a') + a.href = safeUrl + a.target = '_blank' + a.rel = 'noopener noreferrer' + a.textContent = safeUrl + wrapper.appendChild(a) + } + return wrapper +} + function safeTextNode(value) { return (value || '').replace(/\s+/g, ' ').trim() } From 9eb22b059dc70913ed6d02a028011661c28b23e1 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 15:14:54 -0600 Subject: [PATCH 06/12] PD-5746 Working on ids --- src/assets/print-view/fetch-orcid.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index c57516e93..3ce0a26fa 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -600,6 +600,9 @@ function composeActivityEntryFromJson(entry, opts = {}) { idRel && idRel.toLowerCase() !== 'self' ? `${idRel} ${idType}` : idType || STRINGS.identifier + ///////////////////////////////////////////////////////////////////////////////// + //---- This should be formatted as a identifier URL, like the other ids as well + ///////////////////////////////////////////////////////////////////////////////// wrapper.appendChild(textLineNode(label, idValue || idUrl || '', idUrl)) }) } From 43f3863335d32b6d3f624d3151184aaa5c2b5fee Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 15:35:38 -0600 Subject: [PATCH 07/12] PD-5749 display inline external identifiers for activities --- src/assets/print-view/fetch-orcid.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index 3ce0a26fa..5e0370beb 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -419,7 +419,7 @@ function renderPersonalInfoFromJson(recordJson, container) { const lines = externalIds.map((entry) => { const label = entry.type || 'Identifier' const value = entry.value || entry.url || '' - return otherIdsNode(label, value, entry.url) + return otherIdsTextNode(label, value, entry.url) }) appendList(block, lines) blocks.push(block) @@ -486,7 +486,7 @@ function textLineNode(label, value, url) { return wrapper } -function otherIdsNode(label, value, url) { +function otherIdsTextNode(label, value, url) { const wrapper = document.createElement('p') wrapper.className = 'line' if (label) { @@ -600,10 +600,7 @@ function composeActivityEntryFromJson(entry, opts = {}) { idRel && idRel.toLowerCase() !== 'self' ? `${idRel} ${idType}` : idType || STRINGS.identifier - ///////////////////////////////////////////////////////////////////////////////// - //---- This should be formatted as a identifier URL, like the other ids as well - ///////////////////////////////////////////////////////////////////////////////// - wrapper.appendChild(textLineNode(label, idValue || idUrl || '', idUrl)) + wrapper.appendChild(otherIdsTextNode(label, idValue || idUrl || '', idUrl)) }) } From e1edc7b503aa57efdabc0227ccb3aa5ab91a15b1 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 16:15:25 -0600 Subject: [PATCH 08/12] PD-5751 Works only display the first element --- src/assets/print-view/fetch-orcid.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index f7a04e31d..090fe49cf 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -690,10 +690,12 @@ function renderEducationsAndQualifications(activities, section) { } function renderWorks(activities, section) { + const workSummaries = [] // Works: activities-summary.works.group[].work-summary[] - const workSummaries = (activities?.works?.group || []).flatMap( - (g) => g?.['work-summary'] || [] - ) + for(const group of activities?.works?.group || []) { + workSummaries.push(group['work-summary'][0]) + } + hasContent = false hasContent = renderActivityGroupFromJson(section, STRINGS.works, workSummaries, (w) => From 48e31c04f3a3fa3ae4eb7b3e5b147ccfea1c8809 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 16:23:39 -0600 Subject: [PATCH 09/12] PD-5751 Funding and research resources display only the first element per group --- src/assets/print-view/fetch-orcid.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index 090fe49cf..cc58cff04 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -813,13 +813,15 @@ function renderProfessionalActivities(activities, section) { } function renderFundings(activities, section) { - // Fundings: activitiesSummary.fundings.group[].activities[] - const fundings = (activities?.fundings?.group || []).flatMap( - (g) => g?.['funding-summary'] || [] - ) + const fundingSummaries = [] + // Works: activities-summary.works.group[].work-summary[] + for(const group of activities?.fundings?.group || []) { + fundingSummaries.push(group['funding-summary'][0]) + } + hasContent = false hasContent = - renderActivityGroupFromJson(section, STRINGS.fundings, fundings, (f) => + renderActivityGroupFromJson(section, STRINGS.fundings, fundingSummaries, (f) => composeActivityEntryFromJson(f, { title: jsonText(f?.title?.title) }) ) || hasContent return hasContent @@ -827,16 +829,18 @@ function renderFundings(activities, section) { function renderResearchResources(activities, section) { // Research resources: activities.research-resources.group.research-resource-summary - const researchResources = ( - activities?.['research-resources']?.group || [] - ).flatMap((g) => g?.['research-resource-summary'] || []) + const researchResourceSummaries = [] + // Works: activities-summary.works.group[].work-summary[] + for(const group of activities?.['research-resources']?.group || []) { + researchResourceSummaries.push(group['research-resource-summary'][0]) + } hasContent = false hasContent = renderActivityGroupFromJson( section, STRINGS.researchResources, - researchResources, + researchResourceSummaries, (r) => composeActivityEntryFromJson(r, { title: From 025fb375beafbe53200a27c120ef5dafc1f0a59a Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 16:30:30 -0600 Subject: [PATCH 10/12] PD-5670 run formatter --- src/assets/print-view/fetch-orcid.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index cc58cff04..b83e8b32a 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -604,7 +604,9 @@ function composeActivityEntryFromJson(entry, opts = {}) { idRel && idRel.toLowerCase() !== 'self' ? `${idRel} ${idType}` : idType || STRINGS.identifier - wrapper.appendChild(otherIdsTextNode(label, idValue || idUrl || '', idUrl)) + wrapper.appendChild( + otherIdsTextNode(label, idValue || idUrl || '', idUrl) + ) }) } @@ -692,7 +694,7 @@ function renderEducationsAndQualifications(activities, section) { function renderWorks(activities, section) { const workSummaries = [] // Works: activities-summary.works.group[].work-summary[] - for(const group of activities?.works?.group || []) { + for (const group of activities?.works?.group || []) { workSummaries.push(group['work-summary'][0]) } @@ -815,14 +817,18 @@ function renderProfessionalActivities(activities, section) { function renderFundings(activities, section) { const fundingSummaries = [] // Works: activities-summary.works.group[].work-summary[] - for(const group of activities?.fundings?.group || []) { + for (const group of activities?.fundings?.group || []) { fundingSummaries.push(group['funding-summary'][0]) } hasContent = false hasContent = - renderActivityGroupFromJson(section, STRINGS.fundings, fundingSummaries, (f) => - composeActivityEntryFromJson(f, { title: jsonText(f?.title?.title) }) + renderActivityGroupFromJson( + section, + STRINGS.fundings, + fundingSummaries, + (f) => + composeActivityEntryFromJson(f, { title: jsonText(f?.title?.title) }) ) || hasContent return hasContent } @@ -831,7 +837,7 @@ function renderResearchResources(activities, section) { // Research resources: activities.research-resources.group.research-resource-summary const researchResourceSummaries = [] // Works: activities-summary.works.group[].work-summary[] - for(const group of activities?.['research-resources']?.group || []) { + for (const group of activities?.['research-resources']?.group || []) { researchResourceSummaries.push(group['research-resource-summary'][0]) } From 5385d31b530fe97c810fbaa364bf093c53ca644c Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 17:15:48 -0600 Subject: [PATCH 11/12] PD-5752 peer review title should be strong --- src/assets/print-view/fetch-orcid.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index b83e8b32a..74969ab99 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -891,7 +891,10 @@ function renderPeerReviews(activities, section) { for (publication of sortedPublications || []) { const numberOfPublications = peerReviewsPerPublication.get(publication) const li = document.createElement('li') - li.textContent = publication + '(' + numberOfPublications + ')' + const strong = document.createElement('strong') + strong.textContent = publication + li.appendChild(strong) + li.appendChild(document.createTextNode(' (' + numberOfPublications + ')')) list.appendChild(li) } block.appendChild(list) From 22797101b8cdcd2a018144652736713b33dccdf7 Mon Sep 17 00:00:00 2001 From: amontenegro Date: Tue, 16 Jun 2026 17:21:25 -0600 Subject: [PATCH 12/12] PD-0000 remove comments --- src/assets/print-view/fetch-orcid.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index 74969ab99..ac028b554 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -816,7 +816,6 @@ function renderProfessionalActivities(activities, section) { function renderFundings(activities, section) { const fundingSummaries = [] - // Works: activities-summary.works.group[].work-summary[] for (const group of activities?.fundings?.group || []) { fundingSummaries.push(group['funding-summary'][0]) } @@ -836,7 +835,6 @@ function renderFundings(activities, section) { function renderResearchResources(activities, section) { // Research resources: activities.research-resources.group.research-resource-summary const researchResourceSummaries = [] - // Works: activities-summary.works.group[].work-summary[] for (const group of activities?.['research-resources']?.group || []) { researchResourceSummaries.push(group['research-resource-summary'][0]) }