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

[CAL-1570] 20 second Delay in calendar switch button

Open vaibhav135 opened this issue 1 year ago • 5 comments

What does this PR do?

Fixes #8438

https://user-images.githubusercontent.com/39329182/235430959-62e30121-c4d8-4adc-8aaa-b7c3345d582a.mov

Environment: Staging(main branch) / Production

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I haven't checked if my changes generate no new warnings
  • I haven't added tests that prove my fix is effective or that my feature works

vaibhav135 avatar May 01 '23 08:05 vaibhav135

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

Name Status Preview Comments Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 4, 2023 6:55pm

vercel[bot] avatar May 01 '23 08:05 vercel[bot]

Someone is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar May 01 '23 08:05 vercel[bot]

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Ten Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/apps/[slug]/[...pages] 456.19 KB 606.66 KB 173.33% (🟡 +0.17%)
/apps/installed/[category] 276.55 KB 427.02 KB 122.01% (🟡 +0.36%)
/auth/setup 174.63 KB 325.1 KB 92.89% (🟡 +0.15%)
/availability/[schedule] 298.65 KB 449.12 KB 128.32% (🟢 -9.10%)
/getting-started/[[...step]] 382.55 KB 533.02 KB 152.29% (🟢 -9.09%)
/settings/admin/users/[id]/edit 300.09 KB 450.56 KB 128.73% (🟢 -9.09%)
/settings/admin/users/add 299.76 KB 450.23 KB 128.64% (🟢 -9.09%)
/settings/my-account/calendars 250.97 KB 401.44 KB 114.70% (🟡 +0.23%)
/settings/my-account/general 293.61 KB 444.08 KB 126.88% (🟢 -9.09%)
/settings/teams/[id]/members 325.01 KB 475.48 KB 135.85% (🟢 -9.09%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/-

github-actions[bot] avatar May 01 '23 09:05 github-actions[bot]

@hariombalhara thanks for the help I will implement the suggested changes.

vaibhav135 avatar May 02 '23 16:05 vaibhav135

@vaibhav135 lint error. remove useMutation if you are not using it.

Udit-takkar avatar May 04 '23 12:05 Udit-takkar

In the issue the bug reported is from this onboarding page ( /getting-started/connected-calendar ) after you sign up

Screenshot 2023-05-04 at 6 17 13 PM

Yes thanks It seems like I got distracted 😅 from the main issue. Since there were a lot of calendar switch issue. Really appreciate your comment. Thanks for guiding me.

vaibhav135 avatar May 04 '23 18:05 vaibhav135

sorry @vaibhav135 I will have to close this PR in favour of https://github.com/calcom/cal.com/pull/8677

Udit-takkar avatar May 05 '23 07:05 Udit-takkar

sorry @vaibhav135 I will have to close this PR in favour of #8677

@Udit-takkar I did used the local state initially and @hariombalhara recommended me to not do that. Please check the above comments first? I mean this doesn't make any sense? Why to tell me not use the local state ? and then accepting the MR that does uses the local state ?

vaibhav135 avatar May 05 '23 07:05 vaibhav135

sorry @vaibhav135 I will have to close this PR in favour of #8677

@Udit-takkar I did used the local state initially and @hariombalhara recommended me to not do that. Please check the above comments first? I mean this doesn't make any sense? Why to tell me not use the local state ? and then accepting the MR that does uses the local state ?

My appologies @vaibhav135 i didnt even realise this PR existed - issue got raised to me in person. I will discuss with @hariombalhara about what is the best approach here - I see nothing wrong with the internal state approach. Sorry about this!

sean-brydon avatar May 05 '23 08:05 sean-brydon

sorry @vaibhav135 I will have to close this PR in favour of #8677

@Udit-takkar I did used the local state initially and @hariombalhara recommended me to not do that. Please check the above comments first? I mean this doesn't make any sense? Why to tell me not use the local state ? and then accepting the MR that does uses the local state ?

Great job tho - for your inconvenience can you hit up [email protected] and we will send you a gift :)

sean-brydon avatar May 05 '23 09:05 sean-brydon