From 3cad2a1048591b58c9290bcecfb8e8291ce65e53 Mon Sep 17 00:00:00 2001 From: Taslan Graham Date: Fri, 17 Jan 2025 10:55:05 -0500 Subject: [PATCH] pkp/pkp-lib#10792 Update ORCiD brand guideline --- .../Form/fields/FieldOrcid.stories.js | 3 +++ src/components/Form/fields/FieldOrcid.vue | 19 ++++++++++--- src/components/Form/mocks/field-orcid.js | 1 + src/components/Icon/Icon.stories.js | 1 + src/components/Icon/Icon.vue | 2 ++ .../Icon/icons/OrcidUnauthenticated.vue | 27 +++++++++++++++++++ .../contributors/ContributorsListPanel.vue | 1 + .../users/SelectReviewerListItem.vue | 8 ++++-- .../users/SelectReviewerListPanel.stories.js | 1 + src/mocks/authors.js | 1 + 10 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 src/components/Icon/icons/OrcidUnauthenticated.vue diff --git a/src/components/Form/fields/FieldOrcid.stories.js b/src/components/Form/fields/FieldOrcid.stories.js index 2bca8bd31..d54f1dc20 100644 --- a/src/components/Form/fields/FieldOrcid.stories.js +++ b/src/components/Form/fields/FieldOrcid.stories.js @@ -52,6 +52,7 @@ export const WithOrcid = { ...FieldBaseMock, ...FieldOrcidMock, orcid: 'https://sandbox.orcid.org/0009-0009-3222-5777', + orcidDisplayValue: 'https://sandbox.orcid.org/0009-0009-3222-5777', isVerified: true, }, }; @@ -61,5 +62,7 @@ export const WithUnverifiedOrcid = { ...FieldBaseMock, ...FieldOrcidMock, orcid: 'https://sandbox.orcid.org/0009-0009-3222-5777', + orcidDisplayValue: + 'https://sandbox.orcid.org/0009-0009-3222-5777 (unauthenticated)', }, }; diff --git a/src/components/Form/fields/FieldOrcid.vue b/src/components/Form/fields/FieldOrcid.vue index 9c2f566a8..e23b6fa09 100644 --- a/src/components/Form/fields/FieldOrcid.vue +++ b/src/components/Form/fields/FieldOrcid.vue @@ -27,10 +27,18 @@ class="h-6 w-6" :inline="true" /> + +
tag for HTML display * @returns {string} */ - orcidDisplayValue: function () { + orcidDisplayText: function () { if (this.hasOrcid) { - return `${this.orcidValue}`; + return `${this.orcidDisplayValue}`; } else { return this.orcidValue; } diff --git a/src/components/Form/mocks/field-orcid.js b/src/components/Form/mocks/field-orcid.js index a08ab562b..83ce930c4 100644 --- a/src/components/Form/mocks/field-orcid.js +++ b/src/components/Form/mocks/field-orcid.js @@ -3,6 +3,7 @@ export default { component: 'field-orcid', label: 'ORCID', orcid: '', + orcidDisplayValue: '', authorId: 1, tooltip: 'ORCID is an independent non-profit organization that provides a persistent identifier – an ORCID iD – that distinguishes you from other researchers and a mechanism for linking your research outputs and activities to your iD. ORCID is integrated into many systems used by publishers, funders, institutions, and other research-related services. Learn more at https://orcid.org.', diff --git a/src/components/Icon/Icon.stories.js b/src/components/Icon/Icon.stories.js index 1dae02bac..94a32dcb4 100644 --- a/src/components/Icon/Icon.stories.js +++ b/src/components/Icon/Icon.stories.js @@ -137,6 +137,7 @@ export const IconGallery = { 'NotVisible', 'OpenReview', 'Orcid', + 'OrcidUnauthenticated', 'Overdue', 'Paste', 'Payment', diff --git a/src/components/Icon/Icon.vue b/src/components/Icon/Icon.vue index 50eb769c2..7bcddf37a 100644 --- a/src/components/Icon/Icon.vue +++ b/src/components/Icon/Icon.vue @@ -85,6 +85,7 @@ import Notifications from './icons/Notifications.vue'; import NotVisible from './icons/NotVisible.vue'; import OpenReview from './icons/OpenReview.vue'; import Orcid from './icons/Orcid.vue'; +import OrcidUnauthenticated from './icons/OrcidUnauthenticated.vue'; import Overdue from './icons/Overdue.vue'; import Paste from './icons/Paste.vue'; import Payment from './icons/Payment.vue'; @@ -228,6 +229,7 @@ const svgIcons = { User, View, Workflow, + OrcidUnauthenticated, }; const props = defineProps({ diff --git a/src/components/Icon/icons/OrcidUnauthenticated.vue b/src/components/Icon/icons/OrcidUnauthenticated.vue new file mode 100644 index 000000000..8bfb03fd6 --- /dev/null +++ b/src/components/Icon/icons/OrcidUnauthenticated.vue @@ -0,0 +1,27 @@ + diff --git a/src/components/ListPanel/contributors/ContributorsListPanel.vue b/src/components/ListPanel/contributors/ContributorsListPanel.vue index ec832a321..129f15629 100644 --- a/src/components/ListPanel/contributors/ContributorsListPanel.vue +++ b/src/components/ListPanel/contributors/ContributorsListPanel.vue @@ -392,6 +392,7 @@ export default { if (field.name === 'orcid') { field.orcid = author['orcid'] ?? ''; field.authorId = author['id']; + field.orcidDisplayValue = author['orcidDisplayValue']; field.isVerified = author['orcidIsVerified'] ?? false; field.orcidVerificationRequested = author['orcidVerificationRequested']; diff --git a/src/components/ListPanel/users/SelectReviewerListItem.vue b/src/components/ListPanel/users/SelectReviewerListItem.vue index 2be349893..24ebfe3f4 100644 --- a/src/components/ListPanel/users/SelectReviewerListItem.vue +++ b/src/components/ListPanel/users/SelectReviewerListItem.vue @@ -45,8 +45,12 @@ class="listPanel__item--reviewer__orcid" target="_blank" > - - {{ item.orcid }} + + {{ item.orcidDisplayValue }}
diff --git a/src/components/ListPanel/users/SelectReviewerListPanel.stories.js b/src/components/ListPanel/users/SelectReviewerListPanel.stories.js index 8f1cebe10..2215596fc 100644 --- a/src/components/ListPanel/users/SelectReviewerListPanel.stories.js +++ b/src/components/ListPanel/users/SelectReviewerListPanel.stories.js @@ -34,6 +34,7 @@ const items = [ dateLastReviewAssignment: '2022-12-31 11:22:42', reviewerRating: 5, orcid: 'http://orcid.org/0000-0002-1825-0097', + orcidDisplayValue: 'http://orcid.org/0000-0002-1825-0097', biography: { en: '

Professor Aisla McCrae is a senior research fellow in the Publishing Studies Department in the School of Publishing at the University of Manitoba. She is the deputy chair of the Manitoba Publishing Institute and the author of Publishing Now and Forever: Recent Developments in Archival Permanence.

', }, diff --git a/src/mocks/authors.js b/src/mocks/authors.js index 08e1b0813..c08ba9d33 100644 --- a/src/mocks/authors.js +++ b/src/mocks/authors.js @@ -47,6 +47,7 @@ export const lipsum = { id: 21, includeInBrowse: true, orcid: 'https://orcid.org/0000-0001-5756-5406', + orcidDisplayValue: 'https://orcid.org/0000-0001-5756-5406', preferredPublicName: { en: 'Dr. L. P. Ipsum', fr_CA: 'Dr F. L. P. Ipsum',