Skip to content
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

fix: fix-animations on event-types/[type] page #12900

Conversation

DmytroHryshyn
Copy link
Contributor

@DmytroHryshyn DmytroHryshyn commented Dec 20, 2023

What does this PR do?

Updates the version of autoAnimate lib, current version had a bug in the useAutoAnimate hook (see doc)

Adds prefetching of dynamically imported tabs. Prefetching was adding because dynamic loading of components caused broken animation when clicking tab for the first time. (We can consider disabling prefetching on mobile devices to save traffic)

Requirement/Documentation

Document

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Tests (Unit/Integration/E2E or any other test)
  • This change requires a documentation update

How should this be tested?

Navigate to /event-types/[type] click tabs, see if animation is not broken.
Screencast from 20.12.23 18:00:30.webm

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Copy link

vercel bot commented Dec 20, 2023

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

A member of the Team first needs to authorize it.

Copy link
Contributor

github-actions bot commented Dec 20, 2023

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

Copy link
Contributor

📦 Next.js Bundle Analysis for @calcom/web

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

Thirty-seven 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)
/[user]/[type] 252.1 KB 416.38 KB 118.96% (🟢 -1.97%)
/[user]/[type]/embed 252.13 KB 416.41 KB 118.97% (🟢 -1.97%)
/apps 268.26 KB 432.54 KB 123.58% (🟡 +0.23%)
/apps/[slug]/[...pages] 546.54 KB 710.82 KB 203.09% (🟡 +0.56%)
/apps/installed/[category] 270.45 KB 434.73 KB 124.21% (🟡 +0.26%)
/availability 423.33 KB 587.61 KB 167.89% (🟡 +0.61%)
/availability/[schedule] 349.99 KB 514.26 KB 146.93% (🟡 +0.31%)
/availability/troubleshoot 271.57 KB 435.85 KB 124.53% (🟡 +0.25%)
/bookings/[status] 314 KB 478.27 KB 136.65% (🟡 +0.32%)
/d/[link]/[slug] 251.94 KB 416.22 KB 118.92% (🟢 -1.97%)
/event-types 544.51 KB 708.79 KB 202.51% (🟡 +0.58%)
/event-types/[type] 420.6 KB 584.88 KB 167.11% (🟡 +0.54%)
/getting-started/[[...step]] 402.89 KB 567.17 KB 162.05% (🟡 +0.33%)
/org/[orgSlug]/[user]/[type] 252.33 KB 416.61 KB 119.03% (🟢 -1.97%)
/org/[orgSlug]/[user]/[type]/embed 252.36 KB 416.64 KB 119.04% (🟢 -1.97%)
/org/[orgSlug]/instant-meeting/team/[slug]/[type] 251.95 KB 416.23 KB 118.92% (🟢 -1.97%)
/org/[orgSlug]/team/[slug]/[type] 251.98 KB 416.26 KB 118.93% (🟢 -1.97%)
/settings/admin/apps 265.69 KB 429.97 KB 122.85% (🟡 +0.25%)
/settings/admin/apps/[category] 265.68 KB 429.96 KB 122.84% (🟡 +0.25%)
/settings/my-account/appearance 276.39 KB 440.67 KB 125.91% (🟡 +0.35%)
/settings/my-account/calendars 264.04 KB 428.32 KB 122.38% (🟡 +0.16%)
/settings/my-account/general 341.19 KB 505.47 KB 144.42% (🟡 +0.35%)
/settings/organizations/appearance 276.48 KB 440.76 KB 125.93% (🟡 +0.36%)
/settings/organizations/members 420.09 KB 584.37 KB 166.96% (🟡 +0.33%)
/settings/organizations/teams/other/[id]/appearance 265.54 KB 429.82 KB 122.80% (🟡 +0.36%)
/settings/organizations/teams/other/[id]/members 260 KB 424.28 KB 121.22% (🟡 +0.35%)
/settings/organizations/teams/other/[id]/profile 458.74 KB 623.02 KB 178.00% (🟡 +0.27%)
/settings/security/impersonation 258.17 KB 422.45 KB 120.70% (🟡 +0.35%)
/settings/security/password 266.93 KB 431.21 KB 123.20% (🟡 +0.35%)
/settings/security/two-factor-auth 261.69 KB 425.96 KB 121.70% (🟡 +0.26%)
/settings/teams/[id]/appearance 265.52 KB 429.8 KB 122.80% (🟡 +0.36%)
/settings/teams/[id]/members 378.68 KB 542.96 KB 155.13% (🟡 +0.35%)
/settings/teams/[id]/onboard-members 155.92 KB 320.19 KB 91.48% (🟡 +0.31%)
/settings/teams/[id]/profile 459.56 KB 623.84 KB 178.24% (🟡 +0.27%)
/team/[slug]/[type] 251.95 KB 416.23 KB 118.92% (🟢 -1.97%)
/team/[slug]/[type]/embed 251.98 KB 416.26 KB 118.93% (🟢 -1.97%)
/workflows 284.59 KB 448.87 KB 128.25% (🟡 +0.34%)
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 "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

Copy link

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@formkit/auto-animate 1.0.0-beta.5...0.8.1 None +0/-0 47.5 kB justin-schroeder

Copy link
Member

@sean-brydon sean-brydon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM

Would you be able to also update the other package that uses formkit auto animate so we dont have a mistmatch in versions?

@DmytroHryshyn
Copy link
Contributor Author

Changes LGTM

Would you be able to also update the other package that uses formkit auto animate so we dont have a mistmatch in versions?

I see that only 2 packages use @formkit/auto-animate and they are already updated to the latest version
image

@PeerRich PeerRich enabled auto-merge (squash) December 22, 2023 19:51
@PeerRich PeerRich added Medium priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input labels Dec 22, 2023
@PeerRich PeerRich merged commit 7015c89 into calcom:main Jan 2, 2024
17 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants