Skip to content

Scheduling infrastructure for absolutely everyone.

chore: removed old booker feature flag (#13040)

Peer Richelsen3c6fdfe724c8
diff --git a/packages/features/embed/Embed.tsx b/packages/features/embed/Embed.tsx
index fcaa08a4b6b..1b4174f1eb5 100644
--- a/packages/features/embed/Embed.tsx
+++ b/packages/features/embed/Embed.tsx
@@ -16,7 +16,6 @@ import { useBookerStore, useInitializeBookerStore } from "@calcom/features/booki
import { useEvent, useScheduleForEvent } from "@calcom/features/bookings/Booker/utils/event";
import { useTimePreferences } from "@calcom/features/bookings/lib/timePreferences";
import DatePicker from "@calcom/features/calendars/DatePicker";
-import { useFlagMap } from "@calcom/features/flags/context/provider";
import { useNonEmptyScheduleDays } from "@calcom/features/schedules";
import { useSlotsForDate } from "@calcom/features/schedules/lib/use-schedule/useSlotsForDate";
import { APP_NAME, CAL_URL } from "@calcom/lib/constants";
@@ -515,8 +514,6 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
const { goto, removeQueryParams } = useRouterHelpers();
const iframeRef = useRef<HTMLIFrameElement>(null);
const dialogContentRef = useRef<HTMLDivElement>(null);
- const flags = useFlagMap();
- const isBookerLayoutsEnabled = flags["booker-layouts"] === true;
const emailContentRef = useRef<HTMLDivElement>(null);
const { data } = useSession();
const [month, selectedDatesAndTimes] = useBookerStore(
@@ -957,34 +954,32 @@ const EmbedTypeCodeAndPreviewDialogContent = ({
</div>
</Label>
))}
- {isBookerLayoutsEnabled && (
- <Label className="mb-6">
- <div className="mb-2">{t("layout")}</div>
- <Select
- className="w-full"
- defaultValue={layoutOptions[0]}
- onChange={(option) => {
- if (!option) {
- return;
- }
- setPreviewState((previewState) => {
- const config = {
- ...(previewState.floatingPopup.config ?? {}),
- layout: option.value,
- };
- return {
- ...previewState,
- floatingPopup: {
- config,
- },
- layout: option.value,
- };
- });
- }}
- options={layoutOptions}
- />
- </Label>
- )}
+ <Label className="mb-6">
+ <div className="mb-2">{t("layout")}</div>
+ <Select
+ className="w-full"
+ defaultValue={layoutOptions[0]}
+ onChange={(option) => {
+ if (!option) {
+ return;
+ }
+ setPreviewState((previewState) => {
+ const config = {
+ ...(previewState.floatingPopup.config ?? {}),
+ layout: option.value,
+ };
+ return {
+ ...previewState,
+ floatingPopup: {
+ config,
+ },
+ layout: option.value,
+ };
+ });
+ }}
+ options={layoutOptions}
+ />
+ </Label>
</div>
</CollapsibleContent>
</Collapsible>
diff --git a/packages/features/flags/config.ts b/packages/features/flags/config.ts
index 50e61214a9d..bb03d0f5d42 100644
--- a/packages/features/flags/config.ts
+++ b/packages/features/flags/config.ts
@@ -12,7 +12,6 @@ export type AppFlags = {
"managed-event-types": boolean;
organizations: boolean;
"email-verification": boolean;
- "booker-layouts": boolean;
"google-workspace-directory": boolean;
"disable-signup": boolean;
};
diff --git a/packages/features/settings/BookerLayoutSelector.tsx b/packages/features/settings/BookerLayoutSelector.tsx
index 3ac38433bba..e097298db00 100644
--- a/packages/features/settings/BookerLayoutSelector.tsx
+++ b/packages/features/settings/BookerLayoutSelector.tsx
@@ -4,7 +4,6 @@ import Link from "next/link";
import { useCallback, useState } from "react";
import { Controller, useFormContext } from "react-hook-form";
-import { useFlagMap } from "@calcom/features/flags/context/provider";
import { classNames } from "@calcom/lib";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { BookerLayouts, defaultBookerLayoutSettings } from "@calcom/prisma/zod-utils";
@@ -53,9 +52,6 @@ export const BookerLayoutSelector = ({
// Only fallback if event current does not have any settings, and the fallbackToUserSettings boolean is set.
const shouldShowUserSettings = (fallbackToUserSettings && !getValues(name || defaultFieldName)) || false;
- const flags = useFlagMap();
- if (flags["booker-layouts"] !== true) return null;
-
return (
<div className={classNames(isOuterBorder && "border-subtle rounded-lg border p-6")}>
<div className={classNames(isOuterBorder ? "pb-5" : "border-subtle rounded-t-xl border p-6")}>
diff --git a/packages/prisma/migrations/20240105110500_removed_newbooker_feature_flag/migration.sql b/packages/prisma/migrations/20240105110500_removed_newbooker_feature_flag/migration.sql
new file mode 100644
index 00000000000..bdf05ec0ab8
--- /dev/null
+++ b/packages/prisma/migrations/20240105110500_removed_newbooker_feature_flag/migration.sql
@@ -0,0 +1,4 @@
+-- Removes the feature flag for the new booker layouts which is no longer needed
+DELETE FROM "Feature"
+WHERE
+ slug = 'booker-layouts';