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

[Bug] The DISPLAYED event is emitted before the survey is shown to the user #85

Open
maciejsurmacz opened this issue Jun 21, 2024 · 3 comments
Assignees

Comments

@maciejsurmacz
Copy link

This is especially apparent when the network is slow. While testing on an emulator with EDGE/poor signal strength, there are around 3 seconds between the DISPLAYED event being received by the observer and the survey window actually showing (with a loading spinner until the survey content is loaded).

Tested on:
API 32
Network type: EDGE
Signal strength: Poor
Lib version: 1.3.0

@msingleton
Copy link
Member

@maciejsurmacz Yea, we tend to opt into the most conservative definition of "displayed" to avoid users seeing surveys more often than they should. Are you using a prompt in this survey? The prompt is much faster to show, but I see the argument to move the display event to be when the survey view has fully displayed if there is no prompt

@maciejsurmacz
Copy link
Author

@msingleton we are not using a prompt for the survey right now.

The use case is the following:

  1. user presses Show survey button,
  2. we show a loading indicator in the app UI since the operation is async,
  3. we want to hide the loading indicator once the survey is shown.

So far, what I found works for our use case is hiding the loading state when DISMISS event is fired. This works just fine right now but I think the DISPLAY event can be a bit misleading (based on the name I was expecting it to be fired when the survey view is shown) and using the DISMISS event for this feels to me a bit like a workaround.

@msingleton
Copy link
Member

Ah yea, alright that's helpful context -- agreed that feels like a workaround and not a proper solution

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

No branches or pull requests

3 participants