Skip to content

CLARIN-DSpace v9/Port #1339 + #1337 (ROR display surfaces + i18n labels) to the v9 base - #1400

Open
milanmajchrak wants to merge 1 commit into
dtq-dev-9-basefrom
ufal/port-post-snapshot-fe3-9-base
Open

CLARIN-DSpace v9/Port #1339 + #1337 (ROR display surfaces + i18n labels) to the v9 base#1400
milanmajchrak wants to merge 1 commit into
dtq-dev-9-basefrom
ufal/port-post-snapshot-fe3-9-base

Conversation

@milanmajchrak

Copy link
Copy Markdown
Collaborator

Tranža FE-3 (Vlna 3) — ROR display cluster (FE side)

Per CLARIN_V9_POST_SNAPSHOT_SYNC_PLAN.md §4 Vlna 3 / FE-3. Pairs with the already-merged BE-3 #1381 (SimpleRORAuthority) — so the feature is live-verifiable on dev-6.

a9fc7f538b (#1339) — authority-based publisher links + ROR icon — ADAPT

When dc.publisher/creativework.publisher carries an authority (a ROR ID from BE SimpleRORAuthority), the CLARIN item-page untyped field and the search-result card build the discovery link as f.publisher=<authority>,authority (not ,equals) and render a ROR icon.

  • New shared helper buildAuthoritySearchFilter() centralises the authority-vs-equals logic; loadItemAuthors refactored onto it (behaviour-preserving).
  • getLinkToSearch resolves the full MetadataValue via allMetadata()[index]; getMetadataValue removed.
  • [href][attr.href] on the box-view publisher anchor (no transient link to undefined before assignBaseUrl resolves).

0ac3e53c8e (#1337) — ROR i18n labels — PORT

form.other-information.ror-id / .location added to en.json5 + cs.json5.

v9 adaptations

  • Templates *ngIf@if (v9 is @if-migrated); BS4 ml-1 → BS5 ms-1.
  • Did not drag in the fork pre-image's metadataLangToBcp47 (from the not-yet-ported a11y commit d154682).
  • ror-icon.svg: kept the vanilla blob 24735df519 (add/add collision), not the fork blob.
  • i18n placement: location before orcid, ror-id after orcid (en) / after other-names (cs).

Local gates (on 16090f6386) — GREEN

  • Karma 24/24: shared-util 7 (buildAuthoritySearchFilter + convertMetadataFieldIntoSearchType), generic-item-field 7 (incl. AC5 negative-icon test: no ROR icon on dc.subject), box-view 10 (authority/equals links, ROR icon show/hide).
  • npm run lint:nobuild: 0 errors.
  • build:prod → CI (local disk constrained on the dev host).
  • All 3 specs were dropped by the v9 squash and are restored here, adapted to standalone TestBed.
  • Live ROR display (icon + ,authority link) → dev-6 check with enable-ror.cfg ON.

🤖 Generated with Claude Code

…labels (#1339, #1337)

ADAPT port of the dtq-dev ROR display cluster (FE side of the ROR feature):
- a9fc7f5 (#1339): authority-based publisher search links + ROR icon on the
  CLARIN item page untyped field and the search-result card.
- 0ac3e53 (#1337): form.other-information.ror-id / .location i18n labels.

Runtime:
- clarin-shared-util.ts: new buildAuthoritySearchFilter(searchType, mdValue) centralises
  the authority-vs-equals operator logic; loadItemAuthors refactored onto it
  (behaviour-preserving). isEmpty added to the empty.util import.
- clarin-generic-item-field: getLinkToSearch rewritten to resolve the full MetadataValue
  via allMetadata()[index] (so a ROR authority is used); getMetadataValue removed. HTML:
  ROR <img> added inside the type==='search' anchor, guarded by
  mdValue.authority && fields includes dc.publisher/creativework.publisher.
- clarin-item-box-view: publisherMd via allMetadata(['dc.publisher','creativework.publisher']);
  hasPublisherRorAuthority flag; publisherRedirectLink via the helper. HTML: [href]->[attr.href]
  (no transient broken link before assignBaseUrl resolves) + @if(hasPublisherRorAuthority) ROR icon.

v9 adaptations:
- Templates rewritten to @if (v9 is @if-migrated; fork used *ngIf); BS4 ml-1 -> BS5 ms-1.
- item-box-view: did NOT drag in the fork pre-image's metadataLangToBcp47 line (that comes
  from the not-yet-ported a11y commit d154682).
- ror-icon.svg: kept the existing vanilla blob (24735df), NOT the fork blob (add/add).
- i18n: location BEFORE orcid, ror-id AFTER orcid (en) / AFTER other-names (cs), commented-
  English + Czech pair convention. Hand-merged into the CLARIN-modified json5.
- Specs (all 3 dropped by the v9 squash) restored & adapted to standalone TestBed:
  clarin-shared-util.spec.ts (7 tests), clarin-generic-item-field.component.spec.ts
  (7 tests incl. the AC5 negative-icon rendering test: no ROR icon on dc.subject),
  clarin-item-box-view.component.spec.ts (10 tests, +provideRouter for the standalone
  routerLink). Karma: 24/24 green. lint:nobuild: 0 errors.

Cluster: BE 00501a2db0 (SimpleRORAuthority) is already deployed (merged BE-3 #1381), so the
feature is live-verifiable. Without an authority the FE degrades to the equals fallback.

Fulfils CLARIN_V9_POST_SNAPSHOT_SYNC_ACCEPTANCE.md §5 / a9fc7f5 + 0ac3e53 (FE-3, Vlna 3).
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.

1 participant