chore: Proposal for new module based file structure#13396
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
5 Ignored Deployments
|
|
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link. |
📦 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✅ 406 Passing - ❌ 1 Failing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 01/25/2024 10:10:53pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 24bb8bc Started: 01/25/2024 10:01:25pm UTC ❌ Failures📄 apps/web/playwright/login.e2e.ts • 1 FailureTest Case Results
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking With Phone Question and Each Other Question Booking With Select Question and Radio group Question Select and Radio group not required
Retry 1 • Initial Attempt |
0% (0)0 / 357 runsfailed over last 7 days |
2.24% (8)8 / 357 runsflaked over last 7 days |
📄 apps/web/playwright/booking/responsiveBooking.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking page with no questions Booking page with 1280x720 resolution
Retry 1 • Initial Attempt |
0% (0)0 / 58 runsfailed over last 7 days |
1.72% (1)1 / 58 runflaked over last 7 days |
📄 apps/web/playwright/locale.e2e.ts • 13 Flakes
Top 1 Common Error Messages
|
|
13 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
unauthorized user sees correct translations (de) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-17.34% (-64)-64 / 369 runsfailed over last 7 days |
17.62% (65)65 / 369 runsflaked over last 7 days |
|
unauthorized user sees correct translations (ar) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-17.66% (-65)-65 / 368 runsfailed over last 7 days |
17.66% (65)65 / 368 runsflaked over last 7 days |
|
unauthorized user sees correct translations (zh) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-17.71% (-65)-65 / 367 runsfailed over last 7 days |
17.71% (65)65 / 367 runsflaked over last 7 days |
|
unauthorized user sees correct translations (zh-CN) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-17.71% (-65)-65 / 367 runsfailed over last 7 days |
17.71% (65)65 / 367 runsflaked over last 7 days |
|
unauthorized user sees correct translations (zh-TW) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-17.71% (-65)-65 / 367 runsfailed over last 7 days |
17.71% (65)65 / 367 runsflaked over last 7 days |
|
unauthorized user sees correct translations (pt) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-17.71% (-65)-65 / 367 runsfailed over last 7 days |
17.71% (65)65 / 367 runsflaked over last 7 days |
|
unauthorized user sees correct translations (pt-br) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-17.71% (-65)-65 / 367 runsfailed over last 7 days |
17.71% (65)65 / 367 runsflaked over last 7 days |
|
unauthorized user sees correct translations (es-419) should use correct translations and html attributes
Retry 1 • Initial Attempt |
-17.71% (-65)-65 / 367 runsfailed over last 7 days |
17.71% (65)65 / 367 runsflaked over last 7 days |
|
authorized user sees correct translations (de) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-17.76% (-65)-65 / 366 runsfailed over last 7 days |
17.76% (65)65 / 366 runsflaked over last 7 days |
|
authorized user sees correct translations (pt-br) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-17.76% (-65)-65 / 366 runsfailed over last 7 days |
17.76% (65)65 / 366 runsflaked over last 7 days |
|
authorized user sees correct translations (ar) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-17.76% (-65)-65 / 366 runsfailed over last 7 days |
17.76% (65)65 / 366 runsflaked over last 7 days |
|
authorized user sees changed translations (de->ar) should return correct translations and html attributes
Retry 1 • Initial Attempt |
-6.63% (-24)-24 / 362 runsfailed over last 7 days |
16.02% (58)58 / 362 runsflaked over last 7 days |
|
authorized user sees changed translations (de->pt-BR) [locale1] should return correct translations and html attributes
Retry 1 • Initial Attempt |
-8.54% (-28)-28 / 328 runsfailed over last 7 days |
17.38% (57)57 / 328 runsflaked over last 7 days |
📄 apps/web/playwright/insights.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Insights should be able to go to insights as members
Retry 1 • Initial Attempt |
0.26% (1)1 / 386 runfailed over last 7 days |
3.11% (12)12 / 386 runsflaked over last 7 days |
📄 apps/web/playwright/booking/addressQuestione2e/addressQuestion.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Booking With Address Question and Each Other Question Booking With Address Question and Number Question Address required and Number required
Retry 1 • Initial Attempt |
0.85% (3)3 / 353 runsfailed over last 7 days |
2.83% (10)10 / 353 runsflaked over last 7 days |
📄 apps/web/playwright/availability.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Availablity tests Date Overrides
Retry 1 • Initial Attempt |
0.72% (3)3 / 417 runsfailed over last 7 days |
3.36% (14)14 / 417 runsflaked over last 7 days |
📄 apps/web/playwright/organization/organization-invitation.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Organization Email matching orgAutoAcceptEmail and a Verified Organization Org Invitation
Retry 1 • Initial Attempt |
2.07% (8)8 / 387 runsfailed over last 7 days |
10.85% (42)42 / 387 runsflaked over last 7 days |
📄 apps/web/playwright/app-store.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
App Store - Unauthed Browse apple-calendar and try to install
Retry 1 • Initial Attempt |
0% (0)0 / 419 runsfailed over last 7 days |
0.72% (3)3 / 419 runsflaked over last 7 days |
📄 packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 8 Flakes
Top 1 Common Error Messages
|
|
8 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1 • Initial Attempt |
1.50% (6)6 / 399 runsfailed over last 7 days |
55.14% (220)220 / 399 runsflaked over last 7 days |
|
Popup Tests should be able to reschedule
Retry 1 • Initial Attempt |
-106.91% (-201)-201 / 188 runsfailed over last 7 days |
124.47% (234)234 / 188 runsflaked over last 7 days |
|
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1 • Initial Attempt |
-108.60% (-202)-202 / 186 runsfailed over last 7 days |
121.51% (226)226 / 186 runsflaked over last 7 days |
|
Popup Tests should open Routing Forms embed on click
Retry 1 • Initial Attempt |
-109.68% (-204)-204 / 186 runsfailed over last 7 days |
115.05% (214)214 / 186 runsflaked over last 7 days |
|
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Booker Profile Page) with dark theme when configured with dark theme using Embed API
Retry 1 • Initial Attempt |
-109.14% (-203)-203 / 186 runsfailed over last 7 days |
109.14% (203)203 / 186 runsflaked over last 7 days |
|
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when configured with 'auto' theme using Embed API
Retry 1 • Initial Attempt |
-109.14% (-203)-203 / 186 runsfailed over last 7 days |
109.14% (203)203 / 186 runsflaked over last 7 days |
|
Popup Tests prendered embed should be loaded and apply the config given to it
Retry 1 • Initial Attempt |
-109.19% (-202)-202 / 185 runsfailed over last 7 days |
109.73% (203)203 / 185 runsflaked over last 7 days |
|
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe(Event Booking Page) with dark theme when configured with dark theme using Embed API
Retry 1 • Initial Attempt |
-109.14% (-203)-203 / 186 runsfailed over last 7 days |
109.14% (203)203 / 186 runsflaked over last 7 days |
📄 packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 2 Flakes
Top 1 Common Error Messages
|
|
2 Test Cases Affected |
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Routing Forms Seeded Routing Form Routing Link - Reporting and CSV Download
Retry 1 • Initial Attempt |
0% (0)0 / 403 runsfailed over last 7 days |
1.74% (7)7 / 403 runsflaked over last 7 days |
|
Routing Forms Seeded Routing Form Routing Link should validate fields
Retry 1 • Initial Attempt |
0% (0)0 / 403 runsfailed over last 7 days |
7.94% (32)32 / 403 runsflaked over last 7 days |
| import { type PageProps } from "~/bookings/views/bookings-single-view"; | ||
| import { getServerSideProps } from "~/bookings/views/bookings-single-view.getServerSideProps"; |
There was a problem hiding this comment.
Separated both page and SSR code so future pages can import the page by itself and avoiding double bundling.
|
|
||
| import PageWrapper from "@components/PageWrapper"; | ||
| import CancelBooking from "@components/booking/CancelBooking"; | ||
| import EventReservationSchema from "@components/schemas/EventReservationSchema"; | ||
|
|
||
| export { getServerSideProps }; |
There was a problem hiding this comment.
We don't need to export from here. It will be exported directly in the pages route.
There was a problem hiding this comment.
The page itself will live in bookings/views/bookings-listing-view so it can be exported both from pages and app routes.
| import OldPage from "~/bookings/views/bookings-single-view"; | ||
| import { getServerSideProps, type PageProps } from "~/bookings/views/bookings-single-view.getServerSideProps"; |
There was a problem hiding this comment.
This avoids circular dependencies between pages and app
There was a problem hiding this comment.
Extracted reused constant
There was a problem hiding this comment.
This is just the bookings page (or view IMO) without the server side code
There was a problem hiding this comment.
This now lives in apps/web/modules/bookings/views/bookings-listing-view.tsx
|
addressed feedback. Please re-review @keithwillcode 🙏🏽 |
What does this PR do?
Extracts
bookingsrelated routes into it's own module inapps/webWhy?
In a recent call with @DmytroHryshyn and @grzpab from the Codemod team we found out some of reasons we're experiencing crashes is because of mixed imports and circular dependencies. This PR propose a file structure that will help mitigate this and get these benefits:
apps/webpagesand futureapproutes until migration is completedType of change
How should this be tested?
appandpagesroutes should be working as expected:Mandatory Tasks
Checklist