From ad9ddb61cf5d9de7f33db6464cf6518688e4d4a3 Mon Sep 17 00:00:00 2001 From: Johannes <72809645+jobenjada@users.noreply.github.com> Date: Thu, 25 Apr 2024 12:14:05 +0200 Subject: [PATCH] fix: link blocking next buttons on mobile (#2530) --- .../s/[surveyId]/components/LegalFooter.tsx | 4 +-- .../s/[surveyId]/components/LinkSurvey.tsx | 2 +- .../general/ResponseErrorComponent.tsx | 2 +- .../surveys/src/components/general/Survey.tsx | 2 +- .../src/components/general/SurveyInline.tsx | 2 +- .../src/components/general/ThankYouCard.tsx | 2 +- .../src/components/general/WelcomeCard.tsx | 30 +++++++++---------- .../wrappers/ScrollableContainer.tsx | 2 +- 8 files changed, 22 insertions(+), 24 deletions(-) diff --git a/apps/web/app/s/[surveyId]/components/LegalFooter.tsx b/apps/web/app/s/[surveyId]/components/LegalFooter.tsx index fe32f6d412..34f819a8b6 100644 --- a/apps/web/app/s/[surveyId]/components/LegalFooter.tsx +++ b/apps/web/app/s/[surveyId]/components/LegalFooter.tsx @@ -24,8 +24,8 @@ export default function LegalFooter({ }; return ( -
-
+
+
{IMPRINT_URL && ( Imprint diff --git a/apps/web/app/s/[surveyId]/components/LinkSurvey.tsx b/apps/web/app/s/[surveyId]/components/LinkSurvey.tsx index 40c381955e..fe378581db 100644 --- a/apps/web/app/s/[surveyId]/components/LinkSurvey.tsx +++ b/apps/web/app/s/[surveyId]/components/LinkSurvey.tsx @@ -185,7 +185,7 @@ export default function LinkSurvey({ }; return ( -
+
{!determineStyling().isLogoHidden && product.logo?.url && } {isPreview && ( diff --git a/packages/surveys/src/components/general/ResponseErrorComponent.tsx b/packages/surveys/src/components/general/ResponseErrorComponent.tsx index 7841d1262a..2194da86c5 100644 --- a/packages/surveys/src/components/general/ResponseErrorComponent.tsx +++ b/packages/surveys/src/components/general/ResponseErrorComponent.tsx @@ -12,7 +12,7 @@ type ResponseErrorComponentProps = { export const ResponseErrorComponent = ({ questions, responseData, onRetry }: ResponseErrorComponentProps) => { return ( -
+
{"Your feedback is stuck :("} diff --git a/packages/surveys/src/components/general/Survey.tsx b/packages/surveys/src/components/general/Survey.tsx index 8cf01cd243..33f50ee36d 100644 --- a/packages/surveys/src/components/general/Survey.tsx +++ b/packages/surveys/src/components/general/Survey.tsx @@ -344,7 +344,7 @@ export const Survey = ({ getCardContent() )}
-
+
{isBrandingEnabled && } {showProgressBar && }
diff --git a/packages/surveys/src/components/general/SurveyInline.tsx b/packages/surveys/src/components/general/SurveyInline.tsx index e843f2c84f..a4bf73a72b 100644 --- a/packages/surveys/src/components/general/SurveyInline.tsx +++ b/packages/surveys/src/components/general/SurveyInline.tsx @@ -20,7 +20,7 @@ export function SurveyInline(props: SurveyInlineProps) {
{isMobile ? (
-
+
diff --git a/packages/surveys/src/components/general/ThankYouCard.tsx b/packages/surveys/src/components/general/ThankYouCard.tsx index 4043dfd82f..6b0837cd0c 100644 --- a/packages/surveys/src/components/general/ThankYouCard.tsx +++ b/packages/surveys/src/components/general/ThankYouCard.tsx @@ -85,7 +85,7 @@ export const ThankYouCard = ({ window.location.replace(buttonLink); }} /> -

Press Enter ↵

+
)}
diff --git a/packages/surveys/src/components/general/WelcomeCard.tsx b/packages/surveys/src/components/general/WelcomeCard.tsx index 47ac466584..eb089d6595 100644 --- a/packages/surveys/src/components/general/WelcomeCard.tsx +++ b/packages/surveys/src/components/general/WelcomeCard.tsx @@ -114,37 +114,35 @@ export const WelcomeCard = ({
-
-
- { - onSubmit({ ["welcomeCard"]: "clicked" }, {}); - }} - type="button" - /> -
Press Enter ↵
-
+
+ { + onSubmit({ ["welcomeCard"]: "clicked" }, {}); + }} + type="button" + /> +
Press Enter ↵
{timeToFinish && !showResponseCount ? ( -
+

Takes {calculateTimeToComplete()}

) : showResponseCount && !timeToFinish && responseCount && responseCount > 3 ? ( -
+

{`${responseCount} people responded`}

) : timeToFinish && showResponseCount ? ( -
+

Takes {calculateTimeToComplete()} diff --git a/packages/surveys/src/components/wrappers/ScrollableContainer.tsx b/packages/surveys/src/components/wrappers/ScrollableContainer.tsx index 66b81eddd5..4a5d31471b 100644 --- a/packages/surveys/src/components/wrappers/ScrollableContainer.tsx +++ b/packages/surveys/src/components/wrappers/ScrollableContainer.tsx @@ -56,7 +56,7 @@ export const ScrollableContainer = ({ children }: ScrollableContainerProps) => { ref={containerRef} style={{ scrollbarGutter: "stable", - maxHeight: isSurveyPreview ? "40vh" : "60vh", + maxHeight: isSurveyPreview ? "41vh" : "60vh", }} className={`overflow-${isOverflowHidden ? "hidden" : "auto"} pb-1 pl-6 pr-4`} onMouseEnter={() => toggleOverflow(false)}