perf: Cache translations per language/per release#10843
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
|
Thank you for following the naming conventions! 🙏 |
| import { useEffect } from "react"; | ||
|
|
||
| import { trpc } from "@calcom/trpc/react"; | ||
| import { CalComVersion } from "@calcom/ui/components/credits/Credits"; |
There was a problem hiding this comment.
Ideally this goes into a different file than its current component. Then, it can be reused across both components that need it.
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Ten Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly 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 Any third party scripts you have added directly to your app using the 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. |
Current Playwright Test Results Summary✅ 116 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 08/19/2023 12:09:13am UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: e79c545 Started: 08/19/2023 12:07:55am UTC
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Managed Event Types tests Can create managed event type
Retry 1 • Initial Attempt |
0.77% (2)2 / 259 runsfailed over last 7 days |
12.74% (33)33 / 259 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
2.33% (6)6 / 257 runsfailed over last 7 days |
97.67% (251)251 / 257 runsflaked over last 7 days |
| await utils.viewer.me.invalidate(); | ||
| reset(getValues()); | ||
| showToast(t("settings_updated_successfully"), "success"); | ||
| update(res); |
There was a problem hiding this comment.
This was causing the locale to not change when updating your profile
| }, | ||
| onSettled: async () => { | ||
| await utils.viewer.public.i18n.invalidate(); | ||
| await utils.viewer.me.invalidate(); |
There was a problem hiding this comment.
No need to invalidate the i18n endpoint anymore. We just refetch the updated user
| }, | ||
| }); | ||
| // eslint-disable-next-line turbo/no-undeclared-env-vars | ||
| const vercelCommitHash = process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA || "NA"; |
There was a problem hiding this comment.
The commit hash should be enough for now. WDYT @keithwillcode
There was a problem hiding this comment.
Yeah that works too!
There was a problem hiding this comment.
@zomars thinking about this more; if someone is self-hosting and not on Vercel, this would request the i18n endpoint with NA, which means the next time they upgrade, the new translations wouldn’t be pulled by the browser because the request URL would be the same.
There was a problem hiding this comment.
I believe I'm having an issue related with this, when I deploy the changes to production the translations are never updated. Could it be the reason?
zomars
left a comment
There was a problem hiding this comment.
I think this is in a merge-able state. Nice work @keithwillcode 🙏🏽
zomars
left a comment
There was a problem hiding this comment.
Spoke too soon. Blocking to push some fixes.
| await utils.viewer.me.invalidate(); | ||
| }, | ||
| async onSettled() { | ||
| await utils.viewer.public.i18n.invalidate(); |

What does this PR do?
Fixes #10198
Type of change
How should this be tested?
Mandatory Tasks