-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Labels
Description
🚨 IMPORTANT
This issue is likely user-facing in the main PostHog app, see surveyVersionRequirements.ts. If you delete or close this issue, be sure to update the version requirements list here.
Summary
The posthog-react-native SDK does not support shuffling questions or shuffling choice options in surveys. Both features have explicit // TODO comments with commented-out implementation code in packages/react-native/src/surveys/surveys-utils.ts.
Current State
getDisplayOrderQuestions()has// TODO: shuffle questionsand returns unshuffled questionsgetDisplayOrderChoices()has// TODO: shuffle choicesand returns unshuffled choices- The commented-out code shows the intended implementation pattern
Expected Behavior
- When
survey.appearance.shuffleQuestionsis true, questions should be presented in a randomized order (unlessenable_partial_responsesis true) - When
question.shuffleOptionsis true on a choice question, the choices should be randomized (keeping open-ended choice at end)
Reference Implementation
See posthog-js browser: packages/browser/src/extensions/surveys/surveys-extension-utils.tsx
getDisplayOrderQuestions()for question shufflinggetDisplayOrderChoices()for option shuffling
Tracking
This is tracked in the survey SDK feature parity issue: PostHog/posthog#45658
This issue was generated by Claude using the /survey-sdk-audit skill.
Reactions are currently unavailable