:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(surveys): skip bound-label validation for thumb questions (#59297)
Ben Leaa00347013eb1
diff --git a/frontend/src/scenes/surveys/surveyLogic.tsx b/frontend/src/scenes/surveys/surveyLogic.tsxindex e6f9221f2e3c..7a2a211ee29f 100644--- a/frontend/src/scenes/surveys/surveyLogic.tsx+++ b/frontend/src/scenes/surveys/surveyLogic.tsx@@ -112,6 +112,7 @@ import {getSurveyResponse,getSurveyStartDateForQuery,isSurveyRunning,+ isThumbQuestion,sanitizeSurvey,sanitizeSurveyAppearance,validateSurveyAppearance,@@ -3045,12 +3046,21 @@ export const surveyLogic = kea<surveyLogicType>([}if (question.type === SurveyQuestionType.Rating) {+ // Thumb questions (emoji + 2-point scale) hide the bound-label inputs in the editor,+ // so requiring them here would silently block save with no visible error.+ const requiresBoundLabels = !isThumbQuestion(question)return {...questionErrors,display: !question.display && 'Please choose a display type.',scale: !question.scale && 'Please choose a scale.',- lowerBoundLabel: !question.lowerBoundLabel && 'Please enter a lower bound label.',- upperBoundLabel: !question.upperBoundLabel && 'Please enter an upper bound label.',+ lowerBoundLabel:+ requiresBoundLabels &&+ !question.lowerBoundLabel &&+ 'Please enter a lower bound label.',+ upperBoundLabel:+ requiresBoundLabels &&+ !question.upperBoundLabel &&+ 'Please enter an upper bound label.',}} else if (question.type === SurveyQuestionType.SingleChoice ||