Skip to content

fix(embed): stabilize inline mobile layout when switching days#28496

Closed
abdulbaqui17 wants to merge 3 commits intocalcom:mainfrom
abdulbaqui17:fix-28475-inline-embed-layout-shift
Closed

fix(embed): stabilize inline mobile layout when switching days#28496
abdulbaqui17 wants to merge 3 commits intocalcom:mainfrom
abdulbaqui17:fix-28475-inline-embed-layout-shift

Conversation

@abdulbaqui17
Copy link

Summary

Fixes inline embed layout shift on narrow viewports when switching selected days.

Problem

On mobile/narrow layouts, the available-times container can toggle vertical overflow between states while switching days. That causes scrollbar appearance/disappearance and a visible width jump.

Fix

  • Stabilized the day slot container in AvailableTimeSlots by reserving scrollbar gutter space.
  • Added:
    • style={{ scrollbarGutter: "stable" }}

This prevents layout width changes when vertical overflow changes across selected days.

Scope

  • Minimal UI-only change in booking slots container.
  • No API, schema, or business logic changes.

Validation

  • File-level diagnostics check passes for changed file.
  • Manual visual verification is still recommended in inline embed mobile layout.

Closes #28475

Copilot AI review requested due to automatic review settings March 19, 2026 03:14
@github-actions github-actions bot added the 🐛 bug Something isn't working label Mar 19, 2026
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses UI layout shifting in the inline embed on narrow viewports by stabilizing scrollbar behavior, and also includes additional changes around rescheduling duration propagation and attendee email time format handling.

Changes:

  • Reserve scrollbar gutter space in AvailableTimeSlots to prevent width jumps when overflow changes.
  • Add duration query param to reschedule redirect URLs based on the original booking length.
  • Ensure attendee scheduled emails fall back to organizer time format when attendee format is missing (with tests), plus a small unit test for duration fallback logic.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/features/bookings/lib/get-booking.test.ts Adds a unit test for getMultipleDurationValue defaulting behavior.
packages/emails/templates/attendee-scheduled-email.ts Ensures attendee.timeFormat is populated (fallback to organizer) before rendering the email template.
packages/emails/email-manager.test.ts Adds coverage asserting the attendee time format fallback is passed into renderEmail.
apps/web/modules/bookings/components/AvailableTimeSlots.tsx Adds scrollbar-gutter: stable to reduce layout shift in scrollable time slots on narrow viewports.
apps/web/lib/reschedule/[uid]/getServerSideProps.ts Propagates original booking duration into reschedule redirect URL via duration query param.
apps/web/lib/reschedule/[uid]/getServerSideProps.test.ts Adds tests verifying the reschedule redirect includes the correct duration parameter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +185 to +191
const originalBookingDurationInMinutes = Math.round(
(booking.endTime.getTime() - booking.startTime.getTime()) / (1000 * 60)
);

if (originalBookingDurationInMinutes > 0) {
destinationUrlSearchParams.set("duration", String(originalBookingDurationInMinutes));
}
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 6 files

Copy link
Member

@sahitya-chandra sahitya-chandra left a comment

Choose a reason for hiding this comment

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

Closing in favor of #28481

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

Labels

🐛 bug Something isn't working size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inline embed layout shifts on narrow viewports when switching selected days

4 participants