18F / epa-notice

Web interface for viewing and commenting on proposed changes to federal regulations
Other
7 stars 17 forks source link

What happens when the user is done? #217

Closed yowill closed 8 years ago

yowill commented 8 years ago

[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?

cmc333333 commented 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?

jehlers commented 8 years ago

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?

jmcarp commented 8 years ago

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.

cmc333333 commented 8 years ago

I'd argue we should stick with POST only for the time being. We can swing back to a permalink in the future.

jmcarp commented 8 years ago

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.

cmc333333 commented 8 years ago

Would a redirect make sense for the time being?

jmcarp commented 8 years ago

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.