systers / malaria-app-ios

A mobile app that will aid the Volunteer in sustaining life-saving malaria prevention tactics over their 2+ years of service.
4 stars 16 forks source link

User profile #59

Closed teodorciuraru closed 8 years ago

teodorciuraru commented 8 years ago

Summary

Has been changed, code and UI, so now it allows the user to update his profile information after pressing the Edit button. The changes will be saved, only if they pass our validations, when pressing Save.

SetupScreenUserProfileViewController

A new setup screen that appears only when launching the app for the first time. It uses the User class to save the data regarding the user after validating it.

User

A NSManagedObject that represents a User entity. It makes sure that there is only one user created and handles functions like creating, updating (define()), validating (validateData()) and helpful miscellaneous (isUserAlreadyCreated()).

StringInternalExtensions and NSDateInternalExtensions

Created in order to solve a bug regarding "Redundant conformance to protocol XYZ" when running the app tests. I managed to solve it by splitting the default StringExtensions file into itself and StringInternalExtensions that is only targeting malaria (not the tests) so that the error message stops appearing. Same for NSDateExtensions.

LocationTextField and GenderTextField

Two custom views that need almost no setup and can be (and needed to be) easily reused throughout the app (PlanMyTripVC, SetupScreenUserProfileVC, UserProfileVC).

bphenriques commented 8 years ago

Gender should be a UIValuePicker. Btw, some of these values might become optional in the future (I would suggest changing the backend so that it is easier to define which fields are optional and what are mandatory). Age should be a number value picker, location should use the same picker as being used in plan my trip.

There is no "Done" button on the keyboard to quickly dismiss the keyboard.

The user profile it is better if it is a horizontal paged view that when you press next, it goes to the next screen. As it is, the first screen fades out and the second screen fades in which is not the most fluid experience.

Regarding the rest, everything seems okay! 👍 I would prefer having the updated documentation comments in another PR though (it clutters the PR which is focused on User Profile).

bphenriques commented 8 years ago

This never happened to you before (according to previous PR). Why now? "Redundant conformance to protocol XYZ"