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

Experiment: removed SSR trpc calls instead SPA for logged in pages

Open PeerRich opened this issue 2 years ago • 2 comments

fixes https://github.com/calcom/cal.com/issues/6935

so far so good on localhost

PeerRich avatar Feb 08 '23 12:02 PeerRich

CAL-1006 Experiment: try dashboard as SPA vs SSR

Posted by @KATT

Heya :wave: come the [suspense](http://app.cal.com|app.cal.com> dashboard is server-side rendered? I feel it would feel faster if you did SPA there and you'd ship faster since it would unlock being able to use <https://trpc.io/docs/suspense) etc

Below is a almost 3s blocking request when toggling between "Availability" and "Booking"

Like, my suggestion would be to get rid of this stuff: https://github.com/calcom/cal.com/blob/8c150264f498b8e5d5cfedaebc69465c1dfd2aeb/apps/web/pages/availability/index.tsx#L121-L129

IIRC that stuff is there because of i18n-flicker, but I'm sure there's an alternative way of dealing with that

Suspense (Experimental) | tRPC

<https://github.com/calcom/cal.com/blob/8c150264f498b8e5d5cfedaebc69465c1dfd2aeb/apps/web/pages/availability/index.tsx | index.tsx>

linear[bot] avatar Feb 08 '23 12:02 linear[bot]

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

Name Status Preview Comments Updated
cal ❌ Failed (Inspect) Feb 24, 2023 at 1:50AM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
ui ⬜️ Ignored (Inspect) Visit Preview Feb 24, 2023 at 1:50AM (UTC)

vercel[bot] avatar Feb 08 '23 12:02 vercel[bot]

The main issue I'm seeing on this is that the page no longer updates the UI strings when changing your preferred language under Settings > General. This felt surprising to me, as I double-checked this workflow as part of my previous PR.

I checked out main and am seeing the same problem, so it's not necessarily related to this PR directly. I see there have been several commits relating to header cache since my PR. Might be worth spinning up an issue?

AaronPresley avatar Feb 13 '23 23:02 AaronPresley

Might be worth spinning up an issue?

oh yes please! seems like a regression

PeerRich avatar Feb 14 '23 10:02 PeerRich

hmm checks failing, and tests. not sure why. maybe @zomars knows more

PeerRich avatar Feb 14 '23 10:02 PeerRich

Type checks are failing:

image image

You should be able to click on Details and see that we're trying to use a now removed getServerSideProps in a page

zomars avatar Feb 14 '23 19:02 zomars

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

This PR introduced no changes to the javascript bundle 🙌

github-actions[bot] avatar Feb 20 '23 21:02 github-actions[bot]

This breaking Embed tests. cc @hariombalhara to help debugging

zomars avatar Feb 20 '23 21:02 zomars

Can you take over this PR @roae

zomars avatar Feb 21 '23 18:02 zomars