-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
removed SSR trpc calls instead SPA for logged in pages #6936
removed SSR trpc calls instead SPA for logged in pages #6936
Conversation
CAL-1006 Experiment: try dashboard as SPA vs SSR
Posted by @KATT
Like, my suggestion would be to get rid of this stuff: cal.com/apps/web/pages/availability/index.tsx Lines 121 to 129 in 8c15026
IIRC that stuff is there because of i18n-flicker, but I'm sure there's an alternative way of dealing with that |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
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 |
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.
Looking good overall, despite what I mentioned in this comment which should likely be a new Issue. Otherwise I don't see any flickering.
oh yes please! seems like a regression |
hmm checks failing, and tests. not sure why. maybe @zomars knows more |
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.
Blocking to type fix, also this PR is leaving a lot of unused imports
📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 This PR introduced no changes to the javascript bundle 🙌 |
This breaking Embed tests. cc @hariombalhara to help debugging |
apps/web/pages/event-types/index.tsx
Outdated
@@ -128,17 +125,11 @@ const Item = ({ type, group, readOnly }: { type: EventType; group: EventTypeGrou | |||
data-testid={"event-type-title-" + type.id}> | |||
{type.title} | |||
</span> | |||
{group.profile.slug ? ( |
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.
this is not from me :o
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.
apps/web/pages/event-types/index.tsx
Outdated
{readOnly && ( | ||
<span className="inline items-center rounded-sm bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-800 ltr:ml-2 ltr:mr-2 rtl:ml-2"> | ||
<span className="rtl:ml-2inline items-center rounded-sm bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-800 ltr:ml-2 ltr:mr-2"> |
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.
same here. also typo
<span className="rtl:ml-2inline items-center rounded-sm bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-800 ltr:ml-2 ltr:mr-2"> | |
<span className="rtl:ml-2 inline items-center rounded-sm bg-gray-100 px-1.5 py-0.5 text-xs font-medium text-gray-800 ltr:ml-2 ltr:mr-2"> |
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 span tag is already inline, it is redundant
apps/web/pages/event-types/index.tsx
Outdated
const { t } = useLocale(); | ||
const router = useRouter(); | ||
|
||
const publishTeamMutation = trpc.viewer.teams.publish.useMutation({ | ||
onSuccess(data) { | ||
router.push(data.url); | ||
}, | ||
onError: (error) => { | ||
showToast(error.message, "error"); | ||
}, | ||
}); | ||
|
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.
also not by me
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.
Can you take over this PR @roae |
…a-vs-ssr # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
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.
Looking good overall, I never saw any flickering, even changing the language in settings
* removed SSR trpc * Re added debug endpoint * Update me.ts * Fixes unused imports * Rollback unrelated changes --------- Co-authored-by: zomars <zomars@me.com> Co-authored-by: Efraín Rochín <roae.85@gmail.com>
* removed SSR trpc * Re added debug endpoint * Update me.ts * Fixes unused imports * Rollback unrelated changes --------- Co-authored-by: zomars <zomars@me.com> Co-authored-by: Efraín Rochín <roae.85@gmail.com>
* removed SSR trpc * Re added debug endpoint * Update me.ts * Fixes unused imports * Rollback unrelated changes --------- Co-authored-by: zomars <zomars@me.com> Co-authored-by: Efraín Rochín <roae.85@gmail.com>
fixes #6935
so far so good on localhost
Why SSR in the first place:
we used to have i18n flickering with CSR but i cant reproduce them anymore. ideally we dont rely on SSR for logged in pages, since its slower
what to test