Closed data-sync-user closed 4 years ago
➤ David Justice commented:
This will likely happen at the root level of the app by looking at the router / url
➤ Les Orchard commented:
Random thought that occurred to me during sprint planning: Is there any overlap here with the way we handle deciding when to enroll a particular user in an experiment on fxa-content-server? Not entirely sure how we make that selection, but seems like it might be similar? I don't think that's entirely edit-free in the code, though
➤ Barry Chen commented:
I don't think that's entirely edit-free in the code, though
Indeed, there's the rub.
➤ David Justice commented:
We don't have to be entirely edit free of course, we just want to avoid having checks in every view if possible
➤ Barry Chen commented:
[~djustice@mozilla.com] What should be the output of this issue? There's no code in master for deciding whether a user should see a survey or for rendering a survey yet.
➤ Barry Chen commented:
[~djustice@mozilla.com] I've pushed up a couple small commits to demo the general approach: https://github.com/mozilla/fxa/compare/master...chenba:1708-survey-targeting
Content server: the code expects a module, when given the view path (and the user), to return either the survey content or nothing.
Payments: use react-router's useLocation
.
┆Issue is synchronized with this Jira Task ┆Issue Number: FXA-1708