Skip to content

fix: Embed booker top margin embed#10357

Merged
sean-brydon merged 2 commits into
mainfrom
fix/embed-margin
Jul 25, 2023
Merged

fix: Embed booker top margin embed#10357
sean-brydon merged 2 commits into
mainfrom
fix/embed-margin

Conversation

@hariombalhara
Copy link
Copy Markdown
Member

@hariombalhara hariombalhara commented Jul 25, 2023

What does this PR do?

  • Removes top margin again from embed which got added after the merge of fix: [CAL-2040] add spinner when bookerState is loading #9873. It's a weird side effect of that change.
  • Now, top margin is removed in a better way, mt-0 should haven't worked already(but it was working somehow) because the margin was coming due to flex align-items center and not through some explicitly added margin.
  • Also, fixes the failing embed test in main(which was in that PR but the PR got merged because the embed tests doesn't block the merge). PR would follow soon to make embed tests required.

Type of change

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

How should this be tested?

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

@hariombalhara hariombalhara added the 📉 regressing This used to work. Now it doesn't anymore. label Jul 25, 2023
@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 25, 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 Jul 25, 2023 9:54am
cal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2023 9:54am
dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 25, 2023 9:54am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Jul 25, 2023 9:54am
qa ⬜️ Ignored (Inspect) Jul 25, 2023 9:54am
ui ⬜️ Ignored (Inspect) Visit Preview Jul 25, 2023 9:54am

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 25, 2023

Thank you for following the naming conventions! 🙏

@hariombalhara hariombalhara changed the title Fix booker top margin embed fix: Embed booker top margin embed Jul 25, 2023
@zomars zomars added the core area: core, team members only label Jul 25, 2023
@hariombalhara hariombalhara requested a review from a team July 25, 2023 08:25
sean-brydon
sean-brydon previously approved these changes Jul 25, 2023
isEmbed && layout === BookerLayouts.MONTH_VIEW && "border-booker sm:border-booker-width",
!isEmbed && layout === BookerLayouts.MONTH_VIEW && "border-subtle",
// We don't want any margins for Embed. Any margin needed should be added by Embed user.
layout === BookerLayouts.MONTH_VIEW && isEmbed && "mt-0"
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.

Removing the margin in the correct way now. It was working accidentally somehow but after an unrelated fix of returning null from the component in a case, it stopped working.

@github-actions
Copy link
Copy Markdown
Contributor

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

@alwaysmeticulous
Copy link
Copy Markdown

alwaysmeticulous Bot commented Jul 25, 2023

🤖 Meticulous spotted visual differences in 32 of 230 screens tested: view and approve differences detected.

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

@deploysentinel
Copy link
Copy Markdown

deploysentinel Bot commented Jul 25, 2023

Current Playwright Test Results Summary

✅ 97 Passing - ⚠️ 2 Flaky

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

(Last updated on 07/25/2023 09:52:31am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: eeb97ab

Started: 07/25/2023 09:50:21am UTC

⚠️ Flakes

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 2Retry 1Initial Attempt
1.22% (2) 2 / 164 runs
failed over last 7 days
98.17% (161) 161 / 164 runs
flaked over last 7 days
Popup Tests should open embed iframe on click - Configured with light theme
Retry 1Initial Attempt
0% (0) 0 / 164 runs
failed over last 7 days
4.27% (7) 7 / 164 runs
flaked over last 7 days

View Detailed Build Results


const mainElBoundingRect = mainElement.getBoundingClientRect();
resolve(mainElBoundingRect.top);
} else {
setTimeout(tryGettingBoundingRect, 500);
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.

With the recent change in Booker, main element isn't SSRd. SSR has null element rendered. It shows on client and thus we need to wait for the element to be available on client now.

@sean-brydon sean-brydon merged commit 47739a7 into main Jul 25, 2023
@sean-brydon sean-brydon deleted the fix/embed-margin branch July 25, 2023 09:58
joeauyeung pushed a commit that referenced this pull request Jul 26, 2023
sean-brydon pushed a commit that referenced this pull request Jul 31, 2023
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 📉 regressing This used to work. Now it doesn't anymore.

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants