cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

[CAL-2093] RFC: Incrementally adopt migrate dashboard to Next.js App Router

Open zomars opened this issue 2 years ago • 7 comments

We're planning into slowly start adopting certain areas of the dashboard and migrate them to the new Next.js App Router philosophy. We're expecting this change will help with overall navigation, performance and "snappiness" improvements over the current dashboard.

Nextjs official upgrade guide

Prep-work needed

#9930

Move pages to the app directory

  • [X] Create a page.tsx file (the main host for the server components) for each route.
  • [X] Migrate the functionality in every occurrence of getServerSideProps to everypage.tsx
  • [X] Migrate the functionality in every occurrence of getInitialProps to everypage.tsx
  • [X] Reimplement getStaticProps as generateStaticParams in every page.tsx
  • [ ] Implement generateMetadata in every page.tsx , if applicable.
  • [ ] Create a component.tsx file or similar (the main host for the client-rendered page’s component) for every route.
  • [ ] Create a layout.tsx page for every route.
  • [ ] Create an error.tsx page for every route, if necessary.
  • [ ] Remove the pages directory

Sections to migrate (by priority order)

  • [ ] /event-types
  • [ ] /bookings
  • [ ] /settings Sean will explore this
  • [ ] /availability
  • [ ] /teams
  • [ ] /apps
  • [ ] /insights
  • [ ] /workflows
  • [ ] /getting-started

From SyncLinear.com | CAL-2093

zomars avatar Jul 04 '23 18:07 zomars

[notes from meeting with Omar and Greg]

  1. first we do take care of #9929 (ETA: 21JUL)
  2. then we work on bootstrapping #9930 starting 24JUL. ETA 28JUL.
  3. Then we will be ready for page migrations. we will start with the Event pages which is a complex one but has the biggest potential for perf improvement.

alexbit-codemod avatar Jul 18 '23 17:07 alexbit-codemod

@sean-brydon will explore bootstrapping in parallel

zomars avatar Jul 19 '23 15:07 zomars

@zomars can you assign me here?

grzpab avatar Sep 27 '23 15:09 grzpab

done!

zomars avatar Sep 27 '23 20:09 zomars

Currently blocked due to ban issue with app/not-found conflicting with our next.config rewrites https://github.com/vercel/next.js/issues/58945

zomars avatar Mar 14 '24 19:03 zomars

Currently blocked due to ban issue with app/not-found conflicting with our next.config rewrites vercel/next.js#58945

Found another possible related issue with the rewrite usage with both app dir and afterFiles: https://github.com/vercel/next.js/issues/48002

zomars avatar May 21 '24 23:05 zomars