Skip to content

Credit each source on study pages and stop showing CLOSER's logo - #1

Merged
ronnyTodgers merged 1 commit into
mainfrom
backport/search-catalog-attribution
Oct 8, 2026
Merged

ronnyTodgers merged 1 commit into
mainfrom
backport/search-catalog-attribution

Conversation

@ronnyTodgers

Copy link
Copy Markdown
Collaborator

Backport of harmonydata/meta#10 to the production frontend (harmonydata.ac.uk/search). The cherry-pick applied cleanly; the code is the same as in meta.

What this does

Source credits. Study pages show the credit line each source's terms require, one per source in extra_data.source, under "Available in Data Catalogs".

  • The wording comes from the source-terms review that followed CLOSER's 23 Sept email. Rows marked "required" are used verbatim.
  • Licence names link to the licence.

Logos.

  • CLOSER: no logo anywhere. Their terms require prior approval. This covers the catalogue card, the source filter chip (now a text chip), and link previews of CLOSER pages.
  • Other sources: catalogue cards use the site's favicon from Google's favicon service instead of the logo URLs baked into the index.

Config. The per-source rules live in src/config/sourceAttribution.ts, keyed by source_id. The attribution objects mirror the shape proposed for /discover/sources.

Checked

  • Dev server against the production API (harmonydataweaviate.azureedge.net), 1970 British Cohort Study on /discover:
    • the CLOSER card is text only and CLS shows its favicon
    • both credit lines render, with the NCGL link
    • the CLOSER filter chip shows as text
  • Production records have the same extra_data.source and includedInDataCatalog shape as beta.
  • tsc clean. eslint clean on the new files.

Merging deploys to GitHub Pages through deploy-discovery.yml.

🤖 Generated with Claude Code

Study pages now show the credit line each source's terms require, one per
source in extra_data.source, under the data catalogue cards. The wording
comes from the source-terms review (SOURCE_ATTRIBUTION_HANDOFF.md in
harmonydiscovery); rows marked "required" are used verbatim.

The per-source rules live in src/config/sourceAttribution.ts, keyed by
source_id. The attribution objects mirror the shape proposed for
/discover/sources, so the API can take this over later.

Logos:
- CLOSER: no logo. Their terms need prior approval to use it. This covers
  the catalogue card, the source filter chip and link previews of CLOSER
  pages, which were showing their favicon full size.
- Other sources' catalogue cards use the site favicon from Google's favicon
  service instead of the logo URLs baked into the index, two of which 404.
- logo_approved is false for every source until permissions come in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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