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

feat: Show dark mode preview for booker layout #9664

Merged

Conversation

JeroenReumkens
Copy link
Contributor

@JeroenReumkens JeroenReumkens commented Jun 20, 2023

What does this PR do?

CAL-1892: Show booker layout dark mode preview based on theme the user selects in appearance settings.
If user selects light mode, preview for all layouts is light. Of they select dark, it's dark. And if they select system default, we show the layout that applies to the current user's system settings.

Fixes CAL-1892

CleanShot 2023-06-20 at 14 43 46@2x
CleanShot 2023-06-20 at 14 43 57@2x

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

  • Toggle the layout from light to dark in settings / appearance and notice the layout settings change from light to dark mode too.

@linear
Copy link

linear bot commented Jun 20, 2023

@vercel
Copy link

vercel bot commented Jun 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2023 6:55am
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2023 6:55am
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2023 6:55am
web-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2023 6:55am

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2023

Thank you for following the naming conventions! 🙏

@@ -49,6 +50,9 @@ export const EventAdvancedTab = ({ eventType, team }: Pick<EventTypeSetupProps,
const bookingFields: Prisma.JsonObject = {};

const workflows = eventType.workflows.map((workflowOnEventType) => workflowOnEventType.workflow);
const selectedThemeIsDark =
user?.theme === "dark" ||
(!user?.theme && typeof document !== "undefined" && document.documentElement.classList.contains("dark"));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

document is undefined on the server, that's why we also need to check for undefined.

@JeroenReumkens JeroenReumkens requested review from ciaranha and a team June 20, 2023 12:44
@deploysentinel
Copy link

deploysentinel bot commented Jun 20, 2023

Current Playwright Test Results Summary

✅ 114 Passing - ⚠️ 3 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 06/21/2023 06:57:46am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: ca56785

Started: 06/21/2023 06:55:35am UTC

⚠️ Flakes

📄   apps/web/playwright/reschedule.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Reschedule Tests -- old-booker Attendee should be able to reschedule a booking
Retry 1Initial Attempt
0% (0) 0 / 281 runs
failed over last 7 days
8.54% (24) 24 / 281 runs
flaked 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 1Initial Attempt
16.06% (31) 31 / 193 runs
failed over last 7 days
80.31% (155) 155 / 193 runs
flaked 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 -- new-booker can add multiple organizer address
Retry 1Initial Attempt
0.34% (1) 1 / 296 run
failed over last 7 days
19.26% (57) 57 / 296 runs
flaked over last 7 days

View Detailed Build Results


@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2023

📦 Next.js Bundle Analysis for @calcom/web

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

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

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

That looks so good!

@emrysal emrysal merged commit a348c3a into main Jun 21, 2023
30 checks passed
@emrysal emrysal deleted the feat/show-correct-darkmode-preview-for-booker-layout-settings branch June 21, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants