Skip to content

ZCU-DATA/Author redirect to orcid#1295

Merged
milanmajchrak merged 4 commits into
customer/zcu-datafrom
zcu-data/author-orcid-hyperlink
May 26, 2026
Merged

ZCU-DATA/Author redirect to orcid#1295
milanmajchrak merged 4 commits into
customer/zcu-datafrom
zcu-data/author-orcid-hyperlink

Conversation

@Kasinhou
Copy link
Copy Markdown

@Kasinhou Kasinhou commented May 25, 2026

Problem description

The orcid script implementation was added dataquest-dev/DSpace#1317 but there should be icon next to author so it is possible to go directly to orcid url.

Sync verification

If en.json5 or cs.json5 translation files were updated:

  • Run yarn run sync-i18n -t src/assets/i18n/cs.json5 -i to synchronize messages, and changes are included in this PR.

Manual Testing (if applicable)

Copilot review

  • Requested review from Copilot

@Kasinhou Kasinhou requested review from Copilot and removed request for Copilot May 25, 2026 11:29
@Kasinhou Kasinhou requested a review from Copilot May 25, 2026 11:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a clickable ORCID icon/link next to authors so users can navigate directly to the ORCID profile page. Two rendering paths are updated: the generic PlainTextMetadataListElementComponent (authority-controlled publication metadata) and the CLARIN author preview (loadItemAuthors + clarin-item-author-preview template).

Changes:

  • PlainTextMetadataListElementComponent now injects ConfigurationDataService to read orcid.domain-url, detects ORCID-shaped authority values, and renders an external ORCID link with icon.
  • loadItemAuthors flags ORCID authorities and exposes isOrcid/orcidUrl on AuthorNameLink; the CLARIN author preview template renders a dedicated ORCID link beside each author.
  • New SCSS files style the ORCID link/icon in both components.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts Adds ORCID detection and URL builder driven by orcid.domain-url.
src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.html Wraps authority-controlled value in an ORCID anchor when applicable.
src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.scss New styling for the ORCID link/icon.
src/app/shared/clarin-shared-util.ts Detects ORCID authorities and populates isOrcid/orcidUrl; also changes search-link construction.
src/app/shared/clarin-item-box-view/clarin-author-name-link.model.ts Adds optional isOrcid/orcidUrl fields.
src/app/shared/clarin-item-author-preview/clarin-item-author-preview.component.html Renders a separate ORCID profile link/icon next to each author.
src/app/shared/clarin-item-author-preview/clarin-item-author-preview.component.scss Adds ORCID icon/link styling.
Comments suppressed due to low confidence (2)

src/app/shared/clarin-shared-util.ts:80

  • The authority-based search behavior has been silently dropped. Previously, when authorMV.authority was set, the author search link used f.author=<authority>,authority; now every link always uses f.author=<value>,equals, even for non-ORCID authority-controlled values. This is unrelated to the ORCID redirect feature and changes search results for all authority-controlled authors. Please preserve the original authority/equals branch and only override link construction for the new ORCID icon, or explicitly justify this behavior change.
    let isOrcid = false;
    let orcidUrl: string;
    if (authorMV.authority) {
      const authority = String(authorMV.authority).trim();
      if (ORCID_ID_PATTERN.test(authority)) {
        orcidUrl = 'https://orcid.org/' + authority;
        isOrcid = true;
      } else if (ORCID_URL_PATTERN.test(authority)) {
        orcidUrl = authority;
        isOrcid = true;
      }
    }
    const authorSearchLink = baseUrl + '/search?f.author=' + encodeURIComponent(authorMV.value) + ',equals';

src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts:52

  • take(1) is redundant here: getFirstCompletedRemoteData() already applies take(1) internally (see src/app/core/shared/operators.ts:41). Please remove the extra take(1) to match the convention used elsewhere in the codebase.
    this.configurationService.findByPropertyName('orcid.domain-url').pipe(
      getFirstCompletedRemoteData(),
      take(1),
    ).subscribe((rd) => {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app/shared/clarin-shared-util.ts Outdated
@milanmajchrak milanmajchrak self-requested a review May 25, 2026 12:48
Comment thread src/app/shared/clarin-shared-util.ts Outdated
Comment thread src/app/shared/clarin-shared-util.ts Outdated
Comment thread src/app/shared/clarin-shared-util.ts Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Comment thread src/app/shared/clarin-shared-util.ts Outdated
…L handling

- clarin-shared-util: use ',authority' operator when authority is present (regression fix); only fall back to ',equals' when no authority.

- plain-text-metadata-list-element: accept full ORCID profile URLs without requiring orcid.domain-url config; bare ORCID iDs still need the domain to be expanded.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

@milanmajchrak milanmajchrak merged commit 91520e6 into customer/zcu-data May 26, 2026
6 checks passed
@Kasinhou Kasinhou self-assigned this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants