151 support for ror identifiers#153
Open
amadulhaxxani wants to merge 7 commits into
Open
Conversation
fix(item-view): use authority value for publisher search links (ROR)
…t cards fix(search-results): use authority value for publisher links on result cards
feat(ror): add ROR icon to publisher links on item view and search cards
…rect fix(ror-itempage-search-results): put the image in the publisher redirect
fix(ror-icon): add icon in the item page
fix(lint): remove redundant type annotation for hasPublisherAuthority
There was a problem hiding this comment.
Pull request overview
Adds frontend support for ROR-backed publisher metadata by preserving and using authority values when building publisher search links, and by displaying a ROR icon when a publisher authority is present.
Changes:
- Add a ROR SVG icon asset and render it next to authority-backed publisher values.
- Update publisher search link construction to use
,authoritywith the authority ID instead of,equalswith the plain text value. - Update generic “search” item-field links to prefer
authoritywhen available.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/assets/images/ror-icon.svg | Adds a new ROR icon asset for display next to authority-backed publishers. |
| src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts | Detects publisher authority and builds publisher search links using authority when present. |
| src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html | Displays publisher link with optional ROR icon in search result cards. |
| src/app/item-page/simple/field-components/clarin-generic-item-field/clarin-generic-item-field.component.ts | Builds search links using authority operator when the metadata value has an authority. |
| src/app/item-page/simple/field-components/clarin-generic-item-field/clarin-generic-item-field.component.html | Shows a ROR icon next to authority-backed values in “search” fields. |
feat(ror): add ROR icon and authority-based publisher search links
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 frontend did not support ROR identifiers for publisher fields. While the author field (with ORCID) already used authority values for search links and displayed the ORCID icon, the publisher field only used plain text values for search links and had no visual indicator for ROR.
When the backend added ROR authority support, the publisher search link still used
equalsoperator with the text value, not theauthorityoperator with the ROR ID. The frontend also lacked a ROR icon to indicate that the publisher has a ROR authority.Analysis
The publisher field uses a different component and data-extraction path than the author field:
type="author"→ClarinItemAuthorPreviewComponent→loadItemAuthors→ iterates overitem.allMetadata(fields)(preservesauthority).type="search"→ inline*ngForloop inClarinGenericItemFieldComponent→getLinkToSearch()→ callsitem.firstMetadataValue()(losesauthority).As a result,
getLinkToSearchalways built the search URL with,equalsand never checked forauthority. The search result cards (usingds-clarin-item-box-view) also usedfirstMetadataValue()and ignoredauthority.Copilot review