-
Notifications
You must be signed in to change notification settings - Fork 992
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
[Enhancement] - User can successfully change Email #341
Conversation
… for the spinner (#326)
* completed screen for change email * added proper dimens from dimens.xml * fixed pr feedback
* added change password screen, toolbar and added style for textinputlayout * refactored styles
* added cells for edit profile and change password * made rows for account in settings and added account activity layout with rows * added toolbar layout, account layout, AccountActivity, Updated SettingsNewViewModel * added edit text and line restrictions * re-added tests that were deleted accidentally * fixed lines and spacing issues * fixed imports * fixed more imports * moved the tests into the right package * setup edit profile cell and added the activity * added toolbar and imageview to edit profile * still fixing layout * updated strings, completed edit profile ui * removed duplicate activity in manifest and sample layout * fixed circle issues * added icon for different screen mods * fixed error * fixed more errors * fixed the last error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have questions 👀
this.view.layoutParams = params | ||
this.view.background = ContextCompat.getDrawable(context, R.drawable.change_email_success_bg) | ||
ViewCompat.setElevation(this.view, 6f) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nl
import com.kickstarter.R | ||
|
||
fun Snackbar.success(context: Context) { | ||
val params = this.view.layoutParams as ViewGroup.MarginLayoutParams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Magic numbers make code harder to understand.
Let's try something like this instead:
val grid1 = context.resources.getDimensionPixelSize(R.dimen.grid_1)
val grid2 = context.resources.getDimensionPixelSize(R.dimen.grid_2)
params.setMargins(grid1, 0, grid1, grid2)
@@ -12,6 +17,9 @@ import rx.subjects.PublishSubject | |||
interface ChangeEmailViewModel { | |||
|
|||
interface Inputs { | |||
/** Call when the make network call button has been clicked. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like copy pasta 👀 🍝
/** Emits a boolean that determines if a network call is in progress. */ | ||
fun showProgressBar(): Observable<Boolean> | ||
|
||
/** Emits the logged in user's email which we use get the success of the mutation. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you doing anything with this value?
android:shape="rectangle"> | ||
<solid android:color="@color/ksr_cobalt_500" /> | ||
<corners android:radius="@dimen/grid_1" /> | ||
</shape> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nl
|
||
class ChangeEmailViewModelTest : KSRobolectricTestCase() { | ||
|
||
private lateinit var vm: TestApolloViewModel.ViewModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be ChangeEmailViewModel.ViewModel
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's G2G 🚀
What
UI
is accurate if you switch to production the Gif is on staging.Snackbar
background.master
and a prior branch hence all the file changes.Story
See 👀