From 4680fbb378dfa023545f7d5ab6705e9954aae11b Mon Sep 17 00:00:00 2001 From: Ravi Gulhane <> Date: Wed, 19 Aug 2026 09:37:17 +0530 Subject: [PATCH] Apply presenter photo shape styles on the Photo Wall present page. Honor rect, rounded, and circle from the wall config with clipping overflow. Co-authored-by: Cursor --- src/lib/api.ts | 1 + src/pages/PhotoWallPresentPage.tsx | 47 +++++++++++++++++++++++++----- 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/lib/api.ts b/src/lib/api.ts index ddc0afa..9d29014 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -1040,6 +1040,7 @@ export type PhotoWallPresentData = { presentMarginTopPx?: number; presentMarginLeftPx?: number; presentMarginRightPx?: number; + presentPhotoShape?: "rect" | "rounded" | "circle"; showUploaderNameOnWall?: boolean; frameEnabled?: boolean; frameCanvasWidth?: number; diff --git a/src/pages/PhotoWallPresentPage.tsx b/src/pages/PhotoWallPresentPage.tsx index 7654777..eaf2b5e 100644 --- a/src/pages/PhotoWallPresentPage.tsx +++ b/src/pages/PhotoWallPresentPage.tsx @@ -5,6 +5,25 @@ import { PhotoWallEventHeader } from "../components/PhotoWallEventHeader"; const POLL_MS = 4000; +function presentShapeStyles( + shape: PhotoWallPresentData["presentPhotoShape"], + maxW: number, + maxH: number, + frameEnabled: boolean, + frameW: number, + frameH: number, +) { + const normalized = shape === "rect" || shape === "circle" || shape === "rounded" ? shape : "rounded"; + const borderRadius = normalized === "rect" ? 0 : normalized === "circle" ? "50%" : 16; + const aspectRatio = + normalized === "circle" + ? "1 / 1" + : frameEnabled + ? `${frameW} / ${frameH}` + : `${maxW} / ${maxH}`; + return { borderRadius, aspectRatio, shape: normalized }; +} + export function PhotoWallPresentPage() { const { presentToken } = useParams<{ presentToken: string }>(); const [data, setData] = useState(null); @@ -59,7 +78,14 @@ export function PhotoWallPresentPage() { const frameEnabled = Boolean(data.frameEnabled); const frameW = data.frameCanvasWidth || 1080; const frameH = data.frameCanvasHeight || 1080; - const aspectRatio = frameEnabled ? `${frameW} / ${frameH}` : `${maxW} / ${maxH}`; + const { borderRadius, aspectRatio } = presentShapeStyles( + data.presentPhotoShape, + maxW, + maxH, + frameEnabled, + frameW, + frameH, + ); return (
@@ -101,20 +127,25 @@ export function PhotoWallPresentPage() { {data.photos.map((p) => (
- {p.displayName + > + {p.displayName +
{showNames && p.displayName ? (