From 89a3b77a1dd0773e6b746b14e72f9a792ac1c43a Mon Sep 17 00:00:00 2001 From: Somay Chauhan Date: Thu, 21 Aug 2025 14:30:51 +0530 Subject: [PATCH] feat: add hideEventMetadata prop (#23211) * feat: add hideEventMetadata prop * added changelog * udpate * undo extra changes --- .changeset/tough-dingos-own.md | 5 +++ docs/platform/atoms/booker.mdx | 1 + packages/features/bookings/Booker/Booker.tsx | 36 ++++++++++--------- .../atoms/booker/BookerPlatformWrapper.tsx | 3 +- packages/platform/atoms/booker/types.ts | 1 + .../examples/base/src/pages/booking.tsx | 1 + 6 files changed, 29 insertions(+), 18 deletions(-) create mode 100644 .changeset/tough-dingos-own.md diff --git a/.changeset/tough-dingos-own.md b/.changeset/tough-dingos-own.md new file mode 100644 index 0000000000..efb2260421 --- /dev/null +++ b/.changeset/tough-dingos-own.md @@ -0,0 +1,5 @@ +--- +"@calcom/atoms": minor +--- + +feat: added hideEventMetadata prop to the booker atom that controls the visibility of the event metadata sidebar. When `true`, hides the left sidebar containing event details like title, description, duration, and host information. diff --git a/docs/platform/atoms/booker.mdx b/docs/platform/atoms/booker.mdx index 593399082d..3daf66ab67 100644 --- a/docs/platform/atoms/booker.mdx +++ b/docs/platform/atoms/booker.mdx @@ -129,6 +129,7 @@ Below is a list of props that can be passed to the booker atom. | roundRobinHideOrgAndTeam | No | Boolean indicating if the organization and team should be hidden in the booker atom sidebar for round robin scheduling type, defaults to false. | | showNoAvailabilityDialog | No | Boolean indicating if the no availability dialog should be shown, defaults to true. | | silentlyHandleCalendarFailures | No | Boolean when true the booker still displays slots when the third party calendars credentials are invalid or expired, Booker may show stale availability when enabled | +| hideEventMetadata | No | Boolean that controls the visibility of the event metadata sidebar. When `true`, hides the left sidebar containing event details like title, description, duration, and host information. Defaults to `false`. | ## Styling diff --git a/packages/features/bookings/Booker/Booker.tsx b/packages/features/bookings/Booker/Booker.tsx index a1d71a2c8f..c117d7108b 100644 --- a/packages/features/bookings/Booker/Booker.tsx +++ b/packages/features/bookings/Booker/Booker.tsx @@ -404,23 +404,25 @@ const BookerComponent = ({ src={orgBannerUrl} /> )} - - {eventMetaChildren} - + {!hideEventTypeDetails && ( + + {eventMetaChildren} + + )} {layout !== BookerLayouts.MONTH_VIEW && !(layout === "mobile" && bookerState === "booking") && (
diff --git a/packages/platform/atoms/booker/BookerPlatformWrapper.tsx b/packages/platform/atoms/booker/BookerPlatformWrapper.tsx index 01319f1dcb..1872b5da42 100644 --- a/packages/platform/atoms/booker/BookerPlatformWrapper.tsx +++ b/packages/platform/atoms/booker/BookerPlatformWrapper.tsx @@ -66,6 +66,7 @@ const BookerPlatformWrapperComponent = ( startTime: customStartTime, showNoAvailabilityDialog, silentlyHandleCalendarFailures = false, + hideEventMetadata = false, } = props; const layout = BookerLayouts[view]; @@ -570,7 +571,7 @@ const BookerPlatformWrapperComponent = ( event={event} schedule={schedule} orgBannerUrl={bannerUrl ?? event.data?.bannerUrl} - bookerLayout={bookerLayout} + bookerLayout={{ ...bookerLayout, hideEventTypeDetails: hideEventMetadata }} verifyCode={undefined} isPlatform hasValidLicense={true} diff --git a/packages/platform/atoms/booker/types.ts b/packages/platform/atoms/booker/types.ts index 780703671d..e877b6edae 100644 --- a/packages/platform/atoms/booker/types.ts +++ b/packages/platform/atoms/booker/types.ts @@ -86,6 +86,7 @@ export type BookerPlatformWrapperAtomProps = Omit< startTime?: string | Date; roundRobinHideOrgAndTeam?: boolean; silentlyHandleCalendarFailures?: boolean; + hideEventMetadata?: boolean; }; type VIEW_TYPE = keyof typeof BookerLayouts; diff --git a/packages/platform/examples/base/src/pages/booking.tsx b/packages/platform/examples/base/src/pages/booking.tsx index bffb4e083d..b9aa87f1bc 100644 --- a/packages/platform/examples/base/src/pages/booking.tsx +++ b/packages/platform/examples/base/src/pages/booking.tsx @@ -137,6 +137,7 @@ export default function Bookings(props: { calUsername: string; calEmail: string hostsLimit={3} allowUpdatingUrlParams={true} silentlyHandleCalendarFailures={false} + // hideEventMetadata={true} /> )}