Skip to content

feat(website): show SeqSet citation formats on the page instead of in a modal - #7038

Draft
corneliusroemer wants to merge 1 commit into
mainfrom
feat/seqset-citation-tabs
Draft

feat(website): show SeqSet citation formats on the page instead of in a modal#7038
corneliusroemer wants to merge 1 commit into
mainfrom
feat/seqset-citation-tabs

Conversation

@corneliusroemer

@corneliusroemer corneliusroemer commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Claude-generated PR - not much thought has gone into this but it's a quick proof of concept to see if we like this direction.

Screenshots

Google Chrome 2026-08-05 17 49 42

The APA / MLA / BibTeX citations for a SeqSet were only reachable by opening
the "Export / Cite" modal, so a visitor landing on e.g.
/seqsets/PP_SS_1915.1 had no way to see how to cite the SeqSet without
knowing to click Export first.

Move the citation formats out of the modal and onto the SeqSet page as a
"How to cite" section with one tab per format (APA by default, then MLA and
BibTeX), placed directly under the Details / Citations grid and above
Statistics. The existing "Citations" section means cited by, so the two
are kept visually distinct. The modal keeps the JSON/TSV download only and
its heading and trigger button are renamed from "Export / Cite" to
"Export".

Implementation notes:

  • The citation string building is extracted from ExportSeqSet into a pure
    citationFormats.ts module with unit tests, mirroring the existing
    formatCitationContributors.ts / .spec.ts pattern in this directory.
  • The no-DOI fallback URL previously came from window.location.href. That
    was only safe because Headless UI does not render closed-dialog children;
    an always-rendered citation box would hit window during the SSR pass of
    the client:load island. The canonical absolute URL is now computed in
    [seqSetId].[version].astro and passed in as a prop, which also means the
    citation always points at the versioned page even when the visitor
    arrived via the unversioned redirect.
  • Tabs reuse the existing BoxWithTabs components, whose Button is already
    gated on hydration, so no new Playwright race is introduced.
  • The seqset page object asserts the citation formats are visible on the
    page and that switching to the BibTeX tab works. Its existing
    getByRole('button', { name: 'Export' }) lookups still match the renamed
    button, and no on-page control uses "Download" or "Export" in its
    accessible name, so closeModal()'s hidden-Download assertion is
    unaffected.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: https://feat-seqset-citation-tabs.loculus.org

… a modal

The APA / MLA / BibTeX citations for a SeqSet were only reachable by opening
the "Export / Cite" modal, so a visitor landing on e.g.
/seqsets/PP_SS_1915.1 had no way to see how to cite the SeqSet without
knowing to click Export first.

Move the citation formats out of the modal and onto the SeqSet page as a
"How to cite" section with one tab per format (APA by default, then MLA and
BibTeX), placed directly under the Details / Citations grid and above
Statistics. The existing "Citations" section means *cited by*, so the two
are kept visually distinct. The modal keeps the JSON/TSV download only and
its heading and trigger button are renamed from "Export / Cite" to
"Export".

Implementation notes:

- The citation string building is extracted from ExportSeqSet into a pure
  citationFormats.ts module with unit tests, mirroring the existing
  formatCitationContributors.ts / .spec.ts pattern in this directory.
- The no-DOI fallback URL previously came from window.location.href. That
  was only safe because Headless UI does not render closed-dialog children;
  an always-rendered citation box would hit `window` during the SSR pass of
  the client:load island. The canonical absolute URL is now computed in
  [seqSetId].[version].astro and passed in as a prop, which also means the
  citation always points at the versioned page even when the visitor
  arrived via the unversioned redirect.
- Tabs reuse the existing BoxWithTabs components, whose Button is already
  gated on hydration, so no new Playwright race is introduced.
- The seqset page object asserts the citation formats are visible on the
  page and that switching to the BibTeX tab works. Its existing
  `getByRole('button', { name: 'Export' })` lookups still match the renamed
  button, and no on-page control uses "Download" or "Export" in its
  accessible name, so `closeModal()`'s hidden-Download assertion is
  unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@corneliusroemer corneliusroemer added website Tasks related to the web application preview Triggers a deployment to argocd labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Triggers a deployment to argocd website Tasks related to the web application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant