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

Change password #344

Merged
merged 4 commits into from
Oct 3, 2018
Merged

Change password #344

merged 4 commits into from
Oct 3, 2018

Conversation

eoji
Copy link
Contributor

@eoji eoji commented Oct 2, 2018

what did i do?

TLDR; the most.

Updated strings.
Added mutation for changing password.
Added green check icon.
Deriving GraphQL endpoint from web endpoint so we don't have to manually change it for staging.
Changed staging toolbar to grey so we can see green toolbar icons.
Also fixed it in XML previews.
Created Activity extensions for showing Snackbars.
Created reusable Snackbar extensions for success and error messages.
The Snackbar extensions return themselves so you can chain them (if you wanted to inflate a success/error Snackbar manually).
Change password:
Showing warning when new password is less than 6 characters.
Showing warning when confirm password is not equal to new confirm.
Disabling save button until all validations pass.
Added 2 new LoginReasons: CHANGE_PASSWORD and RESET_PASSWORD because we want to prefill the email if it's supplied from the intent but need to check if we're showing the reset dialog or change password Snackbar.
Moved the text changed listeners to before we subscribe to the prefillEmail output.
When password is successfully changed, taking user to LoginActivity.
LoginActivity shows success Snackbar letting the user know their changes were saved.
Made LoginActivity's root a CoordinatorLayout so the Snackbar is shown over the keyboard.
Tests on tests on tests.

image

see

device-2018-10-02-183943 2018-10-02 18_43_09 device-2018-10-02-184119 2018-10-02 18_43_25

what's left?

Final copy.

…e doing almost the whole thing. i'll write a better commit message when i open the PR
Deriving Graphql endpoint from web endpoint so we don't have to manually change it for staging.
Created Activity extensions for showing Snackbars.
Created reusable Snackbar extensions for success and error messages.
The Snackbar extensions return themselves so you can chain them (if you wanted to inflate a success/error snackbar manually).
Change password:
Showing warning when new password is less than 6 characters.
Showing warning when confirm password is not equal to new confirm.
Disabling save button until all validations pass.
Added 2 new LoginReasons: CHANGE_PASSWORD and RESET_PASSWORD because we want to prefill the email if it's supplied from the intent but need to check if we're showing the reset dialog or change password snackbar.
When password is successfully changed, taking user to LoginActivity.
LoginActivity shows success snackbar letting the user know their changes were saved.
Made LoginActivity's root a CoordinatorLayout so the Snackbar is shown over the keyboard.
@eoji eoji requested a review from Rcureton October 2, 2018 22:45
@eoji
Copy link
Contributor Author

eoji commented Oct 2, 2018

Change Password

Copy link
Contributor

@Rcureton Rcureton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes but overal GREAT JOB!!! Definitely took a huge chunk out of our v2 rollout.

@RequiresActivityViewModel(ChangePasswordViewModel.ViewModel::class)
class ChangePasswordActivity : BaseActivity<ChangePasswordViewModel.ViewModel>() {

var saveEnabled = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be private

}
}

companion object {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can define this at the top of the class I think instead of a companion object because no other class is accessing this constant

const val MINIMUM_PASSWORD_LENGTH = 6

interface ChangePasswordViewModel {

@eoji eoji merged commit ab29145 into master Oct 3, 2018
@eoji eoji deleted the io/change-password2 branch November 13, 2018 22:47
@eoji eoji mentioned this pull request Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants