Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The implementation of trigger-on-download surveys is incredibly obscure #64

Open
biblicabeebli opened this issue May 2, 2024 · 0 comments
Labels

Comments

@biblicabeebli
Copy link
Member

(creating an issue for this because the location of implementation for this feature is going to be forgotten)

  • Trigger-on-download surveys are implemented as always-available surveys that don't get cleared from the list of active surveys.
  • If you remove a trigger survey then it will reappear the next time the survey+main-screen-state code runs.
  • Need to test to ensure that this current implementation does not keep resubmitting surveys. If that is happening then... will need to work out what to do.

new implementation brainstorm:

  • (change code to remove trigger surveys from activeSurveys list and then....)
  • add trigger-on-first-download surveys once, immediately after registration.
    • this would change the feature to be at-registration-time surveys, which is not the same as on-first-download surveys.
  • Store a list of survey ids that were trigger-on-download surveys, make that a blocklist.
    • to make that a persistent object it would need to be stored on the study, which means extra database saves and crashes 🫠.
    • the code that activates surveys from push notifications (that takes a list of survey ids) should still work fine.
  • and would need to then check whether a fully new survey is a trigger survey (e.g. build the logic one would expect).

(ok, that's a relatively huge lift for implementing such a feature, I guess the current implementation hack is way easier than that.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant