Skip to content

Conversation

@fengelniederhammer
Copy link
Contributor

resolves #981

Summary

Screenshot

PR Checklist

- [ ] All necessary documentation has been adapted.

  • The implemented feature is covered by an appropriate test.

@vercel
Copy link

vercel bot commented Dec 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
dashboards Ready Ready Preview, Comment Dec 19, 2025 9:49am

@fengelniederhammer fengelniederhammer linked an issue Dec 19, 2025 that may be closed by this pull request
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the COVID "compare side-by-side" page by migrating from Astro-based rendering to a React-based component architecture. The changes centralize the page logic into a reusable generic component while maintaining organism-specific functionality.

  • Replaces 130+ lines of inline Astro code with a generic component pattern
  • Moves the relative growth advantage visualization to the shared component with organism-specific rendering
  • Simplifies the page entry point to a single component instantiation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
website/src/pages/covid/compare-side-by-side.astro Replaced inline implementation with GenericCompareSideBySidePage component call
website/src/components/views/compareSideBySide/GenericCompareSideBySideDataDisplay.tsx Added organism-specific conditional rendering for GsRelativeGrowthAdvantage component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines -40 to -45
const numeratorFilter = {
...variantFilter.lineages,
...variantFilter.mutations,
variantQuery: variantFilter.variantQuery,
...baselineLapisFilter,
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was another difference to the generic page - but I think the logic is already handled by this:

export function toLapisFilterWithVariant({ variantFilter, datasetFilter, additionalFilters }: FilterData) {
if (variantFilter.variantQuery) {
return {
...toLapisFilterWithoutVariant(datasetFilter, additionalFilters),
variantQuery: variantFilter.variantQuery,
};
} else {
return {
...toLapisFilterWithoutVariant(datasetFilter, additionalFilters),
...variantFilter.lineages,
...variantFilter.mutations,
advancedQuery: concatenateAdvancedQueries(datasetFilter.advancedQuery, variantFilter.advancedQuery),
};
}
}

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.

Migrate Covid "compare side-by-side" page to React

2 participants