From 0164eca206efab0104145555ee39423fef076ffa Mon Sep 17 00:00:00 2001 From: Johannes <72809645+jobenjada@users.noreply.github.com> Date: Thu, 13 Mar 2025 04:27:57 -0700 Subject: [PATCH] fix: survey display and card width (#4937) --- apps/web/modules/survey/link/components/legal-footer.tsx | 2 +- .../modules/survey/link/components/link-survey-wrapper.tsx | 2 +- apps/web/modules/ui/components/media-background/index.tsx | 2 +- apps/web/modules/ui/components/preview-survey/index.tsx | 2 +- .../surveys/src/components/questions/matrix-question.tsx | 6 ++++-- .../src/components/wrappers/scrollable-container.tsx | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/web/modules/survey/link/components/legal-footer.tsx b/apps/web/modules/survey/link/components/legal-footer.tsx index f68bd811a8..2903799ae6 100644 --- a/apps/web/modules/survey/link/components/legal-footer.tsx +++ b/apps/web/modules/survey/link/components/legal-footer.tsx @@ -21,7 +21,7 @@ export const LegalFooter = ({ return (
-
+
{IMPRINT_URL && ( {t("common.imprint")} diff --git a/apps/web/modules/survey/link/components/link-survey-wrapper.tsx b/apps/web/modules/survey/link/components/link-survey-wrapper.tsx index 18acc02a39..f6cb4b464f 100644 --- a/apps/web/modules/survey/link/components/link-survey-wrapper.tsx +++ b/apps/web/modules/survey/link/components/link-survey-wrapper.tsx @@ -80,7 +80,7 @@ export const LinkSurveyWrapper = ({ onBackgroundLoaded={handleBackgroundLoaded}>
{!styling.isLogoHidden && project.logo?.url && } -
+
{isPreview && (
diff --git a/apps/web/modules/ui/components/media-background/index.tsx b/apps/web/modules/ui/components/media-background/index.tsx index 5c3956826c..803778b4af 100644 --- a/apps/web/modules/ui/components/media-background/index.tsx +++ b/apps/web/modules/ui/components/media-background/index.tsx @@ -166,7 +166,7 @@ export const MediaBackground: React.FC = ({ return (
+ className={`relative h-[90%] max-h-[42rem] w-[22rem] overflow-hidden rounded-[3rem] border-[6px] border-slate-400 ${getFilterStyle()}`}> {/* below element is use to create notch for the mobile device mockup */}
{surveyType === "link" && renderBackground()} diff --git a/apps/web/modules/ui/components/preview-survey/index.tsx b/apps/web/modules/ui/components/preview-survey/index.tsx index b6c5146962..96f0d7107a 100644 --- a/apps/web/modules/ui/components/preview-survey/index.tsx +++ b/apps/web/modules/ui/components/preview-survey/index.tsx @@ -392,7 +392,7 @@ export const PreviewSurvey = ({ )}
-
+
{questionRows.map((row, rowIndex) => ( - + {getLocalizedValue(row, languageCode)} diff --git a/packages/surveys/src/components/wrappers/scrollable-container.tsx b/packages/surveys/src/components/wrappers/scrollable-container.tsx index 769b3500ff..e0f6502ab5 100644 --- a/packages/surveys/src/components/wrappers/scrollable-container.tsx +++ b/packages/surveys/src/components/wrappers/scrollable-container.tsx @@ -48,9 +48,9 @@ export function ScrollableContainer({ children }: ScrollableContainerProps) { ref={containerRef} style={{ scrollbarGutter: "stable both-edges", - maxHeight: isSurveyPreview ? "40dvh" : "60dvh", + maxHeight: isSurveyPreview ? "42dvh" : "60dvh", }} - className={cn("fb-overflow-auto fb-px-4 fb-pb-6 fb-bg-survey-bg")}> + className={cn("fb-overflow-auto fb-px-4 fb-pb-4 fb-bg-survey-bg")}> {children}
{!isAtBottom && (