ZCU-DATA/Author redirect to orcid#1295
Merged
milanmajchrak merged 4 commits intoMay 26, 2026
Merged
Conversation
There was a problem hiding this comment.
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:
PlainTextMetadataListElementComponentnow injectsConfigurationDataServiceto readorcid.domain-url, detects ORCID-shaped authority values, and renders an external ORCID link with icon.loadItemAuthorsflags ORCID authorities and exposesisOrcid/orcidUrlonAuthorNameLink; 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.authoritywas set, the author search link usedf.author=<authority>,authority; now every link always usesf.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 appliestake(1)internally (seesrc/app/core/shared/operators.ts:41). Please remove the extratake(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.
milanmajchrak
requested changes
May 25, 2026
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
yarn run sync-i18n -t src/assets/i18n/cs.json5 -ito synchronize messages, and changes are included in this PR.Manual Testing (if applicable)
Copilot review