Closed yowill closed 8 years ago
When we talked about this before, I think we settled on clearing everything out on successful submission. @jehlers @donjo do you recall?
Yes. I think we discussed having the unique URL for the confirmation page. That way the user has that page to "keep for their records" with the final PDF download of their comment. Since that page is created and the submission is successful, the local storage can refresh and start new. If the submission fails, then we keep the draft status and the user can return to their review page or write mode with their full saved comment.
Does that sound right?
As of master
, we clear out comments from browser storage for the relevant notice on successful confirmation. The user can only visit the confirmation page once--visiting the confirmation url again won't work. Actually, @cmc333333: what should we show users on a GET to the confirmation page? Right now it only responds to a POST.
I'd argue we should stick with POST only for the time being. We can swing back to a permalink in the future.
Agreed, but what happens if the user navigates to the confirmation url on their own? Right now, I think they'll either see a blank screen or a 405.
Would a redirect make sense for the time being?
Now that the redirect that @cmc333333 suggested is merged, can we consider this closed? We might want some additional tweaks--since the user can't refresh or navigate back to the confirmation page, we might want an onbeforeunload
message to pop up if they navigate away before the tracking number loads. Otherwise, I think this is done.
[NEEDED] What happens when the user is done? Related to (having a unique url page). Do we clear out local storage and start over or let the user get back to their first comment?