implement user experience dialog and privacy policy#10
Conversation
Carifio24
left a comment
There was a problem hiding this comment.
Mostly looks good but there are a couple of issues that I noticed (and one thing that I wasn't sure about).
| "Does this spark your curiosity?" : | ||
| "Are you learning something new?", | ||
| questionTimeout: null as ReturnType<typeof setTimeout> | null, | ||
| canTrackStory: false, |
There was a problem hiding this comment.
I don't understand what the purpose of this value is - I'm not seeing what it adds in addition to responseOptOut. But LMK if I'm missing something!
There was a problem hiding this comment.
canTrackStory just makes sure sendUpdateData doesn't run particularly in the case where a user failed to be created. i figured this was better than using responseOptOut to track this, since that is a user setting.
| const exists = response.status === 200 && content.response?.user_uuid != undefined; | ||
| if (exists) { | ||
| let userExists = false; | ||
| try { |
There was a problem hiding this comment.
Can we throw here? Not questioning it, it's just not obvious to me what the exception would be.
There was a problem hiding this comment.
using a try/catch makes sure we can proceed to the ratings response block even if the user is not created, otherwise the whole chain stops
There was a problem hiding this comment.
Makes sense. I guess this should only happen if the server or internet is down (or if we get something like a CORS error), but can't hurt to have it in there.
This PR implements the User Experience and privacy policy dialogs