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

Fixes #4294 'added profile deleted message' #4560

Closed
wants to merge 26 commits into from

Conversation

mbobiosio
Copy link

@mbobiosio mbobiosio commented Sep 6, 2022

Explanation

Fixes #4294
This PR includes a dialog to indicate profile deleted status.
I have used a new Fragment that extends InjectableDialogFragment to show the dialog

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

If your PR includes UI-related changes, then:

  • Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes
  • For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see RTL guide)
  • Add a video showing the full UX flow with a screen reader enabled (see accessibility guide)
  • Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing

profile-deleted-dialog

Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @mbobiosio. I took a first pass. Please make sure to fix all failing CI checks, including the ones for static checks (which should require KDocs and tests to be added).

Also, please fill out the part of the PR description asking for various screenshots and videos for different cases to demonstrate how this UI looks and behaves. That context is really important to make sure that everything works the way we expect even for cases that we might not normally consider or try during development.

@BenHenning BenHenning assigned mbobiosio and unassigned BenHenning Sep 7, 2022
@mbobiosio mbobiosio assigned BenHenning and unassigned mbobiosio Sep 7, 2022
@BenHenning
Copy link
Member

@mbobiosio please don't resolve reviewers' conversation threads. Responding is sufficient to indicate that you've addressed the comment (otherwise it makes it hard for us to keep track of things across review iterations).

Also, please make sure to address all points in my previous comment before assigning the PR back (unless you get stuck). CI checks still appear to have failures (and haven't actually finished running).

@BenHenning BenHenning assigned mbobiosio and unassigned BenHenning Sep 7, 2022
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

@mbobiosio Suggested changes. Thanks.

@rt4914 rt4914 removed their assignment Sep 7, 2022
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @mbobiosio. Took another pass. I think CI checks are still failing--PTAL.

@BenHenning BenHenning removed their assignment Sep 9, 2022
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @mbobiosio, followed up to the comments.

Please also make sure the CI tests are fixed before sending this back for review. I can't approve this until the CI checks are passing.

* This function is responsible for displaying content in DialogFragment.
*
* @return [DeleteProfileSuccessDialogFragment]: DialogFragment
* This function returns a new instance of [DeleteProfileSuccessDialogFragment]
Copy link
Member

Choose a reason for hiding this comment

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

This should actually be the exact wording I suggest, i.e.:

/** Returns a new instance of [DeleteProfileSuccessDialogFragment]. */

Copy link
Author

Choose a reason for hiding this comment

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

Updated this

Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem updated in the latest version of the PR. Did you push your changes?

Copy link
Author

Choose a reason for hiding this comment

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

Updated now

Copy link
Member

Choose a reason for hiding this comment

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

This still seems unchanged--I see the old documentation wording in the latest changes of the PR.

@BenHenning BenHenning removed their assignment Sep 10, 2022
Copy link
Contributor

@rt4914 rt4914 left a comment

Choose a reason for hiding this comment

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

@mbobiosio Please apply changes as per open comments.

@rt4914 rt4914 removed their assignment Sep 12, 2022
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Not all comments have been responded to or addressed.

@BenHenning BenHenning removed their assignment Oct 1, 2022
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

@mbobiosio I don't think the test changes are matching the reference I sent. Please revise.

@BenHenning
Copy link
Member

Also @mbobiosio this branch needs to be brought up-to-date with the latest changes in develop since there are conflicts to resolve.

@BenHenning BenHenning removed their assignment Oct 5, 2022
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @mbobiosio. Took another pass--PTAL.

@BenHenning BenHenning removed their assignment Oct 11, 2022
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @mbobiosio. I took another scan, and looked at all old comment threads. I think 2 old threads still need to be resolved, and I noticed two things per the latest changes. The remaining comments should be all of the changes needed for this PR to be finished up.

Also, please update to the latest develop and resolve the pending conflicts so that we can get an accurate CI result.

* This function is responsible for displaying content in DialogFragment.
*
* @return [DeleteProfileSuccessDialogFragment]: DialogFragment
* This function returns a new instance of [DeleteProfileSuccessDialogFragment]
Copy link
Member

Choose a reason for hiding this comment

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

This still seems unchanged--I see the old documentation wording in the latest changes of the PR.

@@ -365,6 +375,12 @@ class ProfileEditActivityTest {
}
}

private fun verifyTextInDialog(@StringRes textInDialogId: Int) {
onView(withText(context.getString(textInDialogId)))
Copy link
Member

Choose a reason for hiding this comment

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

We can just use withId() here, no need for the extra getString.

@@ -229,45 +231,53 @@ class ProfileEditActivityTest {
}

@Test
fun testProfileEdit_deleteProfile_checkReturnsToProfileListOnPhoneOrAdminControlOnTablet() {
Copy link
Member

Choose a reason for hiding this comment

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

I finally realized what I thought has been missing from the changed tests: we still need to verify that deletion occurs via the dialog. I think you need to add a test that finishes the deletion and then verifies that the correct destination activity has been routed to (using the same intends logic as this test used).

@@ -371,6 +371,7 @@ exempted_file_path: "app/src/main/java/org/oppia/android/app/recyclerview/StartS
exempted_file_path: "app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonActivityPresenter.kt"
exempted_file_path: "app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonFragmentPresenter.kt"
exempted_file_path: "app/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonViewModel.kt"
exempted_file_path: "app/src/main/java/org/oppia/android/app/settings/profile/DeleteProfileSuccessDialogFragment.kt"
Copy link
Member

Choose a reason for hiding this comment

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

This is still unresolved.

@BenHenning BenHenning removed their assignment Oct 14, 2022
@oppiabot
Copy link

oppiabot bot commented Oct 21, 2022

Hi @mbobiosio, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue.
If you are still working on this PR, please make a follow-up commit within 3 days (and submit it for review, if applicable). Please also let us know if you are stuck so we can help you!

@oppiabot oppiabot bot added the stale Corresponds to items that haven't seen a recent update and may be automatically closed. label Oct 21, 2022
@oppiabot oppiabot bot closed this Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Corresponds to items that haven't seen a recent update and may be automatically closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After deleting a profile, Deleted successfully message should be displayed
3 participants