-
Notifications
You must be signed in to change notification settings - Fork 499
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
Fixes #3900 : Added toolbar to exit ProfilePictureActivity #3918
Fixes #3900 : Added toolbar to exit ProfilePictureActivity #3918
Conversation
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.
Thanks @bkaur-bkj. Left some initial thoughts--PTAL.
app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureActivityPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureActivityPresenter.kt
Outdated
Show resolved
Hide resolved
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.
Thanks @bkaur-bkj. I think the approach overall LGTM. The main gap yet is ensuring that we have tests to ensure that this stays working long-term.
app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureActivityPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureActivityPresenter.kt
Outdated
Show resolved
Hide resolved
@rt4914 @BenHenning Sir as said I have tried adding the test case for the above cases of checking title and back button working but as I am not aware much of writing test cases my case for action button check is getting failed, can you pls help what should I change here. |
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.
Thanks @bkaur-bkj. Just had a few other comments. Beyond that:
- Fix part of #3602: Added label for ProfilePictureActivity #3881 was just merged; could you sync this PR with the latest develop changes, address the conflict, and update the PR to use the activity title string introduced in that PR, instead (so that we don't need to duplicate it)?
- I see there was a lint error. Do you have your local Git repository set up with the pre-push hook to catch lint errors? If not, you should run setup.sh locally as explained here. That will ensure lint failures are caught before pushing which will help you discover & fix them more quickly (i.e. without needing to wait for CI or running them manually).
app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt
Outdated
Show resolved
Hide resolved
Also, @bkaur-bkj please make sure that you respond to all comments before sending a PR back for review. It's important to make it clear to reviewers that you've explicitly addressed a comment so that we know to check for it being resolved in our next review round. |
okay sorry for not replying last time |
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.
@bkaur-bkj PTAL
layout="@layout/toolbar" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> |
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.
Lets make it a bit simple.
Instead of using include
, write code similar to this
<com.google.android.material.appbar.AppBarLayout |
This way you can actually remove a lot of kotlin code.
Also from the same link above you will need to introduce [View
](
<View |
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.
FYI I have suggested to remove include
because we won't be using them in future in our code as per #3746
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.
Okay sir done
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.
@rt4914 I have made these changes and also the one asked for adding tests, but still the test fails and I have no clue how to modify them.
@BenHenning @rt4914 PTAL |
Sorry, I'll need to review this on Monday. |
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.
@bkaur-bkj PTAL thanks.
app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt
Show resolved
Hide resolved
@rt4914 PTAL I made the changes requested and have also added the updated screenshot , but with just that naming changes one check is failing and I unable to resolve it |
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.
@bkaur-bkj PTAL at one comment.
app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureActivityPresenter.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt
Show resolved
Hide resolved
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.
Thanks @bkaur-bkj. LGTM!
Restarting Gradle run since it was a Java 8 flake. |
@rt4914 PTAL I have removed the unnecessary part of toolbar |
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.
LGTM, thanks.
Explanation
Fixes #3900: Added toolbar to exit the ProfilePictureActivity
Essential Checklist
After adding the toolbar and shadow