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: Profile successfully deleted message #4440

Closed
wants to merge 3 commits into from

Conversation

mbobiosio
Copy link

Explanation

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

@BenHenning
Copy link
Member

@mbobiosio is this ready for review? If so, please make sure to assign it to whoever needs to review it (per https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section you should make sure that the 'assignees' list always includes whoever next has to take action on the PR).

If it's not ready for review, please mark it as 'Draft' until it is ready to go into review.

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 an initial high-level pass. My feedback is:

  • Please update the PR description to include details of what your PR contains, and how you approached it. PRs like Fix #3622, #4238, #3861, part of #4044: Fix state player deadlock by migrating progress controllers over to a command-queue structure #4239 are good examples of detailed descriptions, though that PR's description is much longer than what's probably needed here. Make sure to also fill in the 'UI' section per the instructions since this is introducing a new UI.
  • We shouldn't be using a toast here. Generally, we probably should be using a snackbar, but since we aren't yet utilizing those yet this should be an alert dialog hosted in its own dialog fragment (as we do for other similar notices in the app).
  • New tests should be added for changed functionality to make sure the notice appears with the correct text at the correct time.

@@ -101,15 +103,16 @@ class ProfileEditFragmentPresenter @Inject constructor(
ProfileId.newBuilder().setInternalId(internalProfileId).build(),
binding.profileEditAllowDownloadSwitch.isChecked
).toLiveData().observe(
Copy link
Member

Choose a reason for hiding this comment

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

Could probably fit on one line now for a bit cleaner code, e.g.: ).toLiveData().observe(activity) {

@BenHenning BenHenning assigned mbobiosio and unassigned BenHenning Jul 21, 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 PTAL Thanks.

fragment
) {
if (it is AsyncResult.Success) {
fragment.requireContext().toast(
Copy link
Contributor

Choose a reason for hiding this comment

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

@BenHenning For accessibility perspective should we call this Toast as soon as it appears?

AppVersionActivity::class.java, /* initialTouchMode= */ true, /* launchActivity= */ false
AppVersionActivity::class.java, /* initialTouchMode= */
true, /* launchActivity= */
false
Copy link
Contributor

Choose a reason for hiding this comment

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

These changes can be un-done.

AppVersionActivity::class.java, /* initialTouchMode= */ true, /* launchActivity= */ false

@rt4914 rt4914 removed their assignment Jul 22, 2022
@BenHenning
Copy link
Member

@mbobiosio I'll need to close this since it was force-pushed. Please review https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR (particularly point 4 under https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#making-a-local-code-change-using-the-terminal). We don't allow force-pushing since it messes up comment history and can make code reviewing much more difficult. You can open a new PR with a fresh history, just please make sure not to force push again in the future as it will lead to delays in the review process. Thanks!

@BenHenning BenHenning closed this Jul 29, 2022
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.

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