Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Open Food Facts contribution signup inside Smoothie #702

Closed
5 tasks
Tracked by #419
teolemon opened this issue Nov 27, 2021 · 4 comments · Fixed by #801
Closed
5 tasks
Tracked by #419

Implement Open Food Facts contribution signup inside Smoothie #702

teolemon opened this issue Nov 27, 2021 · 4 comments · Fixed by #801
Assignees
Labels
👥 User management Account login, signup, signout
Milestone

Comments

@teolemon
Copy link
Member

teolemon commented Nov 27, 2021

What

Part of

@teolemon teolemon mentioned this issue Nov 27, 2021
3 tasks
@teolemon teolemon added the 👥 User management Account login, signup, signout label Nov 27, 2021
@teolemon teolemon changed the title Implement register inside Smoothie Implement contribution signup inside Smoothie Nov 27, 2021
@teolemon teolemon changed the title Implement contribution signup inside Smoothie Implement Open Food Facts contribution signup inside Smoothie Dec 29, 2021
@teolemon
Copy link
Member Author

@monsieurtanuki would you be interested by this one ? There's some pre-existing Android code and logic to steal from.
image

@monsieurtanuki
Copy link
Contributor

@teolemon Working on it...

@monsieurtanuki monsieurtanuki self-assigned this Dec 29, 2021
@monsieurtanuki
Copy link
Contributor

Virtually done.
But I tried to put trash data, and the only thing I got is a rather discrete

  • status=400
  • error=Unrecognized request error

We'll definitely need more explicit messages. By the way there's no language parameter in OpenFoodAPIClient.register.

In the meanwhile, @teolemon could you point me to some existing pre-validation code before the actual call to register?

@monsieurtanuki
Copy link
Contributor

Ok @teolemon I had a look at your OP links. I don't speak kotlin but I think I can handle this.
Screenshot:
Simulator Screen Shot - iPhone 8 Plus - 2021-12-29 at 20 16 08

monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Dec 29, 2021
New file:
* `sign_up_page.dart`: Sign Up Page

Impacted files:
* `login_page.dart`: added a call to new page `SignUpPage`
* `smooth_text_form_field.dart`: added parameter `textInputType` (for emails); fixed the "obscure" bug
* `user_management_helper.dart`: added validation methods for email, username and password
@teolemon teolemon linked a pull request Dec 29, 2021 that will close this issue
@M123-dev M123-dev added this to the V 1 milestone Dec 30, 2021
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Dec 30, 2021
Impacted files:
* `app_en.arb`: added 25 labels
* `app_fr.arb`: added 25 labels
* `login_page.dart`: reaction to the returned value of the sign up page
* `sign_up_page.dart`: translated labels; added textInputActions; added a username check; added a reaction to the sign up api call
* `user_management_helper.dart`: fixed the username regexp; created method `put` used for sign in and sign up
monsieurtanuki added a commit to monsieurtanuki/smooth-app that referenced this issue Dec 30, 2021
Impacted files:
* `login_page.dart`: refactored
* `sign_up_page.dart`: now this page puts the user in the preferences and pop's `true` (when successful)
monsieurtanuki added a commit that referenced this issue Dec 30, 2021
New file:
* `sign_up_page.dart`: Sign Up Page. `pop`s true if the sign up was successful.

Impacted files:
* `app_en.arb`: added 25 labels
* `app_fr.arb`: added 25 labels
* `login_page.dart`: added a call to new page `SignUpPage`
* `smooth_text_form_field.dart`: added parameter `textInputType` (for emails); fixed the "obscure" bug
* `user_management_helper.dart`: added validation methods for email, username and password; created method `put` used for sign in and sign up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👥 User management Account login, signup, signout
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants