@@ -460,7 +457,11 @@ const Route = ({
className="mb-6"
moveUp={moveUp}
moveDown={moveDown}
- label={route.isFallback ? "Fallback Route" : `Route ${index + 1}`}
+ label={route.name ?? (route.isFallback ? "Fallback Route" : `Route ${index + 1}`)}
+ isLabelEditable={!route.isFallback}
+ onLabelChange={(label) => {
+ setRoute(route.id, { name: label });
+ }}
deleteField={{
check: () => routes.length !== 1 && !route.isFallback,
fn: () => {
@@ -716,6 +717,7 @@ function useRoutes({
}
return {
id: route.id,
+ name: route.name,
attributeRoutingConfig: route.attributeRoutingConfig,
action: route.action,
isFallback: route.isFallback,
diff --git a/packages/app-store/routing-forms/zod.ts b/packages/app-store/routing-forms/zod.ts
index dea6bcbdf4..4f62a9326d 100644
--- a/packages/app-store/routing-forms/zod.ts
+++ b/packages/app-store/routing-forms/zod.ts
@@ -130,6 +130,7 @@ export const queryValueSaveValidationSchema = queryValueSchema
export const zodNonRouterRoute = z.object({
id: z.string(),
+ name: z.string().optional(),
attributeRoutingConfig: z
.object({
skipContactOwner: z.boolean().optional(),
@@ -168,6 +169,7 @@ export const zodNonRouterRouteView = zodNonRouterRoute;
export const zodRouterRoute = z.object({
// This is the id of the Form being used as router
id: z.string(),
+ name: z.string().optional(),
isRouter: z.literal(true),
});
diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx
index eee2479cdb..ed3e3424bc 100644
--- a/packages/features/shell/Shell.tsx
+++ b/packages/features/shell/Shell.tsx
@@ -30,7 +30,7 @@ const Layout = (props: LayoutProps) => {
const postHog = usePostHog();
const isFullPageWithoutSidebar = pathname?.startsWith("/apps/routing-forms/reporting/");
const pageTitle = typeof props.heading === "string" && !props.title ? props.heading : props.title;
-
+ const withoutSeo = props.withoutSeo ?? props.withoutMain ?? false;
useBootIntercom();
useFormbricks();
@@ -42,7 +42,7 @@ const Layout = (props: LayoutProps) => {
return (
<>
- {!props.withoutSeo && (
+ {!withoutSeo && (
{
-
+
{banners && !props.isPlatformUser && !isFullPageWithoutSidebar && (
)}
@@ -65,7 +65,7 @@ const Layout = (props: LayoutProps) => {
) : (
)}
-
@@ -187,7 +187,7 @@ export function ShellMain(props: LayoutProps) {
)}
{props.subtitle && (
-
+
{!isLocaleReady ? : props.subtitle}
)}
@@ -243,7 +243,7 @@ function MainContainer({
...props
}: LayoutProps) {
return (
-
+
{/* show top navigation for md and smaller (tablet and phones) */}
{TopNavContainerProp}
diff --git a/packages/ui/components/card/FormCard.tsx b/packages/ui/components/card/FormCard.tsx
index 7ffbe4f69d..f31f605038 100644
--- a/packages/ui/components/card/FormCard.tsx
+++ b/packages/ui/components/card/FormCard.tsx
@@ -1,16 +1,22 @@
+"use client";
+
import Link from "next/link";
+import { useState } from "react";
import { classNames } from "@calcom/lib";
import type { BadgeProps } from "../badge";
import { Badge } from "../badge";
import { Divider } from "../divider";
+import { Input } from "../form/inputs/TextField";
import { Icon } from "../icon";
type Action = { check: () => boolean; fn: () => void };
export default function FormCard({
children,
label,
+ isLabelEditable,
+ onLabelChange,
deleteField,
moveUp,
moveDown,
@@ -19,7 +25,9 @@ export default function FormCard({
...restProps
}: {
children: React.ReactNode;
- label?: React.ReactNode;
+ label: string;
+ isLabelEditable?: boolean;
+ onLabelChange?: (label: string) => void;
deleteField?: Action | null;
moveUp?: Action | null;
moveDown?: Action | null;
@@ -31,6 +39,12 @@ export default function FormCard({
"flex items-center group relative w-full rounded-md p-4 border border-subtle"
);
+ const [isCollapsed, setIsCollapsed] = useState(false);
+
+ const toggleFormCard = () => {
+ setIsCollapsed((prev) => !prev);
+ };
+
return (
@@ -54,26 +68,43 @@ export default function FormCard({
- {label}
+ {isLabelEditable ? (
+ onLabelChange?.(e.target.value)} />
+ ) : (
+ {label}
+ )}
{badge && (
{badge.href ? {badge.text} : badge.text}
)}
- {deleteField?.check() ? (
+
{
- deleteField?.fn();
+ toggleFormCard();
}}
color="secondary">
-
+
- ) : null}
+ {deleteField?.check() ? (
+ {
+ deleteField?.fn();
+ }}
+ color="secondary">
+
+
+ ) : null}
+
+
+
-
- {children}
);
diff --git a/packages/ui/components/icon/icon-list.mjs b/packages/ui/components/icon/icon-list.mjs
index 42f6e9e226..0c32fea285 100644
--- a/packages/ui/components/icon/icon-list.mjs
+++ b/packages/ui/components/icon/icon-list.mjs
@@ -135,5 +135,6 @@ export const lucideIconList = new Set([
"webhook",
"x",
"zap",
- "waypoints"
+ "waypoints",
+ "chevrons-down-up",
]);
diff --git a/packages/ui/components/icon/icon-names.ts b/packages/ui/components/icon/icon-names.ts
index 0c86290053..3f11b3f77d 100644
--- a/packages/ui/components/icon/icon-names.ts
+++ b/packages/ui/components/icon/icon-names.ts
@@ -33,6 +33,7 @@ export type IconName =
| "chevron-left"
| "chevron-right"
| "chevron-up"
+ | "chevrons-down-up"
| "chevrons-left"
| "chevrons-right"
| "circle-alert"