PolicyEngine / policyengine-app

PolicyEngine's free web app for computing the impact of public policy.
GNU Affero General Public License v3.0
32 stars 86 forks source link

Upgrades to pre-population of policies for new users #1674

Open anth-volk opened 2 weeks ago

anth-volk commented 2 weeks ago

Currently, when a user who isn't logged in calculates a policy reform, the details of that are stored in localStorage. However, this should be altered/upgraded in a few ways:

  1. We should base whether or not these are saved at all upon whether or not cookie consent is enabled; we should also change the consent banner to be a bit broader about what's being authorized (see #1596)
  2. We should probably remove a portion of the code that was added to store policies that failed to run properly, even while the user was logged in; this would probably end up being confusing if it were ever actually triggered; instead, we should determine how to gracefully handle their failure ("Skeleton" box that just displays the info we do have and shows an error? Don't add them at all?)
  3. We should add a feature (my preference is a checkbox on the SignupModal component) that allows users to opt out of prefilling these policies; we should also determine how to deal with the fact that, due to the limitations of auth0, we have no way of determining whether a user is signing up for the first time or has already done so without fetching their profile off of our database
  4. We should discuss whether we should have an arbitrary cutoff point for policies that a user has created; we currently disregard any policies older than 2 weeks old when a user creates an account, but should we?