project-icp / bee-pollinator-app

The web application front end for the ICP Pollinator Decision Support Tool 🐝
Apache License 2.0
6 stars 1 forks source link

Implement Sign Up workflow #403

Closed rajadain closed 5 years ago

rajadain commented 5 years ago

Overview

Expands the Sign Up dialog to have four entry fields for email, username, and two password fields. All fields are required, and HTML5 validation is used to ensure they are filled before sending it to the server.

Once complete, the data is sent to the /user/sign_up?beekeepers endpoint as form data, which returns validation errors or a success response. The first validation error is shown at the top of the dialog, using similar styling as in the Log In dialog. The query string is used to classify the new users as having signed up from the Beekeepers app, as opposed to Pollination app.

If the sign up is successful, the Sign Up dialog is closed and the Log In dialog is opened, with a message prompting the user to click the activation link in their email. Once they have activated their account, they can log in with the specified credentials. Upon first log in, any work they have done so far (in terms of apiaries created) are saved to the database.

Connects #326 Connects #328

Demo

2018-12-31 16 39 38

Notes

Testing Instructions

fungjj92 commented 5 years ago

This works well. The activation page has copy that doesn't apply to beekeepers however, which is that logging in saves ongoing work. I think we had pushed this workflow to enhancement or removed it altogether.

rajadain commented 5 years ago

The activation page has copy that doesn't apply to beekeepers however, which is that logging in saves ongoing work.

Good point. We have #328 for that. I've taken the enhancement label off it, although I think we should defer working on it until all core functionality is in.

rajadain commented 5 years ago

I fixed the app sourcing issue in 7b14b5b 7b4c576, and added a commit for #328 in 3264e22 150e4a1. Could you take another look at this?

rajadain commented 5 years ago

Rebased over develop to resolve merge conflicts.

fungjj92 commented 5 years ago

Works well, tested after rebase !

rajadain commented 5 years ago

Thanks for taking a look! Merging now.