-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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: Prevents undefined features flags on first render #9374
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
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.
Self review done
@@ -26,6 +26,8 @@ export async function ssrInit(context: GetServerSidePropsContext) { | |||
|
|||
// always preload "viewer.public.i18n" | |||
await ssr.viewer.public.i18n.fetch(); | |||
// So feature flags are available on first render |
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.
I chose this common helper instead of each individual page because prefetched feature flags would be desirable in most cases.
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Current Playwright Test Results Summary✅ 107 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 06/07/2023 12:45:51am UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: d4c24af Started: 06/07/2023 12:43:41am UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Popup Tests should be able to reschedule
Retry 2 • Retry 1 • Initial Attempt |
7.32% (15)15 / 205 runsfailed over last 7 days |
92.68% (190)190 / 205 runsflaked over last 7 days |
📄 apps/web/playwright/event-types.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Event Types tests user -- old-booker can add multiple organizer address
Retry 1 • Initial Attempt |
4.11% (13)13 / 316 runsfailed over last 7 days |
2.53% (8)8 / 316 runsflaked over last 7 days |
📄 apps/web/playwright/login.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
user can login & logout succesfully login flow user & logout using dashboard
Retry 1 • Initial Attempt |
0.30% (1)1 / 336 runfailed over last 7 days |
7.44% (25)25 / 336 runsflaked over last 7 days |
📄 apps/web/playwright/auth/delete-account.e2e.ts • 1 Flake
Test Case Results
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Can delete user account
Retry 1 • Initial Attempt |
0.88% (3)3 / 339 runsfailed over last 7 days |
1.47% (5)5 / 339 runsflaked over last 7 days |
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.
LGTM! 🙏
What does this PR do?
This allows feature flags to be prefetched on most pages. You still need to use
getServerSideProps
andssrInit
helper in order to benefit from this.Type of change
How should this be tested?
ssrInit
try usingconst featureFlags = useFlagMap();
Mandatory Tasks