Fix/Keep themes in peace across embed and booking pages and App#8108
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| const forcedTheme = !isThemeSupported ? "light" : undefined; | ||
| const themeSupport = isBookingPage | ||
| ? ThemeSupport.Booking | ||
| : props.isThemeSupported === false |
There was a problem hiding this comment.
if isThemeSupport is explicitly false, then theme would be none otherwise we consider it App Theme
| ? ThemeSupport.None | ||
| : ThemeSupport.App; | ||
|
|
||
| const forcedTheme = themeSupport === ThemeSupport.None ? "light" : undefined; |
There was a problem hiding this comment.
If theme is none, we force light mode regardless of what's stored in storage.
b3be9a9 to
0610a3f
Compare
📦 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✅ 67 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 04/17/2023 12:03:58pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: c4fce55 Started: 04/17/2023 11:57:08am UTC
|
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
add webhook & test that creating an event triggers a webhook call
Retry 1 • Initial Attempt |
0% (0)0 / 210 runsfailed over last 7 days |
1.43% (3)3 / 210 runsflaked over last 7 days |
📄 apps/web/playwright/managed-event-types.e2e.ts • 1 Flake
Test Case Results
| Test Case | Last 7 days Failures | Last 7 days Flakes |
|---|---|---|
|
Managed Event Types tests Can create managed event type
Retry 1 • Initial Attempt |
2.35% (2)2 / 85 runsfailed over last 7 days |
35.29% (30)30 / 85 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 |
8.33% (17)17 / 204 runsfailed over last 7 days |
27.45% (56)56 / 204 runsflaked over last 7 days |
|
Routing Forms Seeded Routing Form Router URL should work
Retry 1 • Initial Attempt |
2.45% (5)5 / 204 runsfailed over last 7 days |
13.73% (28)28 / 204 runsflaked over last 7 days |
0610a3f to
2be91a5
Compare
…ace-across-embed-booking-app
hariombalhara
left a comment
There was a problem hiding this comment.
Self review done
| } as const; | ||
| }; | ||
|
|
||
| TeamPage.isBookingPage = true; |
There was a problem hiding this comment.
With new Booker I expect it to be simpler to identify a booking page and thus we can set the prop at one place.
This is required because we can't reliably derive if the page being served is a booking page by it's URL.
| /> | ||
| ); | ||
| } | ||
| FormEditPage.isThemeSupported = true; |
There was a problem hiding this comment.
We don't need to set isThemeSupported for App Pages. They by default support system theme
| } | ||
|
|
||
| RoutingLink.isThemeSupported = true; | ||
| RoutingLink.isBookingPage = true; |
There was a problem hiding this comment.
For Booking Pages, we don;t need to set isThemeSupported because isBookingPage being true derives that.
| const [loading, setLoading] = useState(false); | ||
| const telemetry = useTelemetry(); | ||
| const [error, setError] = useState<string | null>(booking ? null : t("booking_already_cancelled")); | ||
| useTheme(props.theme); |
There was a problem hiding this comment.
No need to use useTheme here. It's used by booking/[uid] and that has useTheme call.
| ); | ||
| } | ||
|
|
||
| User.isBookingPage = true; |
There was a problem hiding this comment.
This has to be set on all booking pages(including routing forms)
There was a problem hiding this comment.
I wish there could have been a single place to mark a page as a booking page that can be used by app-providers
cc @JeroenReumkens Not sure if new booker can do this.
| --cal-brand-text: white; | ||
| } | ||
| .dark { | ||
| color-scheme: dark; |
There was a problem hiding this comment.
@sean-brydon I removed this in the PR. Though it should go live as a separate hotfix once you confirm
📦 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! 🙌 |
…ace-across-embed-booking-app
📦 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! 🙌 |
…ace-across-embed-booking-app
sean-brydon
left a comment
There was a problem hiding this comment.
LGTM - One question will this change anything like login/onboarding/password reset where we always force light?
Guessing not since its controlled by isThemeSupported still?
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 Five 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. |
c961f5b to
c4fce55
Compare
📦 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! 🙌 |

What does this PR do?
Fixes #8068
Environment: Production
Type of change
How should this be tested?
Checklist