PostHog / PostHog/posthog-android

Surveys: Support shuffle questions

Open
#442 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Survey
Dominant language
Kotlin
Stars
90
Forks
49
Avg merge
2d 5h
Merged PRs (30d)
61

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-android SDK does not support the shuffleQuestions survey appearance setting. The field is parsed from JSON into the internal SurveyAppearance model, but it is NOT exposed in the public PostHogDisplaySurveyAppearance model, so delegate developers cannot access this information.

Current State

  • SurveyAppearance.shuffleQuestions exists (internal model, line 26)
  • PostHogDisplaySurveyAppearance does NOT include shuffleQuestions
  • Note: shuffleOptions on choice questions IS already exposed via PostHogDisplayChoiceQuestion — this issue is only about the survey-level question shuffling

Expected Behavior

When survey.appearance.shuffleQuestions is true, the survey questions should be presented in a randomized order to the delegate developer (either by shuffling in the SDK before passing to the delegate, or by exposing the flag so the developer can shuffle).

Reference Implementation

See posthog-js browser: packages/browser/src/extensions/surveys/surveys-extension-utils.tsx

  • getDisplayOrderQuestions() shuffles questions when survey.appearance.shuffleQuestions is true (and enable_partial_responses is false)

Tracking

This is tracked in the survey SDK feature parity issue: https://github.com/PostHog/posthog/issues/45658

This issue was generated by Claude using the /survey-sdk-audit skill.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the internal SurveyAppearance model and the public PostHogDisplaySurveyAppearance model, then compare the behavior with packages/browser/src/extensions/surveys/surveys-extension-utils.tsx. Check surveyVersionRequirements.ts before making changes. Done means shuffleQuestions is supported for Android delegates, with behavior aligned to the stated partial-response condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.