elixir-cloud-aai / landing-page

ELIXIR Cloud & AAI landing page
https://elixir-cloud.dcc.sib.swiss
Apache License 2.0
4 stars 14 forks source link

chore: migrate to TS & upgrade NextJS to v14 #127

Closed dhararaghu777 closed 2 months ago

dhararaghu777 commented 3 months ago

Summary by Sourcery

Migrate the project from Next.js 13 with JavaScript to Next.js 14 with TypeScript, introducing type safety and improving code maintainability. Add new components for cookie consent and service worker registration. Refactor existing components to use TypeScript and enhance the filtering functionality in the Contributors component. Update build and CI configurations to support TypeScript and improve code quality. Remove obsolete files and update documentation to reflect the changes.

New Features:

Enhancements:

Build:

CI:

Documentation:

Tests:

Chores:

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
landing-page ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 1, 2024 3:53pm
sourcery-ai[bot] commented 3 months ago

Reviewer's Guide by Sourcery

This pull request implements a major migration from Next.js 13 with JavaScript to Next.js 14 with TypeScript. The changes include updating component structures, introducing TypeScript types, modifying the project configuration, and adjusting the routing system to align with Next.js 14 standards. Key modifications include the transition to the new App Router, implementation of server-side rendering for several pages, and the addition of TypeScript interfaces and types throughout the codebase.

File-Level Changes

Files Changes
src/components/Contributors/index.tsxbr/>`src/components/Contributors/types.ts`<br/>`src/components/@ui/Select.tsx`<br/src/components/NavBar.tsx
src/components/@ui/Button.tsx
Migrated from JavaScript to TypeScript, adding type definitions and interfaces for components and data structures
src/app/layout.tsx
src/app/page.tsx
src/app/solution/[id]/page.tsx
src/app/funding/page.tsx
src/app/solutions/page.tsx
src/app/overview/page.tsx
src/app/partners/page.tsx
src/app/contributors/page.tsx
src/app/news/page.tsx
Updated to Next.js 14 App Router, restructuring the pages directory into the new app directory with corresponding route files
src/app/solution/[id]/page.tsx
src/app/funding/page.tsx
src/app/solutions/page.tsx
src/app/overview/page.tsx
src/app/partners/page.tsx
src/app/contributors/page.tsx
Implemented server-side rendering for various pages, utilizing the new Next.js 14 data fetching methods
tsconfig.json
next.config.js
eslint.config.js
Updated configuration files for TypeScript, ESLint, and Next.js to support the new project structure and TypeScript integration
src/utils/funder.ts
src/utils/contributors.ts
src/utils/solution.ts
src/utils/guides.ts
src/utils/overview.ts
src/utils/solutions.ts
src/utils/partners.ts
Refactored utility functions to use TypeScript and updated their implementations to work with the new typed data structures
src/seo/base-seo.ts
src/app/layout.tsx
Updated SEO configuration to use the new Metadata API provided by Next.js 14
src/components/CookieConsent.tsx
src/app/layout.tsx
Implemented a new CookieConsent component with TypeScript and integrated it into the main layout
src/styles/Home.module.css
tailwind.config.ts
Updated global styles and Tailwind CSS configuration to work with the new project structure

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
uniqueg commented 2 months ago

@anuragxxd, @JaeAeich and/or @SalihuDickson - can you please review this PR? :pray:

JaeAeich commented 2 months ago

Wouldn't it make more sense to use elixir's eslint config defines in cloud component? @anuragxxd

anuragxxd commented 2 months ago

Wouldn't it make more sense to use elixir's eslint config defines in cloud component? @anuragxxd

I don't think it will as there is config for turbo there. Maybe we can if we make it more generic & use remove turbo from there, but it we lot of hassle for now i guess!