PostHog / PostHog/posthog-flutter

Implement survey popup delay (surveyPopupDelaySeconds)

Open
#322 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Survey
Dominant language
Dart
Stars
97
Forks
85
Avg merge
1d 8h
Merged PRs (30d)
31

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-flutter SDK does not implement the survey popup delay (surveyPopupDelaySeconds). The field is not present in the Flutter SDK code at all.

Current State

  • No surveyPopupDelaySeconds field or delay logic exists in the Flutter SDK
  • The underlying native SDKs (iOS and Android) have the field in their models but do not implement the delay behavior either

Expected Behavior

When survey.appearance.surveyPopupDelaySeconds is set to a value > 0:

  1. The survey popup should be delayed by that many seconds before being shown
  2. Surveys should be sorted by their delay value (shorter delays first)

Dependencies

This depends on either:

  • The Flutter SDK implementing the delay itself in its survey rendering code
  • Or the native SDKs implementing it (iOS needs rendering delay, Android needs to expose on display model)

Reference Implementation

See posthog-js browser: packages/browser/src/extensions/surveys.tsx_handlePopover() method which uses setTimeout for the delay.

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

Start by reading the Flutter SDK survey rendering code and compare it with packages/browser/src/extensions/surveys.tsx, especially the _handlePopover() method. Check surveyVersionRequirements.ts and the linked feature-parity issue for scope, then implement the delay and ordering behavior so surveys wait for surveyPopupDelaySeconds and shorter delays appear first.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter, javascript
Domain
frontend, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.