return directly to interrupted actions
Ticket
+issues
The pressing issue here is that URLs like http://wagn.org/card/unwatch/Ticket (in the notification email) don't work if you're not signed in. They prompt you to sign in, but then you're at the home page and there's no clear way to unwatch or even get to the Ticket card.
There are two main cases where we want to return to a previous address:
- Action Interrupted. This is the case that this ticket is originally about. You're trying to unwatch a card but must sign in to do so. Could also happen with a create url, a delete, ... maybe others? Once signed in, Wagn should remember the action that got interrupted (eg unwatch) and continue on that path. Note - thus far signin is the only interruption like this.
- Ambiguous Next Step. There are several cases like this, where a user decides to take an action and, once completed, we must decide where to go. We're currently using our stack (and @previous_location) to make this choice for us. This comes up when:
- cancelling a card creation or an invitation
- hitting "forgot password"
- deleting a card
My point in spelling all of this out is that the "history stack" will not solve both problems. For the "next step" (#2) cases, we almost never want to go back to performing some action on a card that was previously in progress. And for the interrupted actions (#1), we don't really want a queue - we just want to go back to that action. No need to keep a stack.
But currently, we don't have any great way of handling "action interrupted".
+solution
I think in the action interrupted case, the best idea is to pass the interrupted action url through the signin process via cgi variables. (note, it could also be desirable to be able to preserve this action through signup and/or forgot password, but my inclination would not be to start there).
Perhaps we could even make all of this possible via AJAX, so that if I were to try to edit something in place for which I did not have permissions, I'd get sign-in options right there and then be able to continue in place.