Skip to content

fix: Embed - Non transparent background when color-scheme of embedding document and cal.com iframe don't match#10033

Merged
zomars merged 23 commits intomainfrom
fix/new-booker-embed-misc
Jul 18, 2023
Merged

fix: Embed - Non transparent background when color-scheme of embedding document and cal.com iframe don't match#10033
zomars merged 23 commits intomainfrom
fix/new-booker-embed-misc

Conversation

@hariombalhara
Copy link
Copy Markdown
Member

@hariombalhara hariombalhara commented Jul 10, 2023

What does this PR do?

Fixes #10032

Before:
https://www.loom.com/share/1890e4eebf41426aaf66d8b4909d0765
After:
https://www.loom.com/share/8b00c41587f2467ab05ef48e4ed523ef

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

  • See loom

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't added tests that prove my fix is effective or that my feature works

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 10, 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 Mar 19, 2024 2:55pm
cal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2024 2:55pm
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2024 2:55pm
cal-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2024 2:55pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
dev ⬜️ Ignored (Inspect) Mar 19, 2024 2:55pm
qa ⬜️ Ignored (Inspect) Mar 19, 2024 2:55pm
ui ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2024 2:55pm

@github-actions github-actions Bot added the embed area: embed, widget, react embed label Jul 10, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 10, 2023

Thank you for following the naming conventions! 🙏

@zomars zomars added the core area: core, team members only label Jul 10, 2023
@hariombalhara hariombalhara changed the title Consider localhost an invalid org slug always because it has no dot Embed - Improved color-scheme support Jul 10, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 10, 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! 🙌

@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Jul 10, 2023

Current Playwright Test Results Summary

✅ 94 Passing - ⚠️ 1 Flaky

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

(Last updated on 07/18/2023 02:13:38pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: df198e4

Started: 07/18/2023 02:11:52pm UTC

⚠️ Flakes

📄   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
1.32% (2) 2 / 152 runs
failed over last 7 days
98.03% (149) 149 / 152 runs
flaked over last 7 days

View Detailed Build Results


@PeerRich
Copy link
Copy Markdown
Member

is this what infisical is experiencing?

@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Jul 11, 2023

🤖 Meticulous spotted visual differences in 201 of 432 screens tested: view and approve differences detected.

Last updated for commit df198e4. This comment will update as new commits are pushed.

@hariombalhara
Copy link
Copy Markdown
Member Author

@PeerRich Yes, it's the same issue. But they are experiencing a bigger issue that their CSP policy is blocking our inline styles. Also CSP policy is impacting not just us but Intercom as well.
Screenshot 2023-07-12 at 8 53 29 AM

const iframe = this.cal.createIframe({ calLink, queryObject: Cal.getQueryObject(config) });
iframe.style.height = "100%";
iframe.style.width = "100%";
const element =
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Renamed element to containerEl

@hariombalhara hariombalhara added the High priority Created by Linear-GitHub Sync label Jul 18, 2023
Comment thread packages/embeds/embed-core/src/embed.ts
@hariombalhara hariombalhara marked this pull request as ready for review July 18, 2023 14:07
@hariombalhara hariombalhara requested a review from a team July 18, 2023 14:07
@hariombalhara hariombalhara changed the title fix: Embed - Improved color-scheme support to match it with the embedding website. fix: Embed - Non transparent background when color-scheme don't match Jul 18, 2023
@hariombalhara hariombalhara changed the title fix: Embed - Non transparent background when color-scheme don't match fix: Embed - Non transparent background when color-scheme of embedding document and cal.com iframe don't match Jul 18, 2023
@PeerRich PeerRich requested a review from zomars July 18, 2023 15:28
Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

cool

@zomars zomars merged commit 11081cb into main Jul 18, 2023
@zomars zomars deleted the fix/new-booker-embed-misc branch July 18, 2023 16:46
fritterhoff pushed a commit to hm-edu/cal.com that referenced this pull request Jul 25, 2023
…g document and cal.com iframe don't match (calcom#10033)

## What does this PR do?

Fixes calcom#10032

Before:
https://www.loom.com/share/1890e4eebf41426aaf66d8b4909d0765
After:
https://www.loom.com/share/8b00c41587f2467ab05ef48e4ed523ef


## Type of change

<!-- Please delete bullets that are not relevant. -->

- Bug fix (non-breaking change which fixes an issue)

## How should this be tested?

- See loom

## Mandatory Tasks

- [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

## Checklist
- I haven't added tests that prove my fix is effective or that my feature works
@Diwannist
Copy link
Copy Markdown

Diwannist commented Jan 15, 2025

I get a white background when I have dark theme on.

Screenshot 2025-01-15 at 1 33 06 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only embed area: embed, widget, react embed High priority Created by Linear-GitHub Sync

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

[CAL-2129] Explicitly setting dark color-scheme on container page of embed adds a white background to embed iframe

4 participants