Skip to content

Conversation

@fengelniederhammer
Copy link
Contributor

resolves #979

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 10:18am

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 website to render the entire layout in React instead of using Astro for layout components. The change migrates multiple Astro components (.astro files) to React/TypeScript (.tsx files), consolidating rendering logic and enabling full React control over the component tree.

Key Changes:

  • Migrated layout components from Astro to React, including DataPageLayout, OrganismViewPageLayout, SingleVariantOrganismPageLayout, and footer components
  • Moved page state handling and logic from server-side Astro pages to client-side React components
  • Wrapped BaseLayout around React page components instead of nesting layouts

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
website/src/pages/swiss-wastewater/rsv.astro Wrapped DataPageLayout with BaseLayout, removed title prop from inner layout
website/src/pages/swiss-wastewater/flu.astro Wrapped DataPageLayout with BaseLayout, removed title prop from inner layout
website/src/pages/index.astro Updated import to use React version of DataInfo
website/src/pages/covid/single-variant.astro Replaced Astro layout with React component, moved all logic to CovidSingleVariantReactPage
website/src/layouts/base/footer/DataOriginLink.astro Removed Astro component (functionality moved to React)
website/src/layouts/base/footer/DataInfo.tsx Created React version of DataInfo with inline DataOriginLink component
website/src/layouts/base/footer/DataInfo.astro Removed Astro component (replaced by .tsx version)
website/src/layouts/OrganismPage/SingleVariantOrganismPageLayout.tsx Created React version accepting filters and dataDisplay as ReactNode props
website/src/layouts/OrganismPage/SingleVariantOrganismPageLayout.astro Removed Astro component (replaced by .tsx version)
website/src/layouts/OrganismPage/OrganismViewPageLayout.tsx Created React version wrapping children in DataPageLayout and gs-app
website/src/layouts/OrganismPage/OrganismViewPageLayout.astro Removed Astro component (replaced by .tsx version)
website/src/layouts/OrganismPage/LastUpdatedInfo.tsx Created React version using useQuery for client-side data fetching
website/src/layouts/OrganismPage/LastUpdatedInfo.astro Removed Astro component (replaced by .tsx version)
website/src/layouts/OrganismPage/DataPageLayout.tsx Created React version with query provider wrapper
website/src/layouts/OrganismPage/DataPageLayout.astro Removed Astro component (replaced by .tsx version)
website/src/layouts/OrganismPage/AccessionsDownloadButton.tsx Created React version using useModalRef hook
website/src/layouts/OrganismPage/AccessionsDownloadButton.astro Removed Astro component (replaced by .tsx version)
website/src/lapis/getLastUpdatedDate.ts Changed return type from undefined to null, updated logger import
website/src/lapis/getLastUpdatedDate.spec.ts Updated test assertions to expect null instead of undefined
website/src/components/views/wasap/WasapPage.tsx Added DataPageLayout wrapper with breadcrumbs and data origins
website/src/components/views/wasap/Wasap.astro Replaced DataPageLayout wrapper with BaseLayout
website/src/components/views/sequencingEfforts/GenericSequencingEffortsReactPage.tsx Created React component consolidating page state logic
website/src/components/views/sequencingEfforts/GenericSequencingEffortsPage.astro Simplified to render React component within BaseLayout
website/src/components/views/compareVariants/GenericCompareVariantsReactPage.tsx Created React component consolidating page state logic
website/src/components/views/compareVariants/GenericCompareVariantsPage.astro Simplified to render React component within BaseLayout
website/src/components/views/compareToBaseline/GenericCompareToBaselineReactPage.tsx Created React component consolidating page state logic
website/src/components/views/compareToBaseline/GenericCompareToBaselinePage.astro Simplified to render React component within BaseLayout
website/src/components/views/compareSideBySide/GenericCompareSideBySideReactPage.tsx Created React component consolidating page state logic
website/src/components/views/compareSideBySide/GenericCompareSideBySidePage.astro Simplified to render React component within BaseLayout
website/src/components/views/analyzeSingleVariant/GenericAnalyzeSingleVariantPage.astro Simplified to render React component within BaseLayout
website/src/components/views/analyzeSingleVariant/GenericAnalyseSingleVariantReactPage.tsx Created React component consolidating page state logic
website/src/components/views/analyzeSingleVariant/CovidSingleVariantReactPage.tsx Created React component for COVID-specific variant analysis
website/src/components/pageStateSelectors/FallbackElement.tsx Removed fallback components (no longer needed with React rendering)
website/src/components/LapisUnreachableWrapperClient.tsx Removed query provider wrapper, exported component directly
website/src/components/LapisUnreachableWrapperClient.browser.spec.tsx Updated tests to add QueryClientProvider wrapper manually

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

Comment on lines +26 to +29
const view = useMemo(
() => new Routing(organismsConfig).getOrganismView(organismViewKey),
[organismsConfig, organismViewKey],
);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The same memo is also in the state selector and in the data display, but I wanted to keep it simple for now. The text step will be to move all this to a shared state and get rid of the duplication.

@fengelniederhammer fengelniederhammer linked an issue Dec 19, 2025 that may be closed by this pull request
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.

Move layout to React

2 participants