-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(website): render the whole layout in React #983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 977-move-the-download-data-button-into-a-react-component
Are you sure you want to change the base?
refactor(website): render the whole layout in React #983
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this 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
BaseLayoutaround 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.
| const view = useMemo( | ||
| () => new Routing(organismsConfig).getOrganismView(organismViewKey), | ||
| [organismsConfig, organismViewKey], | ||
| ); |
There was a problem hiding this comment.
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.
resolves #979
Summary
Screenshot
PR Checklist
- [ ] All necessary documentation has been adapted.