pairwise-tech / pairwise

The Pairwise Codebase
https://app.pairwise.tech
6 stars 0 forks source link

Allow Current Challenge ID to be null #235

Closed bonham000 closed 4 years ago

bonham000 commented 4 years ago

This PR:

Notes:

This removes the default fallback for the initial challenge as the first in the course, unless that id is specified in the URL which loads the app. I think our Google ad redirects to /workspace/, which will now redirect to /home instead. If that's the case, we could either:

  1. Allow that to happen, /home is also a sensible starting place.
  2. Just change the ad to redirect to /workspace/iSF4BNIl or /workspace/iSF4BNIl/hello-pairwise.
iansinnott commented 4 years ago

which will now redirect to /home

Why? Since it's still doing a redirect, why not keep it redirecting to the first challenge?

I think we would see huge dropoff if we sent the add to /home. That page doesn't sit you down and demand you write some code—the workspace does. I'm not opposed to testing it though. I realize the predicted dropoff is just a guess, and we could get real data.

bonham000 commented 4 years ago

Because the previous redirect occurred using the currentChallengeId which defaulted to the first challenge. Changing this and allowing it to be null instead breaks that redirect (if it's null), so I just changed it to default to /home if that occurs.

I think instead of hard-coding the redirect to go to the first challenge we should check where the ad actually links to and if we want to link to the first challenge we should just use that link.

I don't really have any preference on where the ad links to. The first challenge is great because it's the fastest route to getting started, but linking to /home might also be useful. This would be a good place to do an experiment and see which one leads to better initial engagement (but honestly I don't have a strong preference either way currently).

bonham000 commented 4 years ago

I agree there's not a lot of meaningful functionality in the home route at the moment, but in my mind it was more like a placeholder for the dashboard in the future.

We can definitely change the default redirects, just in refactoring the code here it became more simple to remove the default challenge logic altogether which resulted in this side effect related to the ad (but simpler code, I thought).

Also, totally fine about keeping the first challenge - if I had to choose one for the ad redirect it would be the first challenge.