Skip to content

feat!(website): SeqSet details page graphs and layout updates #6173

Merged
tombch merged 58 commits intomainfrom
seqset-details-update
Apr 7, 2026
Merged

feat!(website): SeqSet details page graphs and layout updates #6173
tombch merged 58 commits intomainfrom
seqset-details-update

Conversation

@tombch
Copy link
Copy Markdown
Collaborator

@tombch tombch commented Mar 20, 2026

This PR addresses #5916 by adding configurable graphs for SeqSets, with preset graphs for collection dates, countries and use terms, as well as adding a few layout changes to the SeqSet details page generally. The graphs are made configurable under the seqSets section in the values.yaml.

A preview SeqSet can be found here: https://seqset-details-update.loculus.org/seqsets/LOC_SS_11.3

Breaking changes

  • The PR introduces a breaking change of switching the colors.cjs file into a colors.json file, which will need updating in Pathoplexus and other loculus instances. This is done to support the bar charts being themed correctly. The ChartJS library can't use tailwind classes for styling, and we don't want to hardcode any styles as these change between loculus instances. So I wanted to import colours directly from the colors.cjs file, but this is not easily imported (even when you get it working with require, it breaks in a build of the site). Switching the file to json means the colour can be imported directly and is added to the build.

Notes

  • If the SeqSet contains accessions across multiple organisms, these results are combined in a single aggregate.
  • The collection dates graph displays dates in a different format dependent on the time range. If the difference between the smallest and largest date is <= 60 days, it displays yyyy-mm-dd, if the range is <= 365 days, it displays yyyy-mm, if its a greater difference it displays dates as yyyy.
  • The collection countries graph displays the top ten hits, and groups the rest under a Other (n) value.

Screenshot

Existing SeqSet details page:

image

This PR changes it to:

image

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://seqset-details-update.loculus.org

@claude claude Bot added website Tasks related to the web application seqset Related to seqsets labels Mar 20, 2026
Comment thread website/src/components/common/BarPlot.tsx
@tombch tombch added the preview Triggers a deployment to argocd label Mar 20, 2026
Comment thread website/astro.config.mjs Outdated
## Summary
- Replaces `colors.cjs` with `colors.json`, which is natively importable
by both `require()` (Tailwind config) and ESM `import` (Astro/Vite)
- Removes the custom `inline-colors-cjs` Vite plugin and `createRequire`
workaround from `astro.config.mjs`
- Removes the `src/colors.ts` re-export wrapper (no longer needed)
- Updates `.dockerignore` allowlist accordingly

Net result: -20 lines of bridging code, same behavior.

## Test plan
- [ ] Verify Tailwind classes using `primary-*` colors still work (the
JSON is the same palette)
- [ ] Verify the SeqSet detail page bar charts still pick up the correct
color
- [ ] Verify Docker build still includes the color config

🤖 Generated with [Claude Code](https://claude.com/claude-code)

🚀 Preview: Add `preview` label to enable

Co-authored-by: theosanderson-agent <theo@theo.io>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread website/src/components/SeqSetCitations/getSeqSetStatistics.spec.ts
Comment thread website/src/components/SeqSetCitations/getSeqSetStatistics.spec.ts Outdated
Comment thread website/src/components/SeqSetCitations/SeqSetItemActions.tsx
Comment thread website/src/pages/seqsets/[seqSetId].[version].astro
Comment thread website/src/components/SeqSetCitations/SeqSetItem.tsx
Comment thread website/src/components/SeqSetCitations/SeqSetPlots.tsx Outdated
Comment thread website/src/components/SeqSetCitations/SeqSetPlots.tsx Outdated
Comment thread website/src/pages/seqsets/[seqSetId].[version].astro Outdated
Comment thread kubernetes/loculus/values.schema.json Outdated
Comment thread website/src/components/SeqSetCitations/getSeqSetStatistics.spec.ts Outdated
Copy link
Copy Markdown
Contributor

@anna-parker anna-parker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

As discussed lets add the multiple metadata fields option to the seqSet metadata table as well in a later PR :-)

@tombch tombch merged commit dc06ce8 into main Apr 7, 2026
43 checks passed
@tombch tombch deleted the seqset-details-update branch April 7, 2026 16:39
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 seqset Related to seqsets website Tasks related to the web application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants