Skip to content

Scheduling infrastructure for absolutely everyone.

feat: add hideEventMetadata prop (#23211)

Somay Chauhan89a3b77a1dd0
diff --git a/.changeset/tough-dingos-own.md b/.changeset/tough-dingos-own.md
new file mode 100644
index 00000000000..efb22604219
--- /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 593399082d9..3daf66ab67a 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 a1d71a2c8fe..c117d7108b6 100644
--- a/packages/features/bookings/Booker/Booker.tsx
+++ b/packages/features/bookings/Booker/Booker.tsx
@@ -404,23 +404,25 @@ const BookerComponent = ({
src={orgBannerUrl}
/>
)}
- <EventMeta
- selectedTimeslot={selectedTimeslot}
- classNames={{
- eventMetaContainer: customClassNames?.eventMetaCustomClassNames?.eventMetaContainer,
- eventMetaTitle: customClassNames?.eventMetaCustomClassNames?.eventMetaTitle,
- eventMetaTimezoneSelect:
- customClassNames?.eventMetaCustomClassNames?.eventMetaTimezoneSelect,
- }}
- event={event.data}
- isPending={event.isPending}
- isPlatform={isPlatform}
- isPrivateLink={!!hashedLink}
- locale={userLocale}
- timeZones={timeZones}
- roundRobinHideOrgAndTeam={roundRobinHideOrgAndTeam}>
- {eventMetaChildren}
- </EventMeta>
+ {!hideEventTypeDetails && (
+ <EventMeta
+ selectedTimeslot={selectedTimeslot}
+ classNames={{
+ eventMetaContainer: customClassNames?.eventMetaCustomClassNames?.eventMetaContainer,
+ eventMetaTitle: customClassNames?.eventMetaCustomClassNames?.eventMetaTitle,
+ eventMetaTimezoneSelect:
+ customClassNames?.eventMetaCustomClassNames?.eventMetaTimezoneSelect,
+ }}
+ event={event.data}
+ isPending={event.isPending}
+ isPlatform={isPlatform}
+ isPrivateLink={!!hashedLink}
+ locale={userLocale}
+ timeZones={timeZones}
+ roundRobinHideOrgAndTeam={roundRobinHideOrgAndTeam}>
+ {eventMetaChildren}
+ </EventMeta>
+ )}
{layout !== BookerLayouts.MONTH_VIEW &&
!(layout === "mobile" && bookerState === "booking") && (
<div className="mt-auto px-5 py-3">
diff --git a/packages/platform/atoms/booker/BookerPlatformWrapper.tsx b/packages/platform/atoms/booker/BookerPlatformWrapper.tsx
index 01319f1dcb2..1872b5da42c 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 780703671d6..e877b6edaef 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 bffb4e083d5..b9aa87f1bcd 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}
/>
</>
)}